From af14f1f2c3750ba3cf9b9cc1a809a88b1878a5c3 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 4 Dec 2009 10:22:30 -0500 Subject: Remove GNU-specific flags from Linux.cmake We remove the shared library compile/link flags "-fPIC" and "-shared" because they are not provided by all compilers on Linux. This allows us to drop code from the Linux-XL-*.cmake files that erases the bad flags. All other supported compilers already provide their correct flags for Linux in their own platform information files. --- Modules/Platform/Linux-XL-C.cmake | 1 - Modules/Platform/Linux-XL-CXX.cmake | 2 -- Modules/Platform/Linux-XL-Fortran.cmake | 1 - Modules/Platform/Linux.cmake | 3 --- 4 files changed, 7 deletions(-) diff --git a/Modules/Platform/Linux-XL-C.cmake b/Modules/Platform/Linux-XL-C.cmake index 5919ce1..b1b07f6 100644 --- a/Modules/Platform/Linux-XL-C.cmake +++ b/Modules/Platform/Linux-XL-C.cmake @@ -1,2 +1 @@ -SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-qmkshrobj") diff --git a/Modules/Platform/Linux-XL-CXX.cmake b/Modules/Platform/Linux-XL-CXX.cmake index 1d0e472..071a975 100644 --- a/Modules/Platform/Linux-XL-CXX.cmake +++ b/Modules/Platform/Linux-XL-CXX.cmake @@ -1,3 +1 @@ -SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") -SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "") SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-qmkshrobj") diff --git a/Modules/Platform/Linux-XL-Fortran.cmake b/Modules/Platform/Linux-XL-Fortran.cmake index 8eda218..5da574e 100644 --- a/Modules/Platform/Linux-XL-Fortran.cmake +++ b/Modules/Platform/Linux-XL-Fortran.cmake @@ -1,2 +1 @@ -SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-qmkshrobj") diff --git a/Modules/Platform/Linux.cmake b/Modules/Platform/Linux.cmake index bde19b3..6490dd1 100644 --- a/Modules/Platform/Linux.cmake +++ b/Modules/Platform/Linux.cmake @@ -1,7 +1,4 @@ -# GCC is the default compiler on Linux. SET(CMAKE_DL_LIBS "dl") -SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") -SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,") -- cgit v0.12