BUG: fix for bug 383 gcc flags are now always set if the compiler is gnu
This commit is contained in:
parent
a293f8f7a0
commit
c3530dd01f
|
@ -9,3 +9,4 @@ ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
|||
IF(CMAKE_COMPILER_IS_GNUCC)
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-G") # -shared
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCC)
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
|
|
@ -23,3 +23,5 @@ SET(CMAKE_CXX_CREATE_SHARED_MODULE
|
|||
|
||||
SET(CMAKE_C_CREATE_SHARED_MODULE
|
||||
"<CMAKE_C_COMPILER> <CMAKE_SHARED_MODULE_CREATE_C_FLAGS> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
|
||||
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
|
||||
|
|
|
@ -6,3 +6,5 @@ IF(EXISTS /usr/include/dlfcn.h)
|
|||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "-Wl,-rpath,") # -rpath
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP ":") # : or empty
|
||||
ENDIF(EXISTS /usr/include/dlfcn.h)
|
||||
# include the gcc flags
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
|
||||
|
|
|
@ -26,7 +26,6 @@ ENDIF(CMAKE_COMPILER_IS_GNUCC)
|
|||
|
||||
# CXX compiler
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
|
||||
# for gnu C++
|
||||
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC") # -pic
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared -Wl,-E -Wl,-b") # -shared
|
||||
|
@ -47,3 +46,5 @@ ELSE(CMAKE_COMPILER_IS_GNUCXX)
|
|||
SET (CMAKE_C_FLAGS_INIT "")
|
||||
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
# set flags for gcc support
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
|
||||
|
|
|
@ -12,7 +12,6 @@ IF(NOT CMAKE_COMPILER_IS_GNUCXX)
|
|||
SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O2")
|
||||
SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2")
|
||||
SET (CMAKE_C_FLAGS_INIT "")
|
||||
ELSE(NOT CMAKE_COMPILER_IS_GNUCXX)
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
|
||||
ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
# set flags for gcc support
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
|
||||
|
|
|
@ -38,6 +38,7 @@ IF(NOT CMAKE_COMPILER_IS_GNUCXX)
|
|||
SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O3")
|
||||
SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O2")
|
||||
SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2")
|
||||
ELSE(NOT CMAKE_COMPILER_IS_GNUCXX)
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
|
||||
ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
# set up for gcc if the compiler is gcc
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
|
||||
|
|
|
@ -7,3 +7,5 @@ ENDIF(CMAKE_SYSTEM MATCHES "MP-RAS-02*.")
|
|||
|
||||
|
||||
|
||||
# include the gcc flags
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
|
||||
|
|
|
@ -6,3 +6,5 @@ IF(EXISTS /usr/include/dlfcn.h)
|
|||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "-Wl,-rpath,") # -rpath
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP ":") # : or empty
|
||||
ENDIF(EXISTS /usr/include/dlfcn.h)
|
||||
# include the gcc flags
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
|
||||
|
|
|
@ -26,3 +26,5 @@ IF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
|
|||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP ":")
|
||||
ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
|
||||
|
||||
# include the gcc flags
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
# include the gcc flags
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
|
|
@ -2,3 +2,5 @@ SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-G 0")
|
|||
SET(CMAKE_SHARED_LIBRARY_SUFFIX "..o")
|
||||
SET(CMAKE_DL_LIBS "")
|
||||
SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "-Wl,-D,08000000")
|
||||
# include the gcc flags
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
|
||||
|
|
|
@ -2,3 +2,5 @@ SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-Kpic -belf")
|
|||
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-Kpic -belf")
|
||||
SET(CMAKE_DL_LIBS "")
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-belf -Wl,-Bexport")
|
||||
# include the gcc flags
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
|
||||
|
|
|
@ -1 +1,4 @@
|
|||
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC")
|
||||
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC")
|
||||
# include the gcc flags
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
|
||||
|
||||
|
|
|
@ -40,3 +40,5 @@ ELSE(CMAKE_COMPILER_IS_GNUCXX)
|
|||
"<CMAKE_CXX_COMPILER> -xar -o <TARGET> <OBJECTS> "
|
||||
"<CMAKE_RANLIB> <TARGET> ")
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
# include the gcc flags
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
# include the gcc flags
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
|
|
@ -2,3 +2,5 @@ SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-G 0")
|
|||
SET(CMAKE_SHARED_LIBRARY_SUFFIX "..o")
|
||||
SET(CMAKE_DL_LIBS "")
|
||||
SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "-Wl,-D,08000000")
|
||||
# include the gcc flags
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC")
|
||||
SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "-Wl,-Bexport")
|
||||
# include the gcc flags
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
|
|
@ -1,2 +1,4 @@
|
|||
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC")
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-Wl,-Bexport")
|
||||
# include the gcc flags
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
|
|
@ -12,3 +12,5 @@ SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP "") # : or empty
|
|||
SET(CMAKE_LIBRARY_PATH_FLAG "-L")
|
||||
SET(CMAKE_LINK_LIBRARY_FLAG "-l")
|
||||
|
||||
# include the gcc flags
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
|
|
@ -0,0 +1,2 @@
|
|||
# include the gcc flags
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
|
|
@ -1,10 +1,16 @@
|
|||
SET (CMAKE_CXX_FLAGS_INIT "")
|
||||
SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
|
||||
SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os")
|
||||
SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O3")
|
||||
SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
|
||||
SET (CMAKE_C_FLAGS_INIT "")
|
||||
SET (CMAKE_C_FLAGS_DEBUG_INIT "-g")
|
||||
SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os")
|
||||
SET (CMAKE_C_FLAGS_RELEASE_INIT "-O3")
|
||||
SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
|
||||
IF(CMAKE_COMPILER_IS_GNUCC)
|
||||
SET (CMAKE_C_FLAGS_INIT "")
|
||||
SET (CMAKE_C_FLAGS_DEBUG_INIT "-g")
|
||||
SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os")
|
||||
SET (CMAKE_C_FLAGS_RELEASE_INIT "-O3")
|
||||
SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCC)
|
||||
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
SET (CMAKE_CXX_FLAGS_INIT "")
|
||||
SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
|
||||
SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os")
|
||||
SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O3")
|
||||
SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
|
|
Loading…
Reference in New Issue