diff options
Diffstat (limited to 'Modules/Platform/BlueGeneP-base.cmake')
-rw-r--r-- | Modules/Platform/BlueGeneP-base.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/Platform/BlueGeneP-base.cmake b/Modules/Platform/BlueGeneP-base.cmake index 926dbc0..c0241e1 100644 --- a/Modules/Platform/BlueGeneP-base.cmake +++ b/Modules/Platform/BlueGeneP-base.cmake @@ -85,11 +85,15 @@ set(CMAKE_DL_LIBS "dl") macro(__BlueGeneP_set_dynamic_flags compiler_id lang) if (${compiler_id} STREQUAL XL) # Flags for XL compilers if we explicitly detected XL + set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-qpic") + set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-qpie") set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-qpic") set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-qmkshrobj -qnostaticlink") set(BGP_${lang}_DYNAMIC_EXE_FLAGS "-qnostaticlink -qnostaticlink=libgcc") else() # Assume flags for GNU compilers (if the ID is GNU *or* anything else). + 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(BGP_${lang}_DYNAMIC_EXE_FLAGS "-dynamic") |