[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v9 05/17] configure: require cmake 3.19 or newer
From: |
Jagannathan Raman |
Subject: |
[PATCH v9 05/17] configure: require cmake 3.19 or newer |
Date: |
Tue, 3 May 2022 10:16:46 -0400 |
cmake needs to accept the compiler flags specified with
CMAKE_<LANG>_COMPILER variable. It does so starting with
version 3.19
Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com>
Signed-off-by: John G Johnson <john.g.johnson@oracle.com>
Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
---
configure | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/configure b/configure
index 59c43bea05..7cefab289d 100755
--- a/configure
+++ b/configure
@@ -249,6 +249,7 @@ stack_protector=""
safe_stack=""
use_containers="yes"
gdb_bin=$(command -v "gdb-multiarch" || command -v "gdb")
+cmake_required="no"
if test -e "$source_path/.git"
then
@@ -2503,6 +2504,21 @@ if !(GIT="$git" "$source_path/scripts/git-submodule.sh"
"$git_submodules_action"
exit 1
fi
+# Per cmake spec, CMAKE_<LANG>_COMPILER variable may include "mandatory"
compiler
+# flags. QEMU needs to specify these flags to correctly configure the build
+# environment. cmake 3.19 allows specifying these mandatory compiler flags,
+# and as such 3.19 or newer is required to build QEMU.
+if test "$cmake_required" = "yes" ; then
+ cmake_bin=$(command -v "cmake")
+ if [ -z "$cmake_bin" ]; then
+ error_exit "cmake not found"
+ fi
+ cmake_version=$($cmake_bin --version | head -n 1)
+ if ! version_ge ${cmake_version##* } 3.19; then
+ error_exit "QEMU needs cmake 3.19 or newer"
+ fi
+fi
+
config_host_mak="config-host.mak"
echo "# Automatically generated by configure - do not modify" >
$config_host_mak
--
2.20.1
- [PATCH v9 00/17] vfio-user server in QEMU, Jagannathan Raman, 2022/05/03
- [PATCH v9 01/17] tests/avocado: Specify target VM argument to helper routines, Jagannathan Raman, 2022/05/03
- [PATCH v9 02/17] qdev: unplug blocker for devices, Jagannathan Raman, 2022/05/03
- [PATCH v9 03/17] remote/machine: add HotplugHandler for remote machine, Jagannathan Raman, 2022/05/03
- [PATCH v9 04/17] remote/machine: add vfio-user property, Jagannathan Raman, 2022/05/03
- [PATCH v9 05/17] configure: require cmake 3.19 or newer,
Jagannathan Raman <=
- [PATCH v9 07/17] vfio-user: define vfio-user-server object, Jagannathan Raman, 2022/05/03
Re: [PATCH v9 07/17] vfio-user: define vfio-user-server object, Stefan Hajnoczi, 2022/05/05
[PATCH v9 06/17] vfio-user: build library, Jagannathan Raman, 2022/05/03