summaryrefslogtreecommitdiffstats
path: root/Source/Checks/cm_cxx14_check.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-08-01 18:01:47 (GMT)
committerBrad King <brad.king@kitware.com>2018-08-01 18:03:43 (GMT)
commit3a2c736b41fb394b389607b0ccf96611c42319f5 (patch)
treea3d6c99511d3f636dfb805308d41e29e41c841cc /Source/Checks/cm_cxx14_check.cmake
parentf0e82ce9a2f50e7ce0b9b95dcf32e47ce9a08369 (diff)
downloadCMake-3a2c736b41fb394b389607b0ccf96611c42319f5.zip
CMake-3a2c736b41fb394b389607b0ccf96611c42319f5.tar.gz
CMake-3a2c736b41fb394b389607b0ccf96611c42319f5.tar.bz2
Extend C++17/C++14 feature checks to require unique_ptr
When testing compiler modes higher than C++11 for constructs we need, include a check for using `unique_ptr` in that mode. The PGI 18.4 compiler in some environments supports `unique_ptr` in C++11 mode but is broken for C++14 and C++17. Check that `unique_ptr` works in these modes before using one.
Diffstat (limited to 'Source/Checks/cm_cxx14_check.cmake')
-rw-r--r--Source/Checks/cm_cxx14_check.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Checks/cm_cxx14_check.cmake b/Source/Checks/cm_cxx14_check.cmake
index a78ba35..38606b9 100644
--- a/Source/Checks/cm_cxx14_check.cmake
+++ b/Source/Checks/cm_cxx14_check.cmake
@@ -1,5 +1,5 @@
set(CMake_CXX14_BROKEN 0)
-if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|PGI")
if(NOT CMAKE_CXX14_STANDARD_COMPILE_OPTION)
set(CMake_CXX14_WORKS 0)
endif()