Skip to content

Commit

Permalink
cmake: Set CMP0069 policy to new for external dependencies
Browse files Browse the repository at this point in the history
* This enables LTO also when building external dependencies that do not
  handle CMP0069 in their CMake scripts.
  • Loading branch information
MajorP93 committed Dec 4, 2024
1 parent 8251b07 commit 42d9acc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions externals/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ set_directory_properties(PROPERTIES
SYSTEM ON
)

# Set CMP0069 policy to "NEW" in order to ensure consistent behavior when building external targets with LTO enabled
cmake_policy(SET CMP0069 NEW)

if (MSVC)
# Silence "deprecation" warnings
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS)
Expand Down

0 comments on commit 42d9acc

Please sign in to comment.