OSF1.cmake 1.51 KB
Newer Older
1
set(CMAKE_DL_LIBS "")
2

3
if(CMAKE_SYSTEM MATCHES "OSF1-1.[012]")
4
endif()
5
if(CMAKE_SYSTEM MATCHES "OSF1-1")
6
  # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
7 8 9 10
  set(CMAKE_C_COMPILE_OPTIONS_PIC "-fpic")
  set(CMAKE_C_COMPILE_OPTIONS_PIE "-fpie")
  set(CMAKE_SHARED_LIBRARY_C_FLAGS "-fpic")     # -pic
  set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fpic")   # -pic
11
endif()
12 13 14



15
if(CMAKE_SYSTEM MATCHES "OSF1-V")
16 17 18
  set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-expect_unresolved,\\*")       # -shared
  if(CMAKE_COMPILER_IS_GNUCXX)
    set(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,-rpath,")
19
  else()
20
    set(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-rpath ")
21
  endif()
22 23
  if(CMAKE_COMPILER_IS_GNUCC)
    set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
24
  else()
25
    set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-rpath ")
26
  endif()
27
  set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
28
endif()
29

30
set(CMAKE_MAKE_INCLUDE_FROM_ROOT 1) # include $(CMAKE_BINARY_DIR)/...
31

32
if(CMAKE_COMPILER_IS_GNUCXX)
33
  # include the gcc flags
34
else ()
35
  # use default OSF compiler flags
36 37 38 39 40 41 42 43 44 45
  set (CMAKE_C_FLAGS_INIT "")
  set (CMAKE_C_FLAGS_DEBUG_INIT "-g")
  set (CMAKE_C_FLAGS_MINSIZEREL_INIT "-O2 -DNDEBUG")
  set (CMAKE_C_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
  set (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2")
  set (CMAKE_CXX_FLAGS_INIT "")
  set (CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
  set (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O2 -DNDEBUG")
  set (CMAKE_CXX_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
  set (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2")
46
endif()
47
include(Platform/UnixPaths)