STYLE: Nightly Version update
[cmake.git] / Modules / Platform / HP-UX.cmake
blobb2b9e03ef90188c697a4a5e8325a65358e845e39
1 SET(CMAKE_SHARED_LIBRARY_SUFFIX ".sl")          # .so
2 SET(CMAKE_DL_LIBS "-ldld")
4 SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")   # : or empty
6 # fortran
7 IF(CMAKE_COMPILER_IS_GNUG77)
8   SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-fPIC")            # -pic 
9   SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-shared -Wl,-E -Wl,-b")       # -shared
10   SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,+s -Wl,-E")  # +s, flag for exe link to use shared lib
11   SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,+b")       # -rpath
12   SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")   # : or empty
13   SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-Wl,+h")
14   SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-fPIC")     # -pic 
15 ELSE(CMAKE_COMPILER_IS_GNUG77)
16   # use ld directly to create shared libraries for hp cc
17   SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY
18       "ld <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG><TARGET_SONAME> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
19   SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "+Z")            # -pic 
20   SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-E -b -L/usr/lib")       # -shared
21   SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,+s -Wl,-E")  # +s, flag for exe link to use shared lib
22   SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "+b")       # -rpath
23   SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "+h")
24 ENDIF(CMAKE_COMPILER_IS_GNUG77)
25 # C compiler
26 IF(CMAKE_COMPILER_IS_GNUCC)
27   # gnu gcc
28   SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")            # -pic 
29   SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-E -Wl,-b")       # -shared
30   SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,+s -Wl,-E")  # +s, flag for exe link to use shared lib
31   SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,+b")       # -rpath
32   SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")   # : or empty
33   SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,+h")
34   SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")     # -pic 
35 ELSE(CMAKE_COMPILER_IS_GNUCC)
36   # hp cc
37   SET(CMAKE_ANSI_CFLAGS "-Aa -Ae")
38   # use ld directly to create shared libraries for hp cc
39   SET(CMAKE_C_CREATE_SHARED_LIBRARY
40       "ld <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_C_FLAG><TARGET_SONAME> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
41   SET(CMAKE_SHARED_LIBRARY_C_FLAGS "+Z")            # -pic 
42   SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-E -b -L/usr/lib")       # -shared
43   SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,+s -Wl,-E")  # +s, flag for exe link to use shared lib
44   SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "+b")       # -rpath
45   SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "+h")
46 ENDIF(CMAKE_COMPILER_IS_GNUCC)
48 # CXX compiler
49 IF(CMAKE_COMPILER_IS_GNUCXX) 
50   # for gnu C++
51   SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC")            # -pic 
52   SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared -Wl,-E -Wl,-b")       # -shared
53   SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "-Wl,+s -Wl,-E")  # +s, flag for exe link to use shared lib
54   SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,+b")       # -rpath
55   SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC")     # -pic 
56   SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,+h")
57 ELSE(CMAKE_COMPILER_IS_GNUCXX)
58   # for hp aCC
59   SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "+Z")            # -pic 
60   SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "+Z -Wl,-E -b -L/usr/lib")       # -shared
61   SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "-Wl,+s -Wl,-E")  # +s, flag for exe link to use shared lib
62   SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,+b")       # -rpath
63   SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,+h")
64   SET (CMAKE_CXX_FLAGS_INIT "")
65   SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
66   SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "+O3 -DNDEBUG")
67   SET (CMAKE_CXX_FLAGS_RELEASE_INIT "+O2 -DNDEBUG")
68   SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g")
69   SET (CMAKE_C_FLAGS_INIT "")
70 ENDIF(CMAKE_COMPILER_IS_GNUCXX)
71 # set flags for gcc support