summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/HP-UX-HP-C.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-HP-C.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-HP-C.cmake')
-rw-r--r--Modules/Platform/HP-UX-HP-C.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/Modules/Platform/HP-UX-HP-C.cmake b/Modules/Platform/HP-UX-HP-C.cmake
new file mode 100644
index 0000000..d83e01b
--- /dev/null
+++ b/Modules/Platform/HP-UX-HP-C.cmake
@@ -0,0 +1,11 @@
+include(Platform/HP-UX-HP)
+__hpux_compiler_hp(C)
+
+set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-E -b +nodefaultrpath -L/usr/lib")
+
+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>")
+set(CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> -Aa -Ae <FLAGS> -o <OBJECT> -c <SOURCE>")
+
+# 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>")