Commit 33506705 authored by Robert Maynard's avatar Robert Maynard

Enable CMP0063 as it is needed to properly build in kit mode

Kit mode will build vtk as object libraries, which need to be passed
the correct visibility properties. Because of this, we need to make
sure to only use visibility properties when we have CMake 3.3+
parent 9920f1ad
Pipeline #18351 passed with stage
......@@ -710,8 +710,9 @@ VTK_AUTOINIT(${vtk-module})
# mismatched visibility warnings when building statically since not all
# libraries that VTK builds don't set visibility flags. Until we get a
# time to do that, we skip visibility flags for static libraries.
if(CMAKE_VERSION VERSION_LESS 3.0)
#CMake 3.0 deprecates add_compiler_export_flags
if(CMAKE_VERSION VERSION_LESS 3.3)
#CMake 3.3 deprecates add_compiler_export_flags and also has policy
#CMP0063 which properly propagates visibility flags to OBJECT libs
vtk_add_compiler_export_flags(my_abi_flags)
set_property(TARGET ${vtk-module}${target_suffix} APPEND
PROPERTY COMPILE_FLAGS "${my_abi_flags}")
......
......@@ -13,6 +13,7 @@ foreach(p
CMP0025 # CMake 3.0
CMP0053 # CMake 3.1
CMP0054 # CMake 3.1
CMP0063 # CMake 3.3
)
if(POLICY ${p})
cmake_policy(SET ${p} NEW)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment