Split GNU compiler information files
This moves GNU compiler flags into new-style modules Compiler/GNU-<lang>.cmake Platform/<os>-GNU-<lang>.cmake We use language-independent helper modules Compiler/GNU.cmake Platform/<os>-GNU.cmake to define macros consolidating the information.
This commit is contained in:
parent
f3cd66577f
commit
e28c16b482
|
@ -88,6 +88,3 @@ MARK_AS_ADVANCED(
|
|||
CMAKE_SKIP_RPATH
|
||||
CMAKE_VERBOSE_MAKEFILE
|
||||
)
|
||||
|
||||
# always include the gcc compiler information
|
||||
INCLUDE(Platform/gcc)
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
SET(CMAKE_C_VERBOSE_FLAG "-v")
|
||||
include(Compiler/GNU)
|
||||
__compiler_gnu(C)
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
SET(CMAKE_CXX_VERBOSE_FLAG "-v")
|
||||
include(Compiler/GNU)
|
||||
__compiler_gnu(CXX)
|
||||
|
|
|
@ -1 +1,14 @@
|
|||
SET(CMAKE_Fortran_VERBOSE_FLAG "-v")
|
||||
include(Compiler/GNU)
|
||||
__compiler_gnu(Fortran)
|
||||
|
||||
# No -DNDEBUG for Fortran.
|
||||
SET(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os")
|
||||
SET(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3")
|
||||
|
||||
# We require updates to CMake C++ code to support preprocessing rules
|
||||
# for Fortran.
|
||||
SET(CMAKE_Fortran_CREATE_PREPROCESSED_SOURCE)
|
||||
SET(CMAKE_Fortran_CREATE_ASSEMBLY_SOURCE)
|
||||
|
||||
# Fortran-specific feature flags.
|
||||
SET(CMAKE_Fortran_MODDIR_FLAG -J)
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
|
||||
#=============================================================================
|
||||
# Copyright 2002-2009 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 distributed 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(__COMPILER_GNU)
|
||||
return()
|
||||
endif()
|
||||
set(__COMPILER_GNU 1)
|
||||
|
||||
macro(__compiler_gnu lang)
|
||||
# Feature flags.
|
||||
set(CMAKE_${lang}_VERBOSE_FLAG "-v")
|
||||
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC")
|
||||
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared")
|
||||
|
||||
# Initial configuration flags.
|
||||
set(CMAKE_${lang}_FLAGS_INIT "")
|
||||
set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g")
|
||||
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
|
||||
set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
|
||||
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
|
||||
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
||||
set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
|
||||
if(NOT APPLE)
|
||||
set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ")
|
||||
endif(NOT APPLE)
|
||||
endmacro()
|
|
@ -0,0 +1,2 @@
|
|||
include(Platform/AIX-GNU)
|
||||
__aix_compiler_gnu(C)
|
|
@ -0,0 +1,2 @@
|
|||
include(Platform/AIX-GNU)
|
||||
__aix_compiler_gnu(CXX)
|
|
@ -0,0 +1,2 @@
|
|||
include(Platform/AIX-GNU)
|
||||
__aix_compiler_gnu(Fortran)
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
#=============================================================================
|
||||
# Copyright 2002-2009 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 distributed 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_GNU)
|
||||
return()
|
||||
endif()
|
||||
set(__AIX_COMPILER_GNU 1)
|
||||
|
||||
macro(__aix_compiler_gnu lang)
|
||||
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS} -Wl,-G")
|
||||
endmacro()
|
|
@ -15,16 +15,6 @@ SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
|
|||
# Files named "libfoo.a" may actually be shared libraries.
|
||||
SET_PROPERTY(GLOBAL PROPERTY TARGET_ARCHIVES_MAY_BE_SHARED_LIBS 1)
|
||||
|
||||
# CXX Compiler
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared -Wl,-G") # -shared
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
# C Compiler
|
||||
IF(CMAKE_COMPILER_IS_GNUCC)
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-G") # -shared
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCC)
|
||||
|
||||
# since .a can be a static or shared library on AIX, we can not do this.
|
||||
# at some point if we wanted it, we would have to figure out if a .a is
|
||||
# static or shared, then we could add this back:
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
SET(BEOS 1)
|
||||
|
||||
# GCC is the default compiler on BeOS.
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
|
||||
|
||||
SET(CMAKE_DL_LIBS root be)
|
||||
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-nostart")
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
include(Platform/CYGWIN-GNU)
|
||||
__cygwin_compiler_gnu(C)
|
|
@ -0,0 +1,2 @@
|
|||
include(Platform/CYGWIN-GNU)
|
||||
__cygwin_compiler_gnu(CXX)
|
|
@ -0,0 +1,2 @@
|
|||
include(Platform/CYGWIN-GNU)
|
||||
__cygwin_compiler_gnu(Fortran)
|
|
@ -0,0 +1,51 @@
|
|||
|
||||
#=============================================================================
|
||||
# Copyright 2002-2009 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 distributed 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(__CYGWIN_COMPILER_GNU)
|
||||
return()
|
||||
endif()
|
||||
set(__CYGWIN_COMPILER_GNU 1)
|
||||
|
||||
set(CMAKE_DL_LIBS "-lgdi32" )
|
||||
set(CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,--enable-auto-import")
|
||||
set(CMAKE_CREATE_WIN32_EXE "-mwindows")
|
||||
|
||||
set(CMAKE_GNULD_IMAGE_VERSION
|
||||
"-Wl,--major-image-version,<TARGET_VERSION_MAJOR>,--minor-image-version,<TARGET_VERSION_MINOR>")
|
||||
|
||||
macro(__cygwin_compiler_gnu lang)
|
||||
# Binary link rules.
|
||||
set(CMAKE_${lang}_CREATE_SHARED_MODULE
|
||||
"<CMAKE_${lang}_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_MODULE_${lang}_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS> -o <TARGET> ${CMAKE_GNULD_IMAGE_VERSION} <OBJECTS> <LINK_LIBRARIES>")
|
||||
set(CMAKE_${lang}_CREATE_SHARED_LIBRARY
|
||||
"<CMAKE_${lang}_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_${lang}_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS> -o <TARGET> -Wl,--out-implib,<TARGET_IMPLIB> ${CMAKE_GNULD_IMAGE_VERSION} <OBJECTS> <LINK_LIBRARIES>")
|
||||
set(CMAKE_${lang}_LINK_EXECUTABLE
|
||||
"<CMAKE_${lang}_COMPILER> <FLAGS> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> -Wl,--out-implib,<TARGET_IMPLIB> ${CMAKE_GNULD_IMAGE_VERSION} <LINK_LIBRARIES>")
|
||||
|
||||
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "") # No -fPIC on cygwin
|
||||
|
||||
# Initialize C link type selection flags. These flags are used when
|
||||
# building a shared library, shared module, or executable that links
|
||||
# to other libraries to select whether to use the static or shared
|
||||
# versions of the libraries.
|
||||
FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
|
||||
SET(CMAKE_${type}_LINK_STATIC_${lang}_FLAGS "-Wl,-Bstatic")
|
||||
SET(CMAKE_${type}_LINK_DYNAMIC_${lang}_FLAGS "-Wl,-Bdynamic")
|
||||
ENDFOREACH(type)
|
||||
|
||||
# To simulate UNIX shared libs we export/import all DLL symbols.
|
||||
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS} -Wl,--export-all-symbols -Wl,--enable-auto-import")
|
||||
set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS}")
|
||||
endmacro()
|
|
@ -1,6 +0,0 @@
|
|||
SET(CMAKE_SHARED_LIBRARY_PREFIX "lib")
|
||||
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dll")
|
||||
SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "")
|
||||
SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "")
|
||||
SET(CMAKE_EXECUTABLE_SUFFIX ".exe") # .exe
|
||||
INCLUDE(Platform/g77)
|
|
@ -1,55 +1,20 @@
|
|||
SET(WIN32 1)
|
||||
SET(CYGWIN 1)
|
||||
|
||||
SET(CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,--enable-auto-import")
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,--export-all-symbols -Wl,--enable-auto-import")
|
||||
SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
|
||||
SET(CMAKE_DL_LIBS "-lgdi32" )
|
||||
SET(CMAKE_SHARED_LIBRARY_PREFIX "cyg")
|
||||
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dll")
|
||||
SET(CMAKE_SHARED_MODULE_PREFIX "lib")
|
||||
SET(CMAKE_SHARED_MODULE_SUFFIX ".dll")
|
||||
SET(CMAKE_IMPORT_LIBRARY_PREFIX "lib")
|
||||
SET(CMAKE_IMPORT_LIBRARY_SUFFIX ".dll.a")
|
||||
# no pic for gcc on cygwin
|
||||
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "")
|
||||
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "")
|
||||
SET(CMAKE_EXECUTABLE_SUFFIX ".exe") # .exe
|
||||
SET(CMAKE_CREATE_WIN32_EXE "-mwindows")
|
||||
# Modules have a different default prefix that shared libs.
|
||||
SET(CMAKE_MODULE_EXISTS 1)
|
||||
|
||||
SET(CMAKE_FIND_LIBRARY_PREFIXES "cyg" "lib")
|
||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dll" ".dll.a" ".a")
|
||||
|
||||
SET(CMAKE_GNULD_IMAGE_VERSION
|
||||
"-Wl,--major-image-version,<TARGET_VERSION_MAJOR>,--minor-image-version,<TARGET_VERSION_MINOR>")
|
||||
|
||||
SET(CMAKE_C_CREATE_SHARED_MODULE
|
||||
"<CMAKE_C_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_MODULE_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_MODULE_CREATE_C_FLAGS> -o <TARGET> ${CMAKE_GNULD_IMAGE_VERSION} <OBJECTS> <LINK_LIBRARIES>")
|
||||
SET(CMAKE_CXX_CREATE_SHARED_MODULE
|
||||
"<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_MODULE_CXX_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS> -o <TARGET> ${CMAKE_GNULD_IMAGE_VERSION} <OBJECTS> <LINK_LIBRARIES>")
|
||||
|
||||
SET(CMAKE_C_CREATE_SHARED_LIBRARY
|
||||
"<CMAKE_C_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> -Wl,--out-implib,<TARGET_IMPLIB> ${CMAKE_GNULD_IMAGE_VERSION} <OBJECTS> <LINK_LIBRARIES>")
|
||||
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
|
||||
"<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> -o <TARGET> -Wl,--out-implib,<TARGET_IMPLIB> ${CMAKE_GNULD_IMAGE_VERSION} <OBJECTS> <LINK_LIBRARIES>")
|
||||
|
||||
SET(CMAKE_C_LINK_EXECUTABLE
|
||||
"<CMAKE_C_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> -Wl,--out-implib,<TARGET_IMPLIB> ${CMAKE_GNULD_IMAGE_VERSION} <LINK_LIBRARIES>")
|
||||
SET(CMAKE_CXX_LINK_EXECUTABLE
|
||||
"<CMAKE_CXX_COMPILER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> -Wl,--out-implib,<TARGET_IMPLIB> ${CMAKE_GNULD_IMAGE_VERSION} <LINK_LIBRARIES>")
|
||||
|
||||
# Shared libraries on cygwin can be named with their version number.
|
||||
SET(CMAKE_SHARED_LIBRARY_NAME_WITH_VERSION 1)
|
||||
|
||||
# Initialize C link type selection flags. These flags are used when
|
||||
# building a shared library, shared module, or executable that links
|
||||
# to other libraries to select whether to use the static or shared
|
||||
# versions of the libraries.
|
||||
FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
|
||||
SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic")
|
||||
SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic")
|
||||
ENDFOREACH(type)
|
||||
|
||||
INCLUDE(Platform/UnixPaths)
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
include(Platform/HP-UX-GNU)
|
||||
__hpux_compiler_gnu(C)
|
|
@ -0,0 +1,2 @@
|
|||
include(Platform/HP-UX-GNU)
|
||||
__hpux_compiler_gnu(CXX)
|
|
@ -0,0 +1,2 @@
|
|||
include(Platform/HP-UX-GNU)
|
||||
__hpux_compiler_gnu(Fortran)
|
|
@ -0,0 +1,27 @@
|
|||
|
||||
#=============================================================================
|
||||
# Copyright 2002-2009 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 distributed 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(__HPUX_COMPILER_GNU)
|
||||
return()
|
||||
endif()
|
||||
set(__HPUX_COMPILER_GNU 1)
|
||||
|
||||
macro(__hpux_compiler_gnu lang)
|
||||
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS} -Wl,-E,-b,+nodefaultrpath")
|
||||
set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,+s,-E,+nodefaultrpath")
|
||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,+b")
|
||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":")
|
||||
set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,+h")
|
||||
endmacro()
|
|
@ -15,13 +15,6 @@ SET(CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME 1)
|
|||
|
||||
# fortran
|
||||
IF(CMAKE_COMPILER_IS_GNUG77)
|
||||
SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-fPIC") # -pic
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-shared -Wl,-E,-b,+nodefaultrpath") # -shared
|
||||
SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-Wl,+s,-E,+nodefaultrpath") # +s, flag for exe link to use shared lib
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG "-Wl,+b") # -rpath
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ":") # : or empty
|
||||
SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-Wl,+h")
|
||||
SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-fPIC") # -pic
|
||||
ELSE(CMAKE_COMPILER_IS_GNUG77)
|
||||
# use ld directly to create shared libraries for hp cc
|
||||
SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY
|
||||
|
@ -37,14 +30,6 @@ ENDIF(CMAKE_COMPILER_IS_GNUG77)
|
|||
|
||||
# C compiler
|
||||
IF(CMAKE_COMPILER_IS_GNUCC)
|
||||
# gnu gcc
|
||||
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-E,-b,+nodefaultrpath") # -shared
|
||||
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,+s,-E,+nodefaultrpath") # +s, flag for exe link to use shared lib
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,+b") # -rpath
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") # : or empty
|
||||
SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,+h")
|
||||
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
|
||||
ELSE(CMAKE_COMPILER_IS_GNUCC)
|
||||
# hp cc
|
||||
# use ld directly to create shared libraries for hp cc
|
||||
|
@ -64,14 +49,6 @@ ENDIF(CMAKE_COMPILER_IS_GNUCC)
|
|||
|
||||
# CXX compiler
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
# for gnu C++
|
||||
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC") # -pic
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared -Wl,-E,-b,+nodefaultrpath") # -shared
|
||||
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "-Wl,+s,-E,+nodefaultrpath") # +s, flag for exe link to use shared lib
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,+b") # -rpath
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ":") # : or empty
|
||||
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC") # -pic
|
||||
SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,+h")
|
||||
ELSE(CMAKE_COMPILER_IS_GNUCXX)
|
||||
# for hp aCC
|
||||
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "+Z") # -pic
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
SET(BEOS 1)
|
||||
|
||||
# GCC is the default compiler on Haiku.
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
|
||||
|
||||
SET(CMAKE_DL_LIBS root be)
|
||||
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-nostart")
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
SET(CMAKE_Fortran_MODDIR_FLAG -J)
|
||||
SET (CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-fPIC") # -pic
|
||||
SET (CMAKE_Fortran_FLAGS_INIT "")
|
||||
SET (CMAKE_Fortran_FLAGS_DEBUG_INIT "-g")
|
||||
SET (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os")
|
||||
SET (CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3")
|
||||
SET (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
|
||||
|
||||
IF(NOT APPLE)
|
||||
SET (CMAKE_INCLUDE_SYSTEM_FLAG_Fortran "-isystem ")
|
||||
ENDIF(NOT APPLE)
|
||||
|
||||
# These will require updates to CMake C++ code to support
|
||||
# preprocessing rules for Fortran.
|
||||
#SET (CMAKE_Fortran_CREATE_PREPROCESSED_SOURCE "<CMAKE_Fortran_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
||||
#SET (CMAKE_Fortran_CREATE_ASSEMBLY_SOURCE "<CMAKE_Fortran_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
|
|
@ -58,5 +58,3 @@ INCLUDE(Platform/UnixPaths)
|
|||
IF(EXISTS "/etc/debian_version")
|
||||
SET_PROPERTY(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE)
|
||||
ENDIF(EXISTS "/etc/debian_version")
|
||||
# always include the gcc compiler information
|
||||
INCLUDE(Platform/gcc)
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
SET(QNXNTO 1)
|
||||
|
||||
# GCC is the default compiler on QNX 6.3.
|
||||
INCLUDE(Platform/gcc)
|
||||
|
||||
# The QNX GCC does not seem to have -isystem so remove the flag.
|
||||
SET(CMAKE_INCLUDE_SYSTEM_FLAG_C)
|
||||
SET(CMAKE_INCLUDE_SYSTEM_FLAG_CXX)
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
include(Platform/SunOS-GNU)
|
||||
__sunos_compiler_gnu(Fortran)
|
|
@ -0,0 +1,2 @@
|
|||
include(Platform/SunOS-GNU)
|
||||
__sunos_compiler_gnu(CXX)
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
#=============================================================================
|
||||
# Copyright 2002-2009 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 distributed 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(__SUNOS_COMPILER_GNU)
|
||||
return()
|
||||
endif()
|
||||
set(__SUNOS_COMPILER_GNU 1)
|
||||
|
||||
macro(__sunos_compiler_gnu lang)
|
||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-R")
|
||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":")
|
||||
set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,-h")
|
||||
endmacro()
|
|
@ -5,23 +5,6 @@ IF(CMAKE_SYSTEM MATCHES "SunOS-4.*")
|
|||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
|
||||
ENDIF(CMAKE_SYSTEM MATCHES "SunOS-4.*")
|
||||
|
||||
IF(CMAKE_SYSTEM MATCHES "SunOS-5.*")
|
||||
IF(CMAKE_COMPILER_IS_GNUCC)
|
||||
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared")
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-R")
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
|
||||
SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-h")
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCC)
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC")
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared")
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,-R")
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ":")
|
||||
SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-h")
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
ENDIF(CMAKE_SYSTEM MATCHES "SunOS-5.*")
|
||||
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
IF(CMAKE_COMPILER_IS_GNUCC)
|
||||
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
IF(CMAKE_COMPILER_IS_GNUG77)
|
||||
SET (CMAKE_Fortran_FLAGS_INIT "")
|
||||
SET (CMAKE_Fortran_FLAGS_DEBUG_INIT "-g")
|
||||
SET (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
|
||||
SET (CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
|
||||
SET (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUG77)
|
|
@ -1,27 +0,0 @@
|
|||
IF(CMAKE_COMPILER_IS_GNUCC)
|
||||
SET (CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
|
||||
SET (CMAKE_C_FLAGS_INIT "")
|
||||
SET (CMAKE_C_FLAGS_DEBUG_INIT "-g")
|
||||
SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
|
||||
SET (CMAKE_C_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
|
||||
SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
|
||||
SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
||||
SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
|
||||
IF(NOT APPLE)
|
||||
SET (CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem ")
|
||||
ENDIF(NOT APPLE)
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCC)
|
||||
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
SET (CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC") # -pic
|
||||
SET (CMAKE_CXX_FLAGS_INIT "")
|
||||
SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
|
||||
SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
|
||||
SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
|
||||
SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
|
||||
SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
||||
SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
|
||||
IF(NOT APPLE)
|
||||
SET (CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ")
|
||||
ENDIF(NOT APPLE)
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
Loading…
Reference in New Issue