From fcfe121fd82fcb24c9f40f052cb20d403c92edb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sun, 5 Jun 2016 21:30:12 +0200 Subject: Platform: add flag definitions for PathScale compiler on SunOS (#16135) --- Modules/Platform/SunOS-PathScale-C.cmake | 2 ++ Modules/Platform/SunOS-PathScale-CXX.cmake | 2 ++ Modules/Platform/SunOS-PathScale-Fortran.cmake | 2 ++ Modules/Platform/SunOS-PathScale.cmake | 31 ++++++++++++++++++++++++++ 4 files changed, 37 insertions(+) create mode 100644 Modules/Platform/SunOS-PathScale-C.cmake create mode 100644 Modules/Platform/SunOS-PathScale-CXX.cmake create mode 100644 Modules/Platform/SunOS-PathScale-Fortran.cmake create mode 100644 Modules/Platform/SunOS-PathScale.cmake 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() -- cgit v0.12