summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/HP-UX.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-03-02 22:24:36 (GMT)
committerBrad King <brad.king@kitware.com>2011-03-02 22:24:36 (GMT)
commit5f0a25955faaa40b65eba072bd4a87e40dd82297 (patch)
treeb295b0e7dfcbccd924fa5057622050c5d744845b /Modules/Platform/HP-UX.cmake
parentf72cc88c659d586cc65ac47e7807054345ccad89 (diff)
downloadCMake-5f0a25955faaa40b65eba072bd4a87e40dd82297.zip
CMake-5f0a25955faaa40b65eba072bd4a87e40dd82297.tar.gz
CMake-5f0a25955faaa40b65eba072bd4a87e40dd82297.tar.bz2
Factor HP compiler flags into per-platform/per-compiler files
Move HP flags out of Platform/HP-UX.cmake into platform-specific compiler information files "Platform/HP-UX-HP-<lang>.cmake". Factor common values into "Platform/HP-UX-HP.cmake" and load it from the per-language files.
Diffstat (limited to 'Modules/Platform/HP-UX.cmake')
-rw-r--r--Modules/Platform/HP-UX.cmake65
1 files changed, 0 insertions, 65 deletions
diff --git a/Modules/Platform/HP-UX.cmake b/Modules/Platform/HP-UX.cmake
index 9d357c9..ab3dc22 100644
--- a/Modules/Platform/HP-UX.cmake
+++ b/Modules/Platform/HP-UX.cmake
@@ -15,57 +15,6 @@ SET(CMAKE_LINK_DEPENDENT_LIBRARY_DIRS 1)
# specifying the file path.
SET(CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME 1)
-# fortran
-IF(CMAKE_COMPILER_IS_GNUG77)
-ELSE(CMAKE_COMPILER_IS_GNUG77)
- # use ld directly to create shared libraries for hp cc
- SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY
- "ld <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG><TARGET_SONAME> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
- SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "+Z") # -pic
- SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-E -b -L/usr/lib") # -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 "+b") # -rpath
- SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ":") # : or empty
- SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "+h")
- SET(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG "-Wl,+b") # -rpath
-ENDIF(CMAKE_COMPILER_IS_GNUG77)
-
-# C compiler
-IF(CMAKE_COMPILER_IS_GNUCC)
-ELSE(CMAKE_COMPILER_IS_GNUCC)
- # hp cc
- # use ld directly to create shared libraries for hp cc
- SET(CMAKE_C_CREATE_SHARED_LIBRARY
- "ld <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_C_FLAG><TARGET_SONAME> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
- SET(CMAKE_SHARED_LIBRARY_C_FLAGS "+Z") # -pic
- SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-E -b +nodefaultrpath -L/usr/lib") # -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 "+b") # -rpath
- SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") # : or empty
- SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "+h")
- SET(CMAKE_EXECUTABLE_RUNTIME_C_FLAG "-Wl,+b") # -rpath
- SET(CMAKE_C_FLAGS_INIT "")
- SET(CMAKE_C_COMPILE_OBJECT
- "<CMAKE_C_COMPILER> <DEFINES> -Aa -Ae <FLAGS> -o <OBJECT> -c <SOURCE>")
-ENDIF(CMAKE_COMPILER_IS_GNUCC)
-
-# CXX compiler
-IF(CMAKE_COMPILER_IS_GNUCXX)
-ELSE(CMAKE_COMPILER_IS_GNUCXX)
- # for hp aCC
- SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "+Z") # -pic
- SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "+Z -Wl,-E,+nodefaultrpath -b -L/usr/lib") # -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_SONAME_CXX_FLAG "-Wl,+h")
- SET(CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG "-Wl,+b") # -rpath
- SET (CMAKE_CXX_FLAGS_INIT "")
- SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
- SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "+O3 -DNDEBUG")
- SET (CMAKE_CXX_FLAGS_RELEASE_INIT "+O2 -DNDEBUG")
- SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g")
-ENDIF(CMAKE_COMPILER_IS_GNUCXX)
# set flags for gcc support
INCLUDE(Platform/UnixPaths)
@@ -81,20 +30,6 @@ LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH /usr/lib/hpux64)
LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
/usr/lib/hpux32 /usr/lib/hpux64)
-IF(NOT CMAKE_COMPILER_IS_GNUCC)
- 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>")
-ENDIF(NOT CMAKE_COMPILER_IS_GNUCC)
-
-IF(NOT CMAKE_COMPILER_IS_GNUCXX)
- 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>"
- "mv `basename \"<SOURCE>\" | sed 's/\\.[^./]*$$//'`.s <ASSEMBLY_SOURCE>"
- "rm -f `basename \"<SOURCE>\" | sed 's/\\.[^./]*$$//'`.o"
- )
-ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
-
# Initialize C and CXX 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