OSF1.cmake 1.76 KB
Newer Older
1 2 3 4 5
SET(CMAKE_DL_LIBS "")

IF(CMAKE_SYSTEM MATCHES "OSF1-1.[012]")
ENDIF(CMAKE_SYSTEM MATCHES "OSF1-1.[012]")
IF(CMAKE_SYSTEM MATCHES "OSF1-1.*")  
6
  # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
7 8 9
  SET(CMAKE_C_COMPILE_OPTIONS_PIC "-fpic")
  SET(CMAKE_C_COMPILE_OPTIONS_PIE "-fpie")
  SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fpic")     # -pic
10 11 12 13 14 15 16 17
  SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fpic")   # -pic
ENDIF(CMAKE_SYSTEM MATCHES "OSF1-1.*")



IF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
  SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-expect_unresolved,\\*")       # -shared
  IF(CMAKE_COMPILER_IS_GNUCXX)
Bill Hoffman's avatar
Bill Hoffman committed
18
    SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,-rpath,")  
19
  ELSE(CMAKE_COMPILER_IS_GNUCXX)
Bill Hoffman's avatar
Bill Hoffman committed
20
    SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-rpath ")
21
  ENDIF(CMAKE_COMPILER_IS_GNUCXX)
Bill Hoffman's avatar
Bill Hoffman committed
22
  IF(CMAKE_COMPILER_IS_GNUCC)
23
    SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")  
Bill Hoffman's avatar
Bill Hoffman committed
24
  ELSE(CMAKE_COMPILER_IS_GNUCC)
25
    SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-rpath ")
Bill Hoffman's avatar
Bill Hoffman committed
26
  ENDIF(CMAKE_COMPILER_IS_GNUCC)
27
  SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
28 29
ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*")

30
SET(CMAKE_MAKE_INCLUDE_FROM_ROOT 1) # include $(CMAKE_BINARY_DIR)/...
31 32 33 34 35 36 37

IF(CMAKE_COMPILER_IS_GNUCXX)
  # include the gcc flags 
ELSE (CMAKE_COMPILER_IS_GNUCXX)
  # use default OSF compiler flags
  SET (CMAKE_C_FLAGS_INIT "")
  SET (CMAKE_C_FLAGS_DEBUG_INIT "-g")
38 39
  SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-O2 -DNDEBUG")
  SET (CMAKE_C_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
40 41 42
  SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2")
  SET (CMAKE_CXX_FLAGS_INIT "")
  SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
43 44
  SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O2 -DNDEBUG")
  SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
45 46
  SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
47
INCLUDE(Platform/UnixPaths)