diff --git a/.github/actions/install-boost/action.yml b/.github/actions/install-boost/action.yml index 848d7ffe8..6f918936d 100644 --- a/.github/actions/install-boost/action.yml +++ b/.github/actions/install-boost/action.yml @@ -14,6 +14,9 @@ outputs: BOOST_ROOT: description: The location of the installed boost. value: ${{ steps.determine-root.outputs.BOOST_ROOT }} + Boost_DIR: + description: Location of cmake support for boost. + value: ${{ steps.boost-download.outputs.Boost_DIR }} runs: using: composite steps: @@ -33,6 +36,7 @@ runs: run: | choco install boost-msvc-14.3 --version 1.87.0 -y --no-progress echo "BOOST_ROOT=C:\local\boost_1_87_0" >> $GITHUB_OUTPUT + echo "Boost_DIR=C:\local\boost_1_87_0\lib64-msvc-14.3\cmake\Boost-1.87.0" >> $GITHUB_OUTPUT - name: Install boost using homebrew id: brew-action diff --git a/.github/actions/install-openssl/action.yml b/.github/actions/install-openssl/action.yml index 544ea40cf..6d10d813f 100644 --- a/.github/actions/install-openssl/action.yml +++ b/.github/actions/install-openssl/action.yml @@ -32,7 +32,7 @@ runs: if: runner.os == 'Windows' shell: bash run: | - choco install openssl --version 3.5.3 -y --no-progress + choco install openssl --version 3.5.4 -y --no-progress if [ -d "C:\Program Files\OpenSSL-Win64" ]; then echo "OPENSSL_ROOT_DIR=C:\Program Files\OpenSSL-Win64" >> $GITHUB_OUTPUT else diff --git a/.github/actions/sdk-release/action.yml b/.github/actions/sdk-release/action.yml index b1da9ced4..4be6dd782 100644 --- a/.github/actions/sdk-release/action.yml +++ b/.github/actions/sdk-release/action.yml @@ -100,6 +100,7 @@ runs: if: runner.os == 'Windows' shell: bash env: + Boost_DIR: ${{ steps.install-boost.outputs.Boost_DIR }} BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} OPENSSL_ROOT_DIR: ${{ steps.install-openssl.outputs.OPENSSL_ROOT_DIR }} run: ./scripts/build-release-windows.sh ${{ inputs.sdk_cmake_target }} diff --git a/.github/workflows/hello-apps.yml b/.github/workflows/hello-apps.yml index 4b76149aa..1761f05c4 100644 --- a/.github/workflows/hello-apps.yml +++ b/.github/workflows/hello-apps.yml @@ -34,7 +34,8 @@ jobs: run: ./scripts/run-hello-apps.sh static hello-c-client hello-cpp-client hello-c-server hello-cpp-server env: BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} - OPENSSL_ROOT_DIR: ${{ steps.install-openssl.outputs.OPENSSL_ROOT_DIR }} + Boost_DIR: ${{ steps.install-boost.outputs.Boost_DIR }} + - name: Dynamically Linked Hello Apps (C API only) shell: bash continue-on-error: true # TODO(SC-223804) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a899977c..f379e58ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,14 @@ if (POLICY CMP0144) cmake_policy(SET CMP0144 NEW) endif () +# This policy is designed to force a choice between the old behavior of an integrated FindBoost implementation +# and the implementation provided in by boost. +if(POLICY CMP0167) + # Uses the BoostConfig.cmake included with the boost distribution. + cmake_policy(SET CMP0167 NEW) +endif() + + option(BUILD_TESTING "Top-level switch for testing. Turn off to disable unit and contract tests." ON) option(LD_BUILD_SHARED_LIBS "Build the SDKs as shared libraries" OFF) diff --git a/cmake/launchdarklyConfig.cmake b/cmake/launchdarklyConfig.cmake index c0e4779e0..87b0afc76 100644 --- a/cmake/launchdarklyConfig.cmake +++ b/cmake/launchdarklyConfig.cmake @@ -8,6 +8,13 @@ if (NOT DEFINED Boost_USE_STATIC_LIBS) endif () endif () +# This policy is designed to force a choice between the old behavior of an integrated FindBoost implementation +# and the implementation provided in by boost. +if(POLICY CMP0167) + # Uses the BoostConfig.cmake included with the boost distribution. + cmake_policy(SET CMP0167 NEW) +endif() + find_dependency(Boost 1.81 COMPONENTS json url coroutine) find_dependency(OpenSSL) find_dependency(tl-expected) diff --git a/cmake/rfc3339_timestamp.cmake b/cmake/rfc3339_timestamp.cmake index 2416875a2..192c0bfb9 100644 --- a/cmake/rfc3339_timestamp.cmake +++ b/cmake/rfc3339_timestamp.cmake @@ -5,7 +5,7 @@ FetchContent_Declare(timestamp FetchContent_GetProperties(timestamp) if (NOT timestamp_POPULATED) - FetchContent_Populate(timestamp) + FetchContent_MakeAvailable(timestamp) endif () add_library(timestamp OBJECT diff --git a/scripts/run-hello-apps.sh b/scripts/run-hello-apps.sh index d2d58d050..9860576fa 100755 --- a/scripts/run-hello-apps.sh +++ b/scripts/run-hello-apps.sh @@ -40,6 +40,9 @@ cd build-"$1" || exit # script ends. trap cleanup EXIT +echo Boost dir $Boost_DIR +echo Boost root $BOOST_ROOT + cmake -G Ninja -D CMAKE_BUILD_TYPE=Release \ -D BUILD_TESTING=OFF \ -D LD_BUILD_SHARED_LIBS=$dynamic_linkage \ diff --git a/vendor/foxy/CMakeLists.txt b/vendor/foxy/CMakeLists.txt index a64f767c1..99b33d564 100644 --- a/vendor/foxy/CMakeLists.txt +++ b/vendor/foxy/CMakeLists.txt @@ -11,6 +11,13 @@ cmake_minimum_required(VERSION 3.13) set(foxy_minimum_boost_version 1.75) +# This policy is designed to force a choice between the old behavior of an integrated FindBoost implementation +# and the implementation provided in by boost. +if(POLICY CMP0167) + # Uses the BoostConfig.cmake included with the boost distribution. + cmake_policy(SET CMP0167 NEW) +endif() + project( foxy @@ -30,7 +37,6 @@ include(${CMAKE_FILES}/certify.cmake) find_package( Boost ${foxy_minimum_boost_version} REQUIRED - system date_time ) @@ -148,7 +154,6 @@ target_link_libraries( PUBLIC Boost::boost - Boost::system Boost::date_time OpenSSL::SSL Threads::Threads diff --git a/vendor/foxy/cmake/certify.cmake b/vendor/foxy/cmake/certify.cmake index d3af6ea7d..3d2d353c7 100644 --- a/vendor/foxy/cmake/certify.cmake +++ b/vendor/foxy/cmake/certify.cmake @@ -10,7 +10,7 @@ endif () FetchContent_Declare(certify GIT_REPOSITORY https://github.com/launchdarkly/certify.git - GIT_TAG 7116dd0e609ae44d037aa562736d3d59fce1b637 + GIT_TAG 71023298ae232ee01cc7c4c80ea19b7b12bfeb19 ) # The tests in certify don't compile.