From f22d157677a3557696f2635909ab5f35994a33ad Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Tue, 7 Oct 2025 15:33:51 -0700 Subject: [PATCH 01/14] chore: Cmake updates for FindBoost policies. --- CMakeLists.txt | 8 ++++++++ cmake/launchdarklyConfig.cmake | 7 +++++++ cmake/rfc3339_timestamp.cmake | 2 +- vendor/foxy/CMakeLists.txt | 7 +++++++ 4 files changed, 23 insertions(+), 1 deletion(-) 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/vendor/foxy/CMakeLists.txt b/vendor/foxy/CMakeLists.txt index a64f767c1..aacca7998 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 From 8204d2a07504470e1d87a3d8410a21ee3d76669a Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Wed, 8 Oct 2025 08:45:17 -0700 Subject: [PATCH 02/14] Update certify to version including FindBoost updates. --- vendor/foxy/cmake/certify.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/foxy/cmake/certify.cmake b/vendor/foxy/cmake/certify.cmake index d3af6ea7d..c83933bb7 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 f8578ace64a2b832e75657cc6fd60bb9260c57ad ) # The tests in certify don't compile. From 6351b59dcad3cdb9268036058c0471ef15999f76 Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Wed, 8 Oct 2025 09:06:32 -0700 Subject: [PATCH 03/14] Update windows boost version. --- .github/actions/install-openssl/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From f5d3b3136cb681af921cf69ea128ceecf33f4147 Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Wed, 8 Oct 2025 09:13:32 -0700 Subject: [PATCH 04/14] Try boost 1.85. --- .github/actions/install-boost/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/install-boost/action.yml b/.github/actions/install-boost/action.yml index 848d7ffe8..07e3a450c 100644 --- a/.github/actions/install-boost/action.yml +++ b/.github/actions/install-boost/action.yml @@ -39,7 +39,7 @@ runs: if: runner.os == 'macOS' shell: bash run: | - brew install boost + brew install boost@1.85 echo "BOOST_ROOT=$(brew --prefix boost)" >> $GITHUB_OUTPUT - name: Determine root From 7c2ca08c88433e8f9cebebebd3cdeda460d2b2c0 Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Wed, 8 Oct 2025 09:25:38 -0700 Subject: [PATCH 05/14] No boost root --- .github/actions/install-boost/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/install-boost/action.yml b/.github/actions/install-boost/action.yml index 07e3a450c..57b4f0734 100644 --- a/.github/actions/install-boost/action.yml +++ b/.github/actions/install-boost/action.yml @@ -39,8 +39,8 @@ runs: if: runner.os == 'macOS' shell: bash run: | - brew install boost@1.85 - echo "BOOST_ROOT=$(brew --prefix boost)" >> $GITHUB_OUTPUT + brew install boost +# echo "BOOST_ROOT=$(brew --prefix boost)" >> $GITHUB_OUTPUT - name: Determine root id: determine-root From 069edf1d9922dcec504d37af6dcb34e4376dfee7 Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Wed, 8 Oct 2025 09:43:06 -0700 Subject: [PATCH 06/14] Try boost 1.85 with link --- .github/actions/install-boost/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/install-boost/action.yml b/.github/actions/install-boost/action.yml index 57b4f0734..8880ce77c 100644 --- a/.github/actions/install-boost/action.yml +++ b/.github/actions/install-boost/action.yml @@ -39,7 +39,8 @@ runs: if: runner.os == 'macOS' shell: bash run: | - brew install boost + brew install boost@1.85 + brew link boost@1.85 # echo "BOOST_ROOT=$(brew --prefix boost)" >> $GITHUB_OUTPUT - name: Determine root From 915259913baa6d50bc3aaf00c79d67348f0a680e Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Wed, 8 Oct 2025 09:58:52 -0700 Subject: [PATCH 07/14] Update certify to remove boost::system dependency --- .github/actions/install-boost/action.yml | 5 ++--- vendor/foxy/cmake/certify.cmake | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/actions/install-boost/action.yml b/.github/actions/install-boost/action.yml index 8880ce77c..848d7ffe8 100644 --- a/.github/actions/install-boost/action.yml +++ b/.github/actions/install-boost/action.yml @@ -39,9 +39,8 @@ runs: if: runner.os == 'macOS' shell: bash run: | - brew install boost@1.85 - brew link boost@1.85 -# echo "BOOST_ROOT=$(brew --prefix boost)" >> $GITHUB_OUTPUT + brew install boost + echo "BOOST_ROOT=$(brew --prefix boost)" >> $GITHUB_OUTPUT - name: Determine root id: determine-root diff --git a/vendor/foxy/cmake/certify.cmake b/vendor/foxy/cmake/certify.cmake index c83933bb7..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 f8578ace64a2b832e75657cc6fd60bb9260c57ad + GIT_TAG 71023298ae232ee01cc7c4c80ea19b7b12bfeb19 ) # The tests in certify don't compile. From ac66ddcf96d4b60da9ac6d78122037fc7b81dfae Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Wed, 8 Oct 2025 10:07:26 -0700 Subject: [PATCH 08/14] Remove Boost::system from foxy. --- vendor/foxy/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/vendor/foxy/CMakeLists.txt b/vendor/foxy/CMakeLists.txt index aacca7998..99b33d564 100644 --- a/vendor/foxy/CMakeLists.txt +++ b/vendor/foxy/CMakeLists.txt @@ -37,7 +37,6 @@ include(${CMAKE_FILES}/certify.cmake) find_package( Boost ${foxy_minimum_boost_version} REQUIRED - system date_time ) @@ -155,7 +154,6 @@ target_link_libraries( PUBLIC Boost::boost - Boost::system Boost::date_time OpenSSL::SSL Threads::Threads From 22b258ddafd5b62e8984b7d669b52676231d6e6a Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Wed, 8 Oct 2025 10:51:51 -0700 Subject: [PATCH 09/14] Use prefix to find boost cmake configuration. --- .github/actions/install-boost/action.yml | 1 + .github/workflows/hello-apps.yml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.github/actions/install-boost/action.yml b/.github/actions/install-boost/action.yml index 848d7ffe8..db3b24ab6 100644 --- a/.github/actions/install-boost/action.yml +++ b/.github/actions/install-boost/action.yml @@ -33,6 +33,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 "CMAKE_PREFIX_PATH=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/workflows/hello-apps.yml b/.github/workflows/hello-apps.yml index 4b76149aa..6a13bd53e 100644 --- a/.github/workflows/hello-apps.yml +++ b/.github/workflows/hello-apps.yml @@ -34,7 +34,9 @@ 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 }} + CMAKE_PREFIX_PATH: ${{ steps.install-boost.outputs.CMAKE_PREFIX_PATH }} OPENSSL_ROOT_DIR: ${{ steps.install-openssl.outputs.OPENSSL_ROOT_DIR }} + - name: Dynamically Linked Hello Apps (C API only) shell: bash continue-on-error: true # TODO(SC-223804) From 94b520c957f34b5cfc0d53d914bb96a6f5f468e7 Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Wed, 8 Oct 2025 11:07:55 -0700 Subject: [PATCH 10/14] Use Boost_DIR instead of prefix. --- .github/actions/install-boost/action.yml | 2 +- .github/actions/sdk-release/action.yml | 1 + .github/workflows/hello-apps.yml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/actions/install-boost/action.yml b/.github/actions/install-boost/action.yml index db3b24ab6..d10aa5b33 100644 --- a/.github/actions/install-boost/action.yml +++ b/.github/actions/install-boost/action.yml @@ -33,7 +33,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 "CMAKE_PREFIX_PATH=C:\local\boost_1_87_0\lib64-msvc-14.3\cmake\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/sdk-release/action.yml b/.github/actions/sdk-release/action.yml index b1da9ced4..ab8e17ad2 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-openssl.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 6a13bd53e..586cf26fe 100644 --- a/.github/workflows/hello-apps.yml +++ b/.github/workflows/hello-apps.yml @@ -35,7 +35,7 @@ jobs: env: BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} CMAKE_PREFIX_PATH: ${{ steps.install-boost.outputs.CMAKE_PREFIX_PATH }} - OPENSSL_ROOT_DIR: ${{ steps.install-openssl.outputs.OPENSSL_ROOT_DIR }} + Boost_DIR: ${{ steps.install-openssl.outputs.Boost_DIR }} - name: Dynamically Linked Hello Apps (C API only) shell: bash From 531c80579cef8720aaeea85a7ccfc68d282e9bdb Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Wed, 8 Oct 2025 12:23:38 -0700 Subject: [PATCH 11/14] Use correct step. --- .github/workflows/hello-apps.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hello-apps.yml b/.github/workflows/hello-apps.yml index 586cf26fe..5dbc9bc00 100644 --- a/.github/workflows/hello-apps.yml +++ b/.github/workflows/hello-apps.yml @@ -35,7 +35,7 @@ jobs: env: BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} CMAKE_PREFIX_PATH: ${{ steps.install-boost.outputs.CMAKE_PREFIX_PATH }} - Boost_DIR: ${{ steps.install-openssl.outputs.Boost_DIR }} + Boost_DIR: ${{ steps.install-boost.outputs.Boost_DIR }} - name: Dynamically Linked Hello Apps (C API only) shell: bash From 4a29cb82b5f68ecbd95cc2be41ce61d7a5fd3fe8 Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Wed, 8 Oct 2025 12:43:35 -0700 Subject: [PATCH 12/14] Debug output --- .github/actions/sdk-release/action.yml | 2 +- scripts/run-hello-apps.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/actions/sdk-release/action.yml b/.github/actions/sdk-release/action.yml index ab8e17ad2..701565d68 100644 --- a/.github/actions/sdk-release/action.yml +++ b/.github/actions/sdk-release/action.yml @@ -102,7 +102,7 @@ runs: env: Boost_DIR: ${{ steps.install-openssl.outputs.Boost_DIR }} BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} - OPENSSL_ROOT_DIR: ${{ steps.install-openssl.outputs.OPENSSL_ROOT_DIR }} + OPENSSL_ROOT_DIR: ${{ steps.install-boost.outputs.OPENSSL_ROOT_DIR }} run: ./scripts/build-release-windows.sh ${{ inputs.sdk_cmake_target }} - name: Archive Release Windows - MSVC/x64/Static diff --git a/scripts/run-hello-apps.sh b/scripts/run-hello-apps.sh index d2d58d050..9453b9065 100755 --- a/scripts/run-hello-apps.sh +++ b/scripts/run-hello-apps.sh @@ -40,6 +40,8 @@ cd build-"$1" || exit # script ends. trap cleanup EXIT +echo Boost dir $Boost_DIR + cmake -G Ninja -D CMAKE_BUILD_TYPE=Release \ -D BUILD_TESTING=OFF \ -D LD_BUILD_SHARED_LIBS=$dynamic_linkage \ From 6cb877f8ed7c6c044a6f24233aa4e8626ee2d384 Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Wed, 8 Oct 2025 12:55:57 -0700 Subject: [PATCH 13/14] Add output section for Boost_DIR --- .github/actions/install-boost/action.yml | 3 +++ .github/actions/sdk-release/action.yml | 4 ++-- .github/workflows/hello-apps.yml | 1 - 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/actions/install-boost/action.yml b/.github/actions/install-boost/action.yml index d10aa5b33..a509caecb 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.determine-root.outputs.Boost_DIR }} runs: using: composite steps: diff --git a/.github/actions/sdk-release/action.yml b/.github/actions/sdk-release/action.yml index 701565d68..4be6dd782 100644 --- a/.github/actions/sdk-release/action.yml +++ b/.github/actions/sdk-release/action.yml @@ -100,9 +100,9 @@ runs: if: runner.os == 'Windows' shell: bash env: - Boost_DIR: ${{ steps.install-openssl.outputs.Boost_DIR }} + Boost_DIR: ${{ steps.install-boost.outputs.Boost_DIR }} BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} - OPENSSL_ROOT_DIR: ${{ steps.install-boost.outputs.OPENSSL_ROOT_DIR }} + OPENSSL_ROOT_DIR: ${{ steps.install-openssl.outputs.OPENSSL_ROOT_DIR }} run: ./scripts/build-release-windows.sh ${{ inputs.sdk_cmake_target }} - name: Archive Release Windows - MSVC/x64/Static diff --git a/.github/workflows/hello-apps.yml b/.github/workflows/hello-apps.yml index 5dbc9bc00..1761f05c4 100644 --- a/.github/workflows/hello-apps.yml +++ b/.github/workflows/hello-apps.yml @@ -34,7 +34,6 @@ 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 }} - CMAKE_PREFIX_PATH: ${{ steps.install-boost.outputs.CMAKE_PREFIX_PATH }} Boost_DIR: ${{ steps.install-boost.outputs.Boost_DIR }} - name: Dynamically Linked Hello Apps (C API only) From c40e04a0589d9af6a044b46cca6f3fda4b48db94 Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Wed, 8 Oct 2025 14:40:39 -0700 Subject: [PATCH 14/14] Correct root. --- .github/actions/install-boost/action.yml | 2 +- scripts/run-hello-apps.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/install-boost/action.yml b/.github/actions/install-boost/action.yml index a509caecb..6f918936d 100644 --- a/.github/actions/install-boost/action.yml +++ b/.github/actions/install-boost/action.yml @@ -16,7 +16,7 @@ outputs: value: ${{ steps.determine-root.outputs.BOOST_ROOT }} Boost_DIR: description: Location of cmake support for boost. - value: ${{ steps.determine-root.outputs.Boost_DIR }} + value: ${{ steps.boost-download.outputs.Boost_DIR }} runs: using: composite steps: diff --git a/scripts/run-hello-apps.sh b/scripts/run-hello-apps.sh index 9453b9065..9860576fa 100755 --- a/scripts/run-hello-apps.sh +++ b/scripts/run-hello-apps.sh @@ -41,6 +41,7 @@ cd build-"$1" || exit 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 \