]> sigrok.org Git - pulseview.git/commitdiff
Fix CMake CXX_STANDARD handling, part 2
authorSoeren Apel <redacted>
Fri, 8 Sep 2023 19:27:53 +0000 (21:27 +0200)
committerSoeren Apel <redacted>
Fri, 8 Sep 2023 19:27:53 +0000 (21:27 +0200)
VERSION_GREATER_EQUAL was introduced with cmake 3.7, so we have to use the older, more verbose expression.

https://cmake.org/cmake/help/latest/command/if.html#version-greater-equal

CMakeLists.txt

index c206d9158dc0994761ea88538c39670934fab1ec..ec86073dcf956eb97fc03345f95e0b95abbcca70 100644 (file)
@@ -83,7 +83,7 @@ include(memaccess)
 
 find_package(PkgConfig)
 
-if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.8.0")
+if(CMAKE_VERSION VERSION_EQUAL "3.8.0" OR CMAKE_VERSION VERSION_GREATER "3.8.0")
        check_cxx_compiler_flag("-std=c++17" HAVE_STD_CXX_17)
        check_cxx_compiler_flag("-std=c++14" HAVE_STD_CXX_14)
        check_cxx_compiler_flag("-std=c++11" HAVE_STD_CXX_11)