You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

intf_pub_linux.cmake 752 B

4 years ago
4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233
  1. include_guard(GLOBAL)
  2. if (TARGET intf_pub)
  3. return()
  4. endif()
  5. add_library(intf_pub INTERFACE)
  6. target_compile_options(intf_pub INTERFACE
  7. -Wall
  8. -fPIC
  9. $<IF:$<STREQUAL:${CMAKE_SYSTEM_NAME},centos>,-fstack-protector-all,-fstack-protector-strong>
  10. $<$<COMPILE_LANGUAGE:CXX>:-std=c++11>
  11. )
  12. target_compile_definitions(intf_pub INTERFACE
  13. _GLIBCXX_USE_CXX11_ABI=0
  14. $<$<CONFIG:Release>:CFG_BUILD_NDEBUG>
  15. $<$<CONFIG:Debug>:CFG_BUILD_DEBUG>
  16. WIN64=1
  17. LINUX=0
  18. LOG_CPP
  19. )
  20. target_link_options(intf_pub INTERFACE
  21. -Wl,-z,relro
  22. -Wl,-z,now
  23. -Wl,-z,noexecstack
  24. $<$<CONFIG:Release>:-Wl,--build-id=none>
  25. )
  26. target_link_directories(intf_pub INTERFACE
  27. )
  28. target_link_libraries(intf_pub INTERFACE
  29. -lpthread
  30. )