summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineCompileFeatures.cmake
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-05-05 22:21:14 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-05-22 16:01:23 (GMT)
commitdd043c3f21fbfab17d7f400bd2bc9f927215b18e (patch)
tree73f942d1294819f457309e1ccb507a057901a180 /Modules/CMakeDetermineCompileFeatures.cmake
parent3ea9bde8450a28b58730230e9e73e4b8d439f701 (diff)
downloadCMake-dd043c3f21fbfab17d7f400bd2bc9f927215b18e.zip
CMake-dd043c3f21fbfab17d7f400bd2bc9f927215b18e.tar.gz
CMake-dd043c3f21fbfab17d7f400bd2bc9f927215b18e.tar.bz2
Features: Add support for C++14 features.
Record the features implemented by GNU 4.9 and Clang 3.4.
Diffstat (limited to 'Modules/CMakeDetermineCompileFeatures.cmake')
-rw-r--r--Modules/CMakeDetermineCompileFeatures.cmake8
1 files changed, 7 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineCompileFeatures.cmake b/Modules/CMakeDetermineCompileFeatures.cmake
index da68e94..2bb7a74 100644
--- a/Modules/CMakeDetermineCompileFeatures.cmake
+++ b/Modules/CMakeDetermineCompileFeatures.cmake
@@ -57,6 +57,7 @@ function(cmake_determine_compile_features lang)
set(CMAKE_CXX98_COMPILE_FEATURES)
set(CMAKE_CXX11_COMPILE_FEATURES)
+ set(CMAKE_CXX14_COMPILE_FEATURES)
include("${CMAKE_ROOT}/Modules/Internal/FeatureTesting.cmake")
@@ -67,7 +68,10 @@ function(cmake_determine_compile_features lang)
return()
endif()
- if (CMAKE_CXX11_COMPILE_FEATURES AND CMAKE_CXX98_COMPILE_FEATURES)
+ if (CMAKE_CXX11_COMPILE_FEATURES AND CMAKE_CXX14_COMPILE_FEATURES)
+ list(REMOVE_ITEM CMAKE_CXX14_COMPILE_FEATURES ${CMAKE_CXX11_COMPILE_FEATURES})
+ endif()
+ if (CMAKE_CXX98_COMPILE_FEATURES AND CMAKE_CXX11_COMPILE_FEATURES)
list(REMOVE_ITEM CMAKE_CXX11_COMPILE_FEATURES ${CMAKE_CXX98_COMPILE_FEATURES})
endif()
@@ -75,12 +79,14 @@ function(cmake_determine_compile_features lang)
set(CMAKE_CXX_COMPILE_FEATURES
${CMAKE_CXX98_COMPILE_FEATURES}
${CMAKE_CXX11_COMPILE_FEATURES}
+ ${CMAKE_CXX14_COMPILE_FEATURES}
)
endif()
set(CMAKE_CXX_COMPILE_FEATURES ${CMAKE_CXX_COMPILE_FEATURES} PARENT_SCOPE)
set(CMAKE_CXX98_COMPILE_FEATURES ${CMAKE_CXX98_COMPILE_FEATURES} PARENT_SCOPE)
set(CMAKE_CXX11_COMPILE_FEATURES ${CMAKE_CXX11_COMPILE_FEATURES} PARENT_SCOPE)
+ set(CMAKE_CXX14_COMPILE_FEATURES ${CMAKE_CXX14_COMPILE_FEATURES} PARENT_SCOPE)
message(STATUS "Detecting ${lang} compile features - done")
endif()