diff options
author | Brad King <brad.king@kitware.com> | 2016-06-07 12:34:07 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-06-07 12:34:07 (GMT) |
commit | 9b15a15fe96f099ac9a277c9d3722b9c1e4b6ff5 (patch) | |
tree | 51d6d81a8653d4272c50f687697894f9f8452d38 /Modules/Platform | |
parent | 633d99dc6255901c2fbc9f7c80a1d24f357a4024 (diff) | |
parent | fcfe121fd82fcb24c9f40f052cb20d403c92edb7 (diff) | |
download | CMake-9b15a15fe96f099ac9a277c9d3722b9c1e4b6ff5.zip CMake-9b15a15fe96f099ac9a277c9d3722b9c1e4b6ff5.tar.gz CMake-9b15a15fe96f099ac9a277c9d3722b9c1e4b6ff5.tar.bz2 |
Merge topic 'SunOS-PathScale'
fcfe121f Platform: add flag definitions for PathScale compiler on SunOS (#16135)
Diffstat (limited to 'Modules/Platform')
-rw-r--r-- | Modules/Platform/SunOS-PathScale-C.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/SunOS-PathScale-CXX.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/SunOS-PathScale-Fortran.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/SunOS-PathScale.cmake | 31 |
4 files changed, 37 insertions, 0 deletions
diff --git a/Modules/Platform/SunOS-PathScale-C.cmake b/Modules/Platform/SunOS-PathScale-C.cmake new file mode 100644 index 0000000..2f78da1 --- /dev/null +++ b/Modules/Platform/SunOS-PathScale-C.cmake @@ -0,0 +1,2 @@ +include(Platform/SunOS-PathScale) +__sunos_compiler_pathscale(C) diff --git a/Modules/Platform/SunOS-PathScale-CXX.cmake b/Modules/Platform/SunOS-PathScale-CXX.cmake new file mode 100644 index 0000000..bb79d86 --- /dev/null +++ b/Modules/Platform/SunOS-PathScale-CXX.cmake @@ -0,0 +1,2 @@ +include(Platform/SunOS-PathScale) +__sunos_compiler_pathscale(CXX) diff --git a/Modules/Platform/SunOS-PathScale-Fortran.cmake b/Modules/Platform/SunOS-PathScale-Fortran.cmake new file mode 100644 index 0000000..3c202f7 --- /dev/null +++ b/Modules/Platform/SunOS-PathScale-Fortran.cmake @@ -0,0 +1,2 @@ +include(Platform/SunOS-PathScale) +__sunos_compiler_pathscale(Fortran) diff --git a/Modules/Platform/SunOS-PathScale.cmake b/Modules/Platform/SunOS-PathScale.cmake new file mode 100644 index 0000000..1afe56a --- /dev/null +++ b/Modules/Platform/SunOS-PathScale.cmake @@ -0,0 +1,31 @@ + +#============================================================================= +# Copyright 2016 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +# This module is shared by multiple languages; use include blocker. +if(__SUNOS_COMPILER_PATHSCALE) + return() +endif() +set(__SUNOS_COMPILER_PATHSCALE 1) + +macro(__sunos_compiler_pathscale lang) + # Shared library compile and link flags. + set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-fPIC") + set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE") + set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC") + set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared") + + set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-R") + set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":") + set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,-h") +endmacro() |