diff options
author | Brad King <brad.king@kitware.com> | 2014-04-15 14:32:11 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-04-15 14:32:11 (GMT) |
commit | b56a9ae7f14189fd2bce2ca3e9441060ca231638 (patch) | |
tree | 0122235518aa6041be6866711fb2433b8c191070 /Tests/CMakeLists.txt | |
parent | 593b69c9dc9e692b198f1ddbf9251130e61a4679 (diff) | |
parent | 9eaf3755987821080908a289cefbf546773071f9 (diff) | |
download | CMake-b56a9ae7f14189fd2bce2ca3e9441060ca231638.zip CMake-b56a9ae7f14189fd2bce2ca3e9441060ca231638.tar.gz CMake-b56a9ae7f14189fd2bce2ca3e9441060ca231638.tar.bz2 |
Merge topic 'target_compile_features'
9eaf3755 Export: Populate INTERFACE_COMPILE_FEATURES property.
8ed59fc2 Add target_compile_features command.
4e6ca504 cmTargetPropCommandBase: Change the interface to return bool.
5412dede cmTarget: Transitively evaluate compiler features.
baff4434 cmTarget: Allow populating COMPILE_FEATURES using generator expressions.
f97bf437 Features: Add cxx_auto_type.
03355d6b cmTarget: Add COMPILE_FEATURES target property.
faeddf64 project: Add infrastructure for recording CXX compiler features
913394af cmTarget: Add CXX_STANDARD and CXX_EXTENSION target properties.
8238a6cd Add some COMPILE_OPTIONS for specifying C++ dialect.
892243fc Tests: Require CMake 3.0 for the SystemInformation test.
59b5fdd3 Don't load Clang-CXX from AppleClang-CXX.
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r-- | Tests/CMakeLists.txt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 7d4e8b4..12bd3b2 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -197,6 +197,11 @@ if(BUILD_TESTING) ADD_TEST_MACRO(TarTest TarTest) ADD_TEST_MACRO(SystemInformation SystemInformation) ADD_TEST_MACRO(MathTest MathTest) + if(CMAKE_CXX_COMPILER_ID STREQUAL GNU + AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8) + ADD_TEST_MACRO(CompileFeatures CompileFeatures) + ADD_TEST_MACRO(CMakeCommands.target_compile_features target_compile_features) + endif() # assume no resources building to test set(TEST_RESOURCES FALSE) # for windows and cygwin assume we have resources @@ -283,6 +288,19 @@ if(BUILD_TESTING) ADD_TEST_MACRO(ConfigSources ConfigSources) endif() ADD_TEST_MACRO(SourcesProperty SourcesProperty) + if(CMAKE_CXX_COMPILER_ID STREQUAL GNU + AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6) + set(runCxxDialectTest 1) + endif() + if(CMAKE_CXX_COMPILER_ID STREQUAL Clang + AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 2.9) + if(NOT APPLE OR POLICY CMP0025) + set(runCxxDialectTest 1) + endif() + endif() + if(runCxxDialectTest) + ADD_TEST_MACRO(CxxDialect CxxDialect) + endif() set_tests_properties(EmptyLibrary PROPERTIES PASS_REGULAR_EXPRESSION "CMake Error: CMake can not determine linker language for target: test") ADD_TEST_MACRO(CrossCompile CrossCompile) |