OSF1.cmake 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. set(CMAKE_DL_LIBS "")
  2. if(CMAKE_SYSTEM MATCHES "OSF1-1.[012]")
  3. endif()
  4. if(CMAKE_SYSTEM MATCHES "OSF1-1")
  5. # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
  6. set(CMAKE_C_COMPILE_OPTIONS_PIC "-fpic")
  7. set(CMAKE_C_COMPILE_OPTIONS_PIE "-fpie")
  8. set(CMAKE_SHARED_LIBRARY_C_FLAGS "-fpic") # -pic
  9. set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fpic") # -pic
  10. endif()
  11. if(CMAKE_SYSTEM MATCHES "OSF1-V")
  12. set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-expect_unresolved,\\*") # -shared
  13. if(CMAKE_COMPILER_IS_GNUCXX)
  14. set(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,-rpath,")
  15. else()
  16. set(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-rpath ")
  17. endif()
  18. if(CMAKE_COMPILER_IS_GNUCC)
  19. set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
  20. else()
  21. set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-rpath ")
  22. endif()
  23. set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
  24. endif()
  25. set(CMAKE_MAKE_INCLUDE_FROM_ROOT 1) # include $(CMAKE_BINARY_DIR)/...
  26. if(CMAKE_COMPILER_IS_GNUCXX)
  27. # include the gcc flags
  28. else ()
  29. # use default OSF compiler flags
  30. set (CMAKE_C_FLAGS_INIT "")
  31. set (CMAKE_C_FLAGS_DEBUG_INIT "-g")
  32. set (CMAKE_C_FLAGS_MINSIZEREL_INIT "-O2 -DNDEBUG")
  33. set (CMAKE_C_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
  34. set (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2")
  35. set (CMAKE_CXX_FLAGS_INIT "")
  36. set (CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
  37. set (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O2 -DNDEBUG")
  38. set (CMAKE_CXX_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
  39. set (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2")
  40. endif()
  41. include(Platform/UnixPaths)