Merge topic 'aix-xl-platform-info'
d30dcf1
Move RPATH flags to AIX per-compiler information files89ea7a3
Factor AIX and XL compiler flags into common module
This commit is contained in:
commit
8a8234df05
|
@ -19,5 +19,7 @@ endif()
|
||||||
set(__AIX_COMPILER_GNU 1)
|
set(__AIX_COMPILER_GNU 1)
|
||||||
|
|
||||||
macro(__aix_compiler_gnu lang)
|
macro(__aix_compiler_gnu lang)
|
||||||
|
set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-blibpath:")
|
||||||
|
set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":")
|
||||||
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS} -Wl,-G")
|
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS} -Wl,-G")
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
|
@ -1,4 +1,2 @@
|
||||||
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-G -Wl,-brtl,-bnoipath") # -shared
|
include(Platform/AIX-XL)
|
||||||
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib
|
__aix_compiler_xl(C)
|
||||||
SET(CMAKE_SHARED_LIBRARY_C_FLAGS " ")
|
|
||||||
SET(CMAKE_SHARED_MODULE_C_FLAGS " ")
|
|
||||||
|
|
|
@ -1,4 +1,2 @@
|
||||||
SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-G -Wl,-brtl,-bnoipath") # -shared
|
include(Platform/AIX-XL)
|
||||||
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib
|
__aix_compiler_xl(CXX)
|
||||||
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS " ")
|
|
||||||
SET(CMAKE_SHARED_MODULE_CXX_FLAGS " ")
|
|
||||||
|
|
|
@ -1,4 +1,2 @@
|
||||||
SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-G -Wl,-brtl,-bnoipath") # -shared
|
include(Platform/AIX-XL)
|
||||||
SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib
|
__aix_compiler_xl(Fortran)
|
||||||
SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS " ")
|
|
||||||
SET(CMAKE_SHARED_MODULE_Fortran_FLAGS " ")
|
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Copyright 2002-2011 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(__AIX_COMPILER_XL)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
set(__AIX_COMPILER_XL 1)
|
||||||
|
|
||||||
|
macro(__aix_compiler_xl lang)
|
||||||
|
set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-blibpath:")
|
||||||
|
set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":")
|
||||||
|
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-G -Wl,-brtl,-bnoipath") # -shared
|
||||||
|
set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib
|
||||||
|
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS " ")
|
||||||
|
set(CMAKE_SHARED_MODULE_${lang}_FLAGS " ")
|
||||||
|
endmacro()
|
|
@ -9,8 +9,6 @@ SET(CMAKE_DL_LIBS "-lld")
|
||||||
# When our own RPATH is to be added it may be inserted before the
|
# When our own RPATH is to be added it may be inserted before the
|
||||||
# "always" paths.
|
# "always" paths.
|
||||||
SET(CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH /usr/lib /lib)
|
SET(CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH /usr/lib /lib)
|
||||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-blibpath:")
|
|
||||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
|
|
||||||
|
|
||||||
# Files named "libfoo.a" may actually be shared libraries.
|
# Files named "libfoo.a" may actually be shared libraries.
|
||||||
SET_PROPERTY(GLOBAL PROPERTY TARGET_ARCHIVES_MAY_BE_SHARED_LIBS 1)
|
SET_PROPERTY(GLOBAL PROPERTY TARGET_ARCHIVES_MAY_BE_SHARED_LIBS 1)
|
||||||
|
|
Loading…
Reference in New Issue