clap

CLAP Audio Plugin API
Log | Files | Refs | README | LICENSE

commit 6e4ed1355999d69f73c7f240b7d06f82dff64392
parent 3805de165b5ec5543d2a04ac48cb08591dd44a54
Author: Paul Walker <paul@pwjw.com>
Date:   Tue,  3 Jan 2023 20:05:27 -0500

Check CMakeVersion for C17 compile

CMake before 3.21 didn't have c17 as a CMAKE_C_STANDARD so skip
this test in that environment. Closes #273

Diffstat:
MCMakeLists.txt | 6+++++-
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)