summaryrefslogtreecommitdiffstats
path: root/Tests/Visibility/CMakeLists.txt
blob: df756300f8425c37ec1ec1da4d89c2138269b30e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
cmake_minimum_required(VERSION 3.2)
project(Visibility)

add_library(inlines_hidden SHARED foo.cpp bar.c)
set_property(TARGET inlines_hidden PROPERTY VISIBILITY_INLINES_HIDDEN ON)
target_compile_options(inlines_hidden PRIVATE -Werror)

add_custom_command(TARGET inlines_hidden POST_BUILD
  COMMAND ${CMAKE_COMMAND}
    -DCMAKE_NM=${CMAKE_NM}
    -DTEST_LIBRARY_PATH=$<TARGET_FILE:inlines_hidden>
    -P ${CMAKE_CURRENT_SOURCE_DIR}/verify.cmake
)