summaryrefslogtreecommitdiffstats
path: root/Tests/VisibilityInlinesHidden/CMakeLists.txt
blob: 8ebc39c756e8db041eadfb7da40f6559a2af3eb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
cmake_minimum_required(VERSION 2.8)

project(VisibilityInlinesHidden)

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
)