diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2004-09-09 15:50:14 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2004-09-09 15:50:14 (GMT) |
commit | 3708ed4ec8d327faf0ef2b0fe35d7ed53d99afce (patch) | |
tree | ff01fc25ae6ede8eb34a146d7d2bf960af5eb317 /Modules | |
parent | be7722b3682042cf8c49a1c935f27f2040397f59 (diff) | |
download | CMake-3708ed4ec8d327faf0ef2b0fe35d7ed53d99afce.zip CMake-3708ed4ec8d327faf0ef2b0fe35d7ed53d99afce.tar.gz CMake-3708ed4ec8d327faf0ef2b0fe35d7ed53d99afce.tar.bz2 |
try to fix fortran on hp
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Platform/HP-UX.cmake | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/Modules/Platform/HP-UX.cmake b/Modules/Platform/HP-UX.cmake index b66a9eb..76cb677 100644 --- a/Modules/Platform/HP-UX.cmake +++ b/Modules/Platform/HP-UX.cmake @@ -3,6 +3,25 @@ SET(CMAKE_DL_LIBS "-ldld") SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP ":") # : or empty +# fortran +IF(CMAKE_COMPILER_IS_GNUG77) + SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-fPIC") # -pic + SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-shared -Wl,-E -Wl,-b") # -shared + SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "-Wl,+s -Wl,-E") # +s, flag for exe link to use shared lib + SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "-Wl,+b") # -rpath + SET(CMAKE_SHARED_LIBRARY_RUNTIME_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 + "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_FLAGS "-Wl,+s -Wl,-E") # +s, flag for exe link to use shared lib + SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "+b") # -rpath + SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "+h") +ENDIF(CMAKE_COMPILER_IS_GNUG77) # C compiler IF(CMAKE_COMPILER_IS_GNUCC) # gnu gcc @@ -48,6 +67,5 @@ ELSE(CMAKE_COMPILER_IS_GNUCXX) SET (CMAKE_CXX_FLAGS_RELEASE_INIT "+O2 -DNDEBUG") SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g") SET (CMAKE_C_FLAGS_INIT "") - ENDIF(CMAKE_COMPILER_IS_GNUCXX) # set flags for gcc support |