diff options
Diffstat (limited to 'Tests/RunCMake/try_compile/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/try_compile/RunCMakeTest.cmake | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Tests/RunCMake/try_compile/RunCMakeTest.cmake b/Tests/RunCMake/try_compile/RunCMakeTest.cmake index a3a3451..7245471 100644 --- a/Tests/RunCMake/try_compile/RunCMakeTest.cmake +++ b/Tests/RunCMake/try_compile/RunCMakeTest.cmake @@ -95,10 +95,11 @@ run_cmake(Inspect) include("${RunCMake_BINARY_DIR}/Inspect-build/info.cmake") # FIXME: Support more compilers and default standard levels. -if (CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|AppleClang)$" - AND DEFINED CMAKE_CXX_STANDARD_DEFAULT - AND DEFINED CMAKE_CXX_EXTENSIONS_DEFAULT - ) +if (DEFINED CMAKE_CXX_STANDARD_DEFAULT AND + DEFINED CMAKE_CXX_EXTENSIONS_DEFAULT AND ( + (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 4.7) OR + (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") + )) run_cmake(CMP0128-WARN) if(NOT CMAKE_CXX_STANDARD_DEFAULT EQUAL 11) run_cmake(CMP0128-NEW) |