From: Soeren Apel Date: Fri, 8 Sep 2023 19:27:53 +0000 (+0200) Subject: Fix CMake CXX_STANDARD handling, part 2 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=a9bead725250026dcd0f46547ffd6ed056ebf6a7;p=pulseview.git Fix CMake CXX_STANDARD handling, part 2 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 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index c206d915..ec86073d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)