summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CMakeLists.txt
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-10-13 12:25:08 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-04-07 16:11:18 (GMT)
commit8ed59fc207fd028d5b2b1f8cb8a323291ef04ffc (patch)
tree6d5257aac8000c17b6338fef90ff1b59e34d6ea9 /Tests/RunCMake/CMakeLists.txt
parent4e6ca504459640ff39eac48eb62fcae95c8fc8d2 (diff)
downloadCMake-8ed59fc207fd028d5b2b1f8cb8a323291ef04ffc.zip
CMake-8ed59fc207fd028d5b2b1f8cb8a323291ef04ffc.tar.gz
CMake-8ed59fc207fd028d5b2b1f8cb8a323291ef04ffc.tar.bz2
Add target_compile_features command.
This can be used to set the compiler features required by particular targets. An error is issued at CMake time if the compiler does not support the required feature. If a language dialect flag is required by the features used, that will be added automatically. Base the target_compile_features command on cmTargetPropCommandBase. This gives us 'free' handling of IMPORTED, ALIAS, INTERFACE, non-compilable and missing targets.
Diffstat (limited to 'Tests/RunCMake/CMakeLists.txt')
-rw-r--r--Tests/RunCMake/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index dd769ac..00e6702 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -125,6 +125,10 @@ endif()
add_RunCMake_test(File_Generate)
add_RunCMake_test(ExportWithoutLanguage)
add_RunCMake_test(target_link_libraries)
+
+if (CMAKE_CXX_COMPILER_ID STREQUAL GNU AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
+ add_RunCMake_test(target_compile_features)
+endif()
add_RunCMake_test(CheckModules)
add_RunCMake_test(CommandLine)