2013-05-18 14:12:18 +04:00
|
|
|
|
|
|
|
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
2013-05-23 17:32:17 +04:00
|
|
|
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
|
2013-05-18 14:12:18 +04:00
|
|
|
|
|
|
|
if (CMAKE_CXX_FLAGS MATCHES "-fvisibility=hidden")
|
|
|
|
message(SEND_ERROR "Do not use add_compiler_export_flags before adding this directory")
|
|
|
|
endif()
|
2013-05-23 17:32:17 +04:00
|
|
|
if (CMAKE_CXX_FLAGS MATCHES "-fvisibility-inlines-hidden")
|
|
|
|
message(SEND_ERROR "Do not use add_compiler_export_flags before adding this directory")
|
|
|
|
endif()
|
2013-05-18 14:12:18 +04:00
|
|
|
|
|
|
|
add_library(visibility_preset SHARED visibility_preset.cpp)
|
|
|
|
generate_export_header(visibility_preset)
|
|
|
|
|
|
|
|
add_executable(visibility_preset_exe main.cpp)
|
|
|
|
|
|
|
|
target_link_libraries(visibility_preset_exe visibility_preset)
|