Merge topic 'fix-cray-pic'

b886b46c Cray: Add common PIC flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1692
This commit is contained in:
Brad King
2018-01-25 13:36:03 +00:00
committed by Kitware Robot
5 changed files with 15 additions and 6 deletions
+1 -2
View File
@@ -2,8 +2,7 @@
# file Copyright.txt or https://cmake.org/licensing for details.
include(Compiler/Cray)
set(CMAKE_C_VERBOSE_FLAG "-v")
__compiler_cray(C)
string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG")
+1 -2
View File
@@ -2,8 +2,7 @@
# file Copyright.txt or https://cmake.org/licensing for details.
include(Compiler/Cray)
set(CMAKE_CXX_VERBOSE_FLAG "-v")
__compiler_cray(C)
string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -DNDEBUG")
+6 -1
View File
@@ -1,4 +1,9 @@
set(CMAKE_Fortran_VERBOSE_FLAG "-v")
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
include(Compiler/Cray)
__compiler_cray(Fortran)
set(CMAKE_Fortran_MODOUT_FLAG -em)
set(CMAKE_Fortran_MODDIR_FLAG -J)
set(CMAKE_Fortran_MODDIR_DEFAULT .)
+7
View File
@@ -8,3 +8,10 @@ endif()
set(__COMPILER_CRAY 1)
include(Compiler/CMakeCommonCompilerMacros)
macro(__compiler_cray lang)
set(CMAKE_${lang}_VERBOSE_FLAG "-v")
set(CMAKE_${lang}_COMPILE_OPTIONS_PIC -h PIC)
set(CMAKE_${lang}_COMPILE_OPTIONS_PIE -h PIC)
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-h PIC")
endmacro()
-1
View File
@@ -62,7 +62,6 @@ macro(__CrayPrgEnv_setup lang test_src compiler_cmd link_cmd)
# Flags for the Cray wrappers
set(CMAKE_STATIC_LIBRARY_LINK_${lang}_FLAGS "-static")
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "")
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared")
set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-dynamic")