diff --git a/.github/actions/ci/action.yml b/.github/actions/ci/action.yml index 2f161bad1..f03a5d88e 100644 --- a/.github/actions/ci/action.yml +++ b/.github/actions/ci/action.yml @@ -49,6 +49,7 @@ runs: run: ./scripts/build.sh ${{ inputs.cmake_target }} ON env: BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} + Boost_DIR: ${{ steps.install-boost.outputs.Boost_DIR }} OPENSSL_ROOT_DIR: ${{ steps.install-openssl.outputs.OPENSSL_ROOT_DIR }} - name: Build Tests id: build-tests @@ -57,6 +58,7 @@ runs: run: ./scripts/build.sh gtest_${{ inputs.cmake_target }} ON env: BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} + Boost_DIR: ${{ steps.install-boost.outputs.Boost_DIR }} OPENSSL_ROOT_DIR: ${{ steps.install-openssl.outputs.OPENSSL_ROOT_DIR }} - name: Run Tests if: steps.build-tests.outcome == 'success' @@ -80,3 +82,4 @@ runs: env: BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} OPENSSL_ROOT_DIR: ${{ steps.install-openssl.outputs.OPENSSL_ROOT_DIR }} + Boost_DIR: 'C:\local\boost_1_87_0\lib64-msvc-14.3\cmake\Boost-1.87.0' diff --git a/.github/workflows/client.yml b/.github/workflows/client.yml index 02c2a4a43..e949d493b 100644 --- a/.github/workflows/client.yml +++ b/.github/workflows/client.yml @@ -58,8 +58,9 @@ jobs: - uses: ilammy/msvc-dev-cmd@v1 - uses: ./.github/actions/ci env: - BOOST_LIBRARY_DIR: 'C:\local\boost_1_81_0\lib64-msvc-14.3' - BOOST_LIBRARYDIR: 'C:\local\boost_1_81_0\lib64-msvc-14.3' + BOOST_LIBRARY_DIR: 'C:\local\boost_1_87_0\lib64-msvc-14.3' + BOOST_LIBRARYDIR: 'C:\local\boost_1_87_0\lib64-msvc-14.3' + Boost_DIR: 'C:\local\boost_1_87_0\lib64-msvc-14.3\cmake\Boost-1.87.0' with: cmake_target: launchdarkly-cpp-client platform_version: 2022 diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index d4adf59d7..91ca97379 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -37,7 +37,7 @@ jobs: - uses: ilammy/msvc-dev-cmd@v1 - uses: ./.github/actions/cmake-test env: - BOOST_ROOT: 'C:\local\boost_1_81_0\lib64-msvc-14.3' + Boost_DIR: 'C:\local\boost_1_87_0\lib64-msvc-14.3\cmake\Boost-1.87.0' with: platform_version: 2022 toolset: msvc diff --git a/.github/workflows/server-redis.yml b/.github/workflows/server-redis.yml index 235065d87..ac5964822 100644 --- a/.github/workflows/server-redis.yml +++ b/.github/workflows/server-redis.yml @@ -44,8 +44,9 @@ jobs: - uses: ilammy/msvc-dev-cmd@v1 - uses: ./.github/actions/ci env: - BOOST_LIBRARY_DIR: 'C:\local\boost_1_81_0\lib64-msvc-14.3' - BOOST_LIBRARYDIR: 'C:\local\boost_1_81_0\lib64-msvc-14.3' + BOOST_LIBRARY_DIR: 'C:\local\boost_1_87_0\lib64-msvc-14.3' + BOOST_LIBRARYDIR: 'C:\local\boost_1_87_0\lib64-msvc-14.3' + Boost_DIR: 'C:\local\boost_1_87_0\lib64-msvc-14.3\cmake\Boost-1.87.0' with: cmake_target: launchdarkly-cpp-server-redis-source platform_version: 2022 diff --git a/CMakeLists.txt b/CMakeLists.txt index f379e58ca..f1736f3ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,14 @@ project( LANGUAGES CXX C ) +# Boost is using some deprecated built-ins which causes build errors when compiling foxy on mac. +# For now disable the warnings for deprecated built-ins while using Apple's toolchains. +add_compile_options( + $<$,$>:-Wno-deprecated-builtins> + $<$,$>:-Wno-deprecated-builtins> +) + + # Allow BOOST_ROOT to be set by CI without warnings. if (POLICY CMP0074) cmake_policy(SET CMP0074 NEW) diff --git a/cmake-tests/README.md b/cmake-tests/README.md index fd1b44768..4132ef180 100644 --- a/cmake-tests/README.md +++ b/cmake-tests/README.md @@ -51,10 +51,10 @@ Without setting these, the test would fail to build with the same compilers as t Additionally, certain variables must be forwarded to each test project CMake configuration. -| Variable | Explanation | -|--------------------|------------------| -| `BOOST_ROOT` | Path to Boost. | -| `OPENSSL_ROOT_DIR` | Path to OpenSSL. | +| Variable | Explanation | +|--------------------|---------------------------------------------------------------------------------------------------------| +| `Boost_DIR` | Path to boost CMAKE configuration. Example: 'C:\local\boost_1_87_0\lib64-msvc-14.3\cmake\Boost-1.87.0' | +| `OPENSSL_ROOT_DIR` | Path to OpenSSL. | ## Tests diff --git a/cmake/redis-plus-plus.cmake b/cmake/redis-plus-plus.cmake index 49572b27f..79bd2a27d 100644 --- a/cmake/redis-plus-plus.cmake +++ b/cmake/redis-plus-plus.cmake @@ -5,9 +5,10 @@ include(FetchContent) FetchContent_Declare(hiredis GIT_REPOSITORY https://github.com/redis/hiredis.git - GIT_TAG 60e5075d4ac77424809f855ba3e398df7aacefe8 + # 1.3.0 + GIT_TAG ccad7ebaf99310957004661d1c5f82d2a33ebd10 GIT_SHALLOW TRUE - SOURCE_DIR _deps/hiredis + SOURCE_DIR ${CMAKE_BINARY_DIR}/_deps/hiredis OVERRIDE_FIND_PACKAGE ) @@ -22,7 +23,8 @@ set(REDIS_PLUS_PLUS_BUILD_TEST OFF CACHE BOOL "" FORCE) # when it tries to do feature detection on hiredis. FetchContent_Declare(redis-plus-plus GIT_REPOSITORY https://github.com/sewenew/redis-plus-plus.git - GIT_TAG 1.3.7 + # Post 1.3.15. Required to support FetchContent post 1.3.7 where it was broken. + GIT_TAG 84f37e95d9112193fd433f65402d3d183f0b9cf7 GIT_SHALLOW TRUE ) diff --git a/libs/server-sdk-redis-source/src/bindings/redis/redis_source.cpp b/libs/server-sdk-redis-source/src/bindings/redis/redis_source.cpp index 87cbb0193..3ebd4b4a0 100644 --- a/libs/server-sdk-redis-source/src/bindings/redis/redis_source.cpp +++ b/libs/server-sdk-redis-source/src/bindings/redis/redis_source.cpp @@ -5,7 +5,7 @@ #include #include -#include +#include using namespace launchdarkly::server_side::integrations; diff --git a/libs/server-sdk-redis-source/src/redis_source.cpp b/libs/server-sdk-redis-source/src/redis_source.cpp index c4d9544f6..39a9cb816 100644 --- a/libs/server-sdk-redis-source/src/redis_source.cpp +++ b/libs/server-sdk-redis-source/src/redis_source.cpp @@ -1,6 +1,6 @@ #include -#include +#include namespace launchdarkly::server_side::integrations { tl::expected, std::string> diff --git a/libs/server-sdk-redis-source/tests/prefixed_redis_client.hpp b/libs/server-sdk-redis-source/tests/prefixed_redis_client.hpp index 95af81718..48e1c204e 100644 --- a/libs/server-sdk-redis-source/tests/prefixed_redis_client.hpp +++ b/libs/server-sdk-redis-source/tests/prefixed_redis_client.hpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include diff --git a/libs/server-sdk-redis-source/tests/redis_source_test.cpp b/libs/server-sdk-redis-source/tests/redis_source_test.cpp index 57be8e156..086946847 100644 --- a/libs/server-sdk-redis-source/tests/redis_source_test.cpp +++ b/libs/server-sdk-redis-source/tests/redis_source_test.cpp @@ -9,7 +9,7 @@ #include "prefixed_redis_client.hpp" -#include +#include #include diff --git a/vendor/foxy/cmake/certify.cmake b/vendor/foxy/cmake/certify.cmake index 3d2d353c7..73545256f 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 71023298ae232ee01cc7c4c80ea19b7b12bfeb19 + GIT_TAG 51772c3bbbf210e9f53f24d55e95e1e1c6cf334a ) # The tests in certify don't compile.