summaryrefslogtreecommitdiff
path: root/Source/Checks/cm_cxx_features.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-09-16 13:21:10 -0400
committerBrad King <brad.king@kitware.com>2016-09-16 13:22:10 -0400
commitaa50cdac439121f9e40ff2638368dc913a0e2361 (patch)
treea69eb3c862b978dd6980cb7ffe1443d111ae7ae9 /Source/Checks/cm_cxx_features.cmake
parent00fd64d1263901f96935e15c8d90ee8a338cee1a (diff)
downloadcmake-aa50cdac439121f9e40ff2638368dc913a0e2361.tar.gz
Check for availability of unique_ptr and make_unique when building CMake
Some code paths may find these useful if available.
Diffstat (limited to 'Source/Checks/cm_cxx_features.cmake')
-rw-r--r--Source/Checks/cm_cxx_features.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake
index 6fde7b67d1..c6a532fcc5 100644
--- a/Source/Checks/cm_cxx_features.cmake
+++ b/Source/Checks/cm_cxx_features.cmake
@@ -32,8 +32,13 @@ function(cm_check_cxx_feature name)
endfunction()
if(CMAKE_CXX_STANDARD)
+ cm_check_cxx_feature(make_unique)
+ if(CMake_HAVE_CXX_MAKE_UNIQUE)
+ set(CMake_HAVE_CXX_UNIQUE_PTR 1)
+ endif()
cm_check_cxx_feature(nullptr)
cm_check_cxx_feature(override)
+ cm_check_cxx_feature(unique_ptr)
cm_check_cxx_feature(unordered_map)
cm_check_cxx_feature(unordered_set)
endif()