Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/actions/ci/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
Expand All @@ -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'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Boost_DIR Missing in Linux/MacOS Build

The "Simulate Release (Linux/MacOS)" step is missing the Boost_DIR environment variable. This variable was added to other build steps, creating an inconsistency that may cause build failures for the Linux/MacOS release simulation.

Fix in Cursor Fix in Web

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On those platforms it is automatically discovered.

5 changes: 3 additions & 2 deletions .github/workflows/client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 3 additions & 2 deletions .github/workflows/server-redis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
$<$<OR:$<C_COMPILER_ID:Clang>,$<C_COMPILER_ID:AppleClang>>:-Wno-deprecated-builtins>
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wno-deprecated-builtins>
)


# Allow BOOST_ROOT to be set by CI without warnings.
if (POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
Expand Down
8 changes: 4 additions & 4 deletions cmake-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 5 additions & 3 deletions cmake/redis-plus-plus.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: CMake Path Mismatch Causes Compilation Failures

The hiredis SOURCE_DIR was updated to use CMAKE_BINARY_DIR, but the include_directories path still references CMAKE_CURRENT_BINARY_DIR. This creates a path mismatch for hiredis headers when this CMake file is included from a subdirectory, potentially leading to compilation failures.

Fix in Cursor Fix in Web

OVERRIDE_FIND_PACKAGE
)

Expand All @@ -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
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <launchdarkly/detail/c_binding_helpers.hpp>
#include <launchdarkly/error.hpp>

#include <redis++.h>
#include <sw/redis++/redis++.h>

using namespace launchdarkly::server_side::integrations;

Expand Down
2 changes: 1 addition & 1 deletion libs/server-sdk-redis-source/src/redis_source.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <launchdarkly/server_side/integrations/redis/redis_source.hpp>

#include <redis++.h>
#include <sw/redis++/redis++.h>

namespace launchdarkly::server_side::integrations {
tl::expected<std::unique_ptr<RedisDataSource>, std::string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <launchdarkly/serialization/json_segment.hpp>

#include <gtest/gtest.h>
#include <redis++.h>
#include <sw/redis++/redis++.h>
#include <boost/json.hpp>

#include <string>
Expand Down
2 changes: 1 addition & 1 deletion libs/server-sdk-redis-source/tests/redis_source_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include "prefixed_redis_client.hpp"

#include <redis++.h>
#include <sw/redis++/redis++.h>

#include <boost/json.hpp>

Expand Down
2 changes: 1 addition & 1 deletion vendor/foxy/cmake/certify.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading