commit 52e287a745840b0b92596eafb01dafff18c4fa55
parent 3805de165b5ec5543d2a04ac48cb08591dd44a54
Author: Alexandre Bique <bique.alexandre@gmail.com>
Date: Wed, 4 Jan 2023 08:59:00 +0100
Merge pull request #275 from baconpaul/older-cmake-c17
Check CMakeVersion for C17 compile
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
@@ -72,7 +72,11 @@ if (${CLAP_BUILD_TESTS})
clap_compile_cpp(c11 c 11 11)
clap_compile_cpp(cpp11 cc 11 11)
clap_compile_cpp(cpp14 cc 11 14)
- clap_compile_cpp(c17 c 17 17)
+ if(${CMAKE_VERSION} VERSION_LESS "3.21")
+ message(STATUS "Skipping C17 tests due to older CMAKE_VERSION ${CMAKE_VERSION}")
+ else()
+ clap_compile_cpp(c17 c 17 17)
+ endif()
clap_compile_cpp(cpp17 cc 17 17)
clap_compile_cpp(cpp20 cc 17 20)