diff options
-rw-r--r-- | Modules/Platform/AIX.cmake | 7 | ||||
-rw-r--r-- | Modules/Platform/OSF1.cmake | 9 | ||||
-rw-r--r-- | Modules/Platform/SunOS.cmake | 9 |
3 files changed, 19 insertions, 6 deletions
diff --git a/Modules/Platform/AIX.cmake b/Modules/Platform/AIX.cmake index e1fbdbd..3252c74 100644 --- a/Modules/Platform/AIX.cmake +++ b/Modules/Platform/AIX.cmake @@ -4,7 +4,8 @@ SET(CMAKE_DL_LIBS "-lld") SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-G") # -shared SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "-Wl,-brtl") # +s, flag for exe link to use shared lib IF(CMAKE_COMPILER_IS_GNUCXX) - SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so") # .so + SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared -Wl,-G") # -shared +ENDIF(CMAKE_COMPILER_IS_GNUCXX) +IF(CMAKE_COMPILER_IS_GNUCC) SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-G") # -shared - SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "-Wl,-brtl") # +s, flag for exe link to use shared lib -ENDIF(CMAKE_COMPILER_IS_GNUCXX) +ENDIF(CMAKE_COMPILER_IS_GNUCC) diff --git a/Modules/Platform/OSF1.cmake b/Modules/Platform/OSF1.cmake index 08be310..1c9dde6 100644 --- a/Modules/Platform/OSF1.cmake +++ b/Modules/Platform/OSF1.cmake @@ -14,10 +14,15 @@ IF(CMAKE_SYSTEM MATCHES "OSF1-V.*") SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-expect_unresolved,\\*") # -shared SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared -Wl,-expect_unresolved,\\*") # -shared IF(CMAKE_COMPILER_IS_GNUCXX) - SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "-Wl,-rpath,") + SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,-rpath,") ELSE(CMAKE_COMPILER_IS_GNUCXX) - SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "-rpath ") + SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-rpath ") ENDIF(CMAKE_COMPILER_IS_GNUCXX) + IF(CMAKE_COMPILER_IS_GNUCC) + SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") + ELSE(CMAKE_COMPILER_IS_GNUCC) + SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "-rpath ") + ENDIF(CMAKE_COMPILER_IS_GNUCC) SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP ":") ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*") diff --git a/Modules/Platform/SunOS.cmake b/Modules/Platform/SunOS.cmake index 8d72c70..1f91cf6 100644 --- a/Modules/Platform/SunOS.cmake +++ b/Modules/Platform/SunOS.cmake @@ -10,12 +10,19 @@ IF(CMAKE_SYSTEM MATCHES "SunOS-5*.") SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-G") SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "-R,") SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP ":") - IF(CMAKE_COMPILER_IS_GNUCXX) + IF(CMAKE_COMPILER_IS_GNUCC) SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -nostdlib") SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "-Wl,-R,") SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP ":") ENDIF(CMAKE_COMPILER_IS_GNUCXX) + IF(CMAKE_COMPILER_IS_GNUCXX) + SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC") + SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared -nostdlib") + SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,-R,") + SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ":") + ENDIF(CMAKE_COMPILER_IS_GNUCXX) + ENDIF(CMAKE_SYSTEM MATCHES "SunOS-5*.") IF(NOT CMAKE_COMPILER_IS_GNUCXX) |