summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-04-28 18:45:11 (GMT)
committerBrad King <brad.king@kitware.com>2017-05-01 14:33:06 (GMT)
commite17b1791843b473d0d57ccdbe98689d1be8228e2 (patch)
treefaa4236993a654043011d6ddf0893f7e3a3d5102 /Modules
parentd037be122e15fb3860869e07a0b6ccd8e7d4d94a (diff)
downloadCMake-e17b1791843b473d0d57ccdbe98689d1be8228e2.zip
CMake-e17b1791843b473d0d57ccdbe98689d1be8228e2.tar.gz
CMake-e17b1791843b473d0d57ccdbe98689d1be8228e2.tar.bz2
Features: On SunPro link with language standard compiler flag
When C++ feature requirements or `CXX_STANDARD` cause us to compile on SunPro with the `-std=c++11` option, link with the option too. This is needed to make the compiler use the matching standard library.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Compiler/SunPro-CXX.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/Compiler/SunPro-CXX.cmake b/Modules/Compiler/SunPro-CXX.cmake
index f4345b8..b4183db 100644
--- a/Modules/Compiler/SunPro-CXX.cmake
+++ b/Modules/Compiler/SunPro-CXX.cmake
@@ -36,6 +36,7 @@ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.13)
set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "")
set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++11")
set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=c++11")
+ set(CMAKE_CXX_LINK_WITH_STANDARD_COMPILE_OPTION 1)
endif()
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.13)