summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/VisibilityPreset/CMP0063-WARN-obj.cmake
blob: 81d1c339bd54fac2905b2622173135034c5cd855 (plain)
1
2
3
4
5
6
7
8
9
10
11

enable_language(CXX)

# Ensure CMake warns even if toolchain does not really have these flags.
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY "-fvisibility=")

set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)

add_library(myobject OBJECT lib.cpp)