Skip to content

Commit f22d157

Browse files
committed
chore: Cmake updates for FindBoost policies.
1 parent daf22cf commit f22d157

4 files changed

Lines changed: 23 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ if (POLICY CMP0144)
2121
cmake_policy(SET CMP0144 NEW)
2222
endif ()
2323

24+
# This policy is designed to force a choice between the old behavior of an integrated FindBoost implementation
25+
# and the implementation provided in by boost.
26+
if(POLICY CMP0167)
27+
# Uses the BoostConfig.cmake included with the boost distribution.
28+
cmake_policy(SET CMP0167 NEW)
29+
endif()
30+
31+
2432
option(BUILD_TESTING "Top-level switch for testing. Turn off to disable unit and contract tests." ON)
2533

2634
option(LD_BUILD_SHARED_LIBS "Build the SDKs as shared libraries" OFF)

cmake/launchdarklyConfig.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ if (NOT DEFINED Boost_USE_STATIC_LIBS)
88
endif ()
99
endif ()
1010

11+
# This policy is designed to force a choice between the old behavior of an integrated FindBoost implementation
12+
# and the implementation provided in by boost.
13+
if(POLICY CMP0167)
14+
# Uses the BoostConfig.cmake included with the boost distribution.
15+
cmake_policy(SET CMP0167 NEW)
16+
endif()
17+
1118
find_dependency(Boost 1.81 COMPONENTS json url coroutine)
1219
find_dependency(OpenSSL)
1320
find_dependency(tl-expected)

cmake/rfc3339_timestamp.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ FetchContent_Declare(timestamp
55

66
FetchContent_GetProperties(timestamp)
77
if (NOT timestamp_POPULATED)
8-
FetchContent_Populate(timestamp)
8+
FetchContent_MakeAvailable(timestamp)
99
endif ()
1010

1111
add_library(timestamp OBJECT

vendor/foxy/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ cmake_minimum_required(VERSION 3.13)
1111

1212
set(foxy_minimum_boost_version 1.75)
1313

14+
# This policy is designed to force a choice between the old behavior of an integrated FindBoost implementation
15+
# and the implementation provided in by boost.
16+
if(POLICY CMP0167)
17+
# Uses the BoostConfig.cmake included with the boost distribution.
18+
cmake_policy(SET CMP0167 NEW)
19+
endif()
20+
1421
project(
1522
foxy
1623

0 commit comments

Comments
 (0)