Skip to content

Commit b71794a

Browse files
authored
Merge pull request #1200 from jan-cerny/issue1188
Check if CMake policy CMP0063 is defined
2 parents 9537734 + 7c4ff00 commit b71794a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,11 @@ include_directories(
464464

465465
# Honor visibility properties for all target types
466466
# Run "cmake --help-policy CMP0063" for policy details
467-
cmake_policy(SET CMP0063 NEW)
467+
if (POLICY CMP0063)
468+
cmake_policy(SET CMP0063 NEW)
469+
else()
470+
message(WARNING "It is not possible to correctly set symbol visibility in object files with your version of CMake. We recommend using CMake 3.3 or newer.")
471+
endif()
468472

469473
function(set_oscap_generic_properties TARGET_OBJECT)
470474
set_target_properties(${TARGET_OBJECT} PROPERTIES

0 commit comments

Comments
 (0)