diff options
author | Brad King <brad.king@kitware.com> | 2015-01-19 18:55:31 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-01-19 18:55:31 (GMT) |
commit | 813ace90e4d02a782176ea13bcec15a3e9338210 (patch) | |
tree | 54198b83854486eeec7fee7fcf543e7641874adf /Tests/Module | |
parent | 137a15bf1da72c795d8eeded4ad3848a5692dce6 (diff) | |
parent | 004e1540e0870e9b3bde19ad16c4f50b7d22df73 (diff) | |
download | CMake-813ace90e4d02a782176ea13bcec15a3e9338210.zip CMake-813ace90e4d02a782176ea13bcec15a3e9338210.tar.gz CMake-813ace90e4d02a782176ea13bcec15a3e9338210.tar.bz2 |
Merge topic 'GNU-4.4-compile-features'
004e1540 Features: Record for GNU 4.4.
2a5ca650 Features: Wrap failure-test in UNIX condition.
1ae2c6b2 Features: Blacklist cxx_constexpr test for GNU 4.5.
c66e3317 Features: Use a more-common feature in cycle-test.
c43a6dc5 Features: Update comment in test to match the code.
78259135 Features: Test presence of cxx_auto_type with genex.
7b9fc88b Features: Remove outdated comment.
Diffstat (limited to 'Tests/Module')
-rw-r--r-- | Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt index b725919..b5e46c0 100644 --- a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt +++ b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt @@ -25,12 +25,14 @@ if (NOT CMAKE_CXX_COMPILE_FEATURES AND NOT CMAKE_C_COMPILE_FEATURES) ) add_executable(WriteCompilerDetectionHeader "${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp") - include(CheckCXXSourceCompiles) - check_cxx_source_compiles("#include \"${CMAKE_CURRENT_BINARY_DIR}/test_compiler_detection.h\"\nint main() { return 0; }\n" - file_include_works - ) - if (file_include_works) - message(SEND_ERROR "Inclusion of ${CMAKE_CURRENT_BINARY_DIR}/test_compiler_detection.h was expected to cause an error, but did not.") + if(UNIX OR NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + include(CheckCXXSourceCompiles) + check_cxx_source_compiles("#include \"${CMAKE_CURRENT_BINARY_DIR}/test_compiler_detection.h\"\nint main() { return 0; }\n" + file_include_works + ) + if (file_include_works) + message(SEND_ERROR "Inclusion of ${CMAKE_CURRENT_BINARY_DIR}/test_compiler_detection.h was expected to cause an error, but did not.") + endif() endif() return() endif() |