2002-11-08 23:46:08 +03:00
|
|
|
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".sl") # .so
|
2006-04-20 18:23:17 +04:00
|
|
|
SET(CMAKE_DL_LIBS "dld")
|
2006-02-09 23:05:13 +03:00
|
|
|
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".sl" ".so" ".a")
|
2002-11-08 23:46:08 +03:00
|
|
|
|
2004-09-22 22:42:05 +04:00
|
|
|
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") # : or empty
|
2002-11-08 23:46:08 +03:00
|
|
|
|
2004-09-09 19:50:14 +04:00
|
|
|
# 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
|
2004-09-22 22:42:05 +04:00
|
|
|
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,+s -Wl,-E") # +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
|
2004-09-09 19:50:14 +04:00
|
|
|
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
|
2004-09-22 22:42:05 +04:00
|
|
|
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,+s -Wl,-E") # +s, flag for exe link to use shared lib
|
|
|
|
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "+b") # -rpath
|
2004-09-09 19:50:14 +04:00
|
|
|
SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "+h")
|
|
|
|
ENDIF(CMAKE_COMPILER_IS_GNUG77)
|
2002-11-08 23:46:08 +03:00
|
|
|
# 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 -Wl,-b") # -shared
|
2004-09-22 22:42:05 +04:00
|
|
|
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,+s -Wl,-E") # +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
|
2003-12-12 22:44:03 +03:00
|
|
|
SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,+h")
|
2002-11-08 23:46:08 +03:00
|
|
|
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
|
|
|
|
ELSE(CMAKE_COMPILER_IS_GNUCC)
|
|
|
|
# hp cc
|
2002-11-15 00:12:46 +03:00
|
|
|
SET(CMAKE_ANSI_CFLAGS "-Aa -Ae")
|
2002-11-08 23:46:08 +03:00
|
|
|
# use ld directly to create shared libraries for hp cc
|
|
|
|
SET(CMAKE_C_CREATE_SHARED_LIBRARY
|
2003-12-12 22:44:03 +03:00
|
|
|
"ld <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_C_FLAG><TARGET_SONAME> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
|
2002-11-08 23:46:08 +03:00
|
|
|
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "+Z") # -pic
|
|
|
|
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-E -b -L/usr/lib") # -shared
|
2004-09-22 22:42:05 +04:00
|
|
|
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,+s -Wl,-E") # +s, flag for exe link to use shared lib
|
|
|
|
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "+b") # -rpath
|
2003-12-12 22:44:03 +03:00
|
|
|
SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "+h")
|
2002-11-08 23:46:08 +03:00
|
|
|
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 -Wl,-b") # -shared
|
2003-01-24 21:53:21 +03:00
|
|
|
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "-Wl,+s -Wl,-E") # +s, flag for exe link to use shared lib
|
2002-11-08 23:46:08 +03:00
|
|
|
SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,+b") # -rpath
|
|
|
|
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC") # -pic
|
2003-12-12 22:44:03 +03:00
|
|
|
SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,+h")
|
2002-11-08 23:46:08 +03:00
|
|
|
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 -b -L/usr/lib") # -shared
|
2003-01-24 21:53:21 +03:00
|
|
|
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "-Wl,+s -Wl,-E") # +s, flag for exe link to use shared lib
|
2002-11-08 23:46:08 +03:00
|
|
|
SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,+b") # -rpath
|
2003-12-12 22:44:03 +03:00
|
|
|
SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,+h")
|
2002-11-11 20:31:46 +03:00
|
|
|
SET (CMAKE_CXX_FLAGS_INIT "")
|
|
|
|
SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
|
2004-06-01 22:08:04 +04:00
|
|
|
SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "+O3 -DNDEBUG")
|
|
|
|
SET (CMAKE_CXX_FLAGS_RELEASE_INIT "+O2 -DNDEBUG")
|
2002-11-11 20:31:46 +03:00
|
|
|
SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g")
|
|
|
|
SET (CMAKE_C_FLAGS_INIT "")
|
2002-11-08 23:46:08 +03:00
|
|
|
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
2003-11-14 18:44:12 +03:00
|
|
|
# set flags for gcc support
|
2006-03-27 19:46:42 +04:00
|
|
|
INCLUDE(Platform/UnixPaths)
|