summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineCompileFeatures.cmake
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-04-06 09:40:11 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-04-16 13:16:23 (GMT)
commita36b957fc4594264965a86b54e5eab40520cf79d (patch)
tree08a5c7468d8095e5ccb34e1942d778303414e648 /Modules/CMakeDetermineCompileFeatures.cmake
parent8472ef243ffc9988ea8fb83cbc7acdf3f0daa239 (diff)
downloadCMake-a36b957fc4594264965a86b54e5eab40520cf79d.zip
CMake-a36b957fc4594264965a86b54e5eab40520cf79d.tar.gz
CMake-a36b957fc4594264965a86b54e5eab40520cf79d.tar.bz2
Features: Add cxx_template_template_parameters.
Extend the existing feature infrastructure as needed to support both C++11 and C++98 features.
Diffstat (limited to 'Modules/CMakeDetermineCompileFeatures.cmake')
-rw-r--r--Modules/CMakeDetermineCompileFeatures.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCompileFeatures.cmake b/Modules/CMakeDetermineCompileFeatures.cmake
index 40aa9d6..583ff8d 100644
--- a/Modules/CMakeDetermineCompileFeatures.cmake
+++ b/Modules/CMakeDetermineCompileFeatures.cmake
@@ -17,6 +17,7 @@ function(cmake_determine_compile_features lang)
if(lang STREQUAL CXX AND COMMAND cmake_record_cxx_compile_features)
message(STATUS "Detecting ${lang} compile features")
+ set(CMAKE_CXX98_COMPILE_FEATURES)
set(CMAKE_CXX11_COMPILE_FEATURES)
include("${CMAKE_ROOT}/Modules/Internal/FeatureTesting.cmake")
@@ -28,13 +29,19 @@ function(cmake_determine_compile_features lang)
return()
endif()
+ if (CMAKE_CXX98_COMPILE_FEATURES)
+ list(REMOVE_ITEM CMAKE_CXX11_COMPILE_FEATURES ${CMAKE_CXX98_COMPILE_FEATURES})
+ endif()
+
if(NOT CMAKE_CXX_COMPILE_FEATURES)
set(CMAKE_CXX_COMPILE_FEATURES
+ ${CMAKE_CXX98_COMPILE_FEATURES}
${CMAKE_CXX11_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)
message(STATUS "Detecting ${lang} compile features - done")