Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a0d48e5
Individual pipelines for all the different formats
liuzicheng1987 Jul 27, 2025
9299c4e
Fixed typo
liuzicheng1987 Jul 27, 2025
dd8b00a
Better solution
liuzicheng1987 Jul 27, 2025
eefbc1b
Split up Linux as well
liuzicheng1987 Jul 27, 2025
b004457
Fixed typo
liuzicheng1987 Jul 27, 2025
e3c8c09
Everything as arrays
liuzicheng1987 Jul 27, 2025
10b6022
Set up the matrix properly
liuzicheng1987 Jul 27, 2025
dfb8184
Separate conan
liuzicheng1987 Jul 27, 2025
e30f0ae
In single quotes
liuzicheng1987 Jul 27, 2025
68e27c2
Split up the package managers for linux
liuzicheng1987 Jul 27, 2025
4761482
Put the package-manager inside the matrix
liuzicheng1987 Jul 27, 2025
015e53a
Fixed some typos
liuzicheng1987 Jul 27, 2025
626e522
Don't run all combinations
liuzicheng1987 Jul 27, 2025
e264d67
Conan for llvm-18
liuzicheng1987 Jul 27, 2025
903b09b
Remove Conan from the macOS pipeline
liuzicheng1987 Jul 27, 2025
e89a631
Add JSON when necessary
liuzicheng1987 Jul 28, 2025
aa04bb7
Split up macOS as well
liuzicheng1987 Jul 28, 2025
8556901
Add REFLECTCPP_ALL_FORMATS
liuzicheng1987 Jul 28, 2025
4b0b97e
Next attempt to split up linux
liuzicheng1987 Jul 28, 2025
35809fc
Next attempt
liuzicheng1987 Jul 28, 2025
a834c89
Next attempt
liuzicheng1987 Jul 28, 2025
14c946b
Added the benchmarks back into the linux pipeline
liuzicheng1987 Jul 29, 2025
b44577e
Fixed typo
liuzicheng1987 Jul 29, 2025
87beb59
Removed headers we don't have to precompile
liuzicheng1987 Jul 29, 2025
e866f15
Added benchmarks to Windows
liuzicheng1987 Jul 29, 2025
8186851
Added benchmarks to macOS
liuzicheng1987 Jul 30, 2025
8f2ca49
Added Conan
liuzicheng1987 Jul 30, 2025
7d47a07
Minor fixes
liuzicheng1987 Jul 30, 2025
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
25 changes: 25 additions & 0 deletions .github/workflows/linux-conan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: linux

on: [ push, pull_request ]

jobs:
linux:
name: "${{ github.job }} (Conan)"
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y ninja-build pipx
- name: Install Conan
run: |
pipx install conan
conan profile detect
- name: Make sure the library compiles with Conan
run: conan build . --build=missing -s compiler.cppstd=gnu20 -o *:with_capnproto=True -o *:with_cbor=True -o *:with_flatbuffers=True -o *:with_msgpack=True -o *:with_toml=True -o *:with_ubjson=True -o *:with_xml=True -o *:with_yaml=True

77 changes: 40 additions & 37 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,41 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
- compiler: llvm
format: ["JSON", "AVRO", "CAPNPROTO", "CBOR", "FLEXBUFFERS", "MSGPACK", "XML", "TOML", "UBJSON", "YAML", "benchmarks"]
compiler: [llvm, gcc]
compiler-version: [11, 12, 13, 14, 16, 17, 18]
cxx: [20, 23]
exclude:
- compiler: gcc
compiler-version: 16
cxx: 20
- compiler: llvm
- compiler: gcc
compiler-version: 17
cxx: 20
- compiler: llvm
- compiler: gcc
compiler-version: 18
cxx: 20
- compiler: gcc
- compiler: llvm
compiler-version: 11
additional-dep: "g++-11"
cxx: 20
- compiler: gcc
- compiler: llvm
compiler-version: 12
cxx: 20
- compiler: gcc
- compiler: llvm
compiler-version: 13
cxx: 20
- compiler: gcc
- compiler: llvm
compiler-version: 14
cxx: 20
- compiler: gcc
compiler-version: 13
compiler-version: 11
cxx: 23
- compiler: gcc
compiler-version: 14
compiler-version: 12
cxx: 23
name: "${{ github.job }} (C++${{ matrix.cxx }}-${{ matrix.compiler }}-${{ matrix.compiler-version }})"
- compiler: gcc
compiler-version: 13
cxx: 23
- compiler: llvm
compiler-version: 16
cxx: 23
- compiler: llvm
compiler-version: 17
cxx: 23
name: "${{ github.job }} (${{ matrix.format }}-C++${{ matrix.cxx }}-${{ matrix.compiler }}-${{ matrix.compiler-version }})"
runs-on: ubuntu-24.04
steps:
- name: Checkout
Expand All @@ -53,24 +58,16 @@ jobs:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: "${{ github.job }}-${{ matrix.compiler }}-${{ matrix.compiler-version }}"
max-size: "2G"
- name: Run vcpkg
uses: lukka/run-vcpkg@v11
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y ninja-build ${{ matrix.additional-dep }}
- name: Install Conan
run: |
sudo apt install -y pipx
pipx install conan
conan profile detect
- name: Make sure the library compiles with Conan
run: conan build . --build=missing -s compiler.cppstd=gnu20 -o *:with_capnproto=True -o *:with_cbor=True -o *:with_flatbuffers=True -o *:with_msgpack=True -o *:with_toml=True -o *:with_ubjson=True -o *:with_xml=True -o *:with_yaml=True
if [[ "${{ matrix.compiler-version }}" == 11 ]]; then
sudo apt install -y ninja-build g++-11
else
sudo apt install -y ninja-build
fi
- name: Compile
run: |
if [[ "${{ matrix.compiler }}" == "llvm" ]]; then
Expand All @@ -80,15 +77,21 @@ jobs:
export CC=gcc-${{ matrix.compiler-version }}
export CXX=g++-${{ matrix.compiler-version }}
fi
sudo ln -s $(which ccache) /usr/local/bin/$CC
sudo ln -s $(which ccache) /usr/local/bin/$CXX
$CXX --version
cmake -S . -B build -G Ninja -DCMAKE_CXX_STANDARD=${{ matrix.cxx }} -DREFLECTCPP_BUILD_TESTS=ON -DREFLECTCPP_BUILD_BENCHMARKS=ON -DREFLECTCPP_BSON=ON -DREFLECTCPP_CAPNPROTO=ON -DREFLECTCPP_CBOR=ON -DREFLECTCPP_FLEXBUFFERS=ON -DREFLECTCPP_MSGPACK=ON -DREFLECTCPP_TOML=ON -DREFLECTCPP_XML=ON -DREFLECTCPP_YAML=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build
if [[ "${{ matrix.format }}" == "JSON" ]]; then
cmake -S . -B build -G Ninja -DCMAKE_CXX_STANDARD=${{ matrix.cxx }} -DCMAKE_CXX_STANDARD=20 -DREFLECTCPP_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release
elif [[ "${{ matrix.format }}" == "benchmarks" ]]; then
cmake -S . -B build -G Ninja -DCMAKE_CXX_STANDARD=${{ matrix.cxx }} -DCMAKE_CXX_STANDARD=20 -DREFLECTCPP_BUILD_BENCHMARKS=ON -DREFLECTCPP_ALL_FORMATS=ON -DCMAKE_BUILD_TYPE=Release
else
cmake -S . -B build -G Ninja -DCMAKE_CXX_STANDARD=${{ matrix.cxx }} -DCMAKE_CXX_STANDARD=20 -DREFLECTCPP_BUILD_TESTS=ON -DREFLECTCPP_JSON=OFF -DREFLECTCPP_${{ matrix.format }}=ON -DCMAKE_BUILD_TYPE=Release
fi
cmake --build build -j4
- name: Run tests
if: matrix.format != 'benchmarks'
run: |
ctest --test-dir build --output-on-failure
- name: Run benchmarks
- name: Run benchmarks
if: matrix.format == 'benchmarks'
run: |
echo '# Benchmarks' >> $GITHUB_STEP_SUMMARY
echo '## Benchmarks across different formats' >> $GITHUB_STEP_SUMMARY
Expand Down
25 changes: 12 additions & 13 deletions .github/workflows/macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
fail-fast: false
matrix:
os: ["macos-latest", "macos-13"]
format: ["JSON", "AVRO", "CAPNPROTO", "CBOR", "FLEXBUFFERS", "MSGPACK", "XML", "TOML", "UBJSON", "YAML", "benchmarks"]
name: "${{ matrix.os }} (${{ matrix.format }})"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
Expand All @@ -24,19 +26,8 @@ jobs:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: "${{ github.job }}-${{ matrix.os }}"
max-size: "2G"
create-symlink: true
- name: Run vcpkg
uses: lukka/run-vcpkg@v11
- name: Install Conan
run: |
brew install pipx
pipx install conan
conan profile detect
- name: Install ninja
run: brew install ninja
if: matrix.os == 'macos-latest'
Expand All @@ -50,12 +41,20 @@ jobs:
export CMAKE_GENERATOR=Ninja
fi
$CXX --version
cmake -S . -B build -DCMAKE_CXX_STANDARD=20 -DREFLECTCPP_BUILD_TESTS=ON -DREFLECTCPP_BUILD_BENCHMARKS=ON -DREFLECTCPP_BSON=ON -DREFLECTCPP_CAPNPROTO=ON -DREFLECTCPP_CBOR=ON -DREFLECTCPP_FLEXBUFFERS=ON -DREFLECTCPP_MSGPACK=ON -DREFLECTCPP_TOML=ON -DREFLECTCPP_XML=ON -DREFLECTCPP_YAML=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
if [[ "${{ matrix.format }}" == "JSON" ]]; then
cmake -S . -B build -DCMAKE_CXX_STANDARD=20 -DREFLECTCPP_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
elif [[ "${{ matrix.format }}" == "benchmarks" ]]; then
cmake -S . -B build -G Ninja -DCMAKE_CXX_STANDARD=${{ matrix.cxx }} -DCMAKE_CXX_STANDARD=20 -DREFLECTCPP_BUILD_BENCHMARKS=ON -DREFLECTCPP_ALL_FORMATS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
else
cmake -S . -B build -DCMAKE_CXX_STANDARD=20 -DREFLECTCPP_BUILD_TESTS=ON -DREFLECTCPP_JSON=OFF -DREFLECTCPP_${{ matrix.format }}=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
fi
cmake --build build -j 4
- name: Run tests
if: matrix.format != 'benchmarks'
run: |
ctest --test-dir build --output-on-failure
- name: Run benchmarks
- name: Run benchmarks
if: matrix.format == 'benchmarks'
run: |
echo '# Benchmarks' >> $GITHUB_STEP_SUMMARY
echo '## Benchmarks across different formats' >> $GITHUB_STEP_SUMMARY
Expand Down
55 changes: 36 additions & 19 deletions .github/workflows/windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ env:

jobs:
windows-msvc:
strategy:
fail-fast: false
matrix:
format: ["JSON", "CAPNPROTO", "CBOR", "FLEXBUFFERS", "MSGPACK", "XML", "TOML", "UBJSON", "YAML", "benchmarks"]
name: "windows-msvc (${{ matrix.format }})"
runs-on: windows-latest
steps:
- name: Checkout
Expand All @@ -22,29 +27,41 @@ jobs:
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- uses: ilammy/msvc-dev-cmd@v1
- uses: lukka/run-vcpkg@v11
- name: Compile
- name: Compile benchmarks
if: matrix.format == 'benchmarks'
run: |
cmake -S . -B build -DCMAKE_CXX_STANDARD=20 -DREFLECTCPP_BUILD_TESTS=ON -DREFLECTCPP_BUILD_BENCHMARKS=ON -DREFLECTCPP_BSON=ON -DREFLECTCPP_CAPNPROTO=ON -DREFLECTCPP_CBOR=ON -DREFLECTCPP_FLEXBUFFERS=ON -DREFLECTCPP_MSGPACK=ON -DREFLECTCPP_XML=ON -DREFLECTCPP_TOML=ON -DREFLECTCPP_YAML=ON -DCMAKE_BUILD_TYPE=Release
cmake -S . -B build -G Ninja -DCMAKE_CXX_STANDARD=${{ matrix.cxx }} -DCMAKE_CXX_STANDARD=20 -DREFLECTCPP_BUILD_BENCHMARKS=ON -DREFLECTCPP_ALL_FORMATS=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release -j4
- name: Compile tests (JSON)
if: matrix.format == 'JSON'
run: |
cmake -S . -B build -DCMAKE_CXX_STANDARD=20 -DREFLECTCPP_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release -j4
- name: Compile tests (Other formats)
if: matrix.format != 'JSON' && matrix.format != 'benchmarks'
run: |
cmake -S . -B build -DCMAKE_CXX_STANDARD=20 -DREFLECTCPP_BUILD_TESTS=ON -DREFLECTCPP_JSON=OFF -DREFLECTCPP_${{ matrix.format }}=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release -j4
- name: Run tests
run: |
ctest --test-dir build --output-on-failure
- name: Run benchmarks
- name: Run benchmarks
if: matrix.format == 'benchmarks'
run: |
echo '# Benchmarks' >> $env:GITHUB_STEP_SUMMARY
echo '## Benchmarks across different formats' >> $env:GITHUB_STEP_SUMMARY
echo '```' >> $env:GITHUB_STEP_SUMMARY
.\build\benchmarks\all\Release\reflect-cpp-all-format-benchmarks.exe --benchmark_filter=canada_read >> $env:GITHUB_STEP_SUMMARY
.\build\benchmarks\all\Release\reflect-cpp-all-format-benchmarks.exe --benchmark_filter=canada_write >> $env:GITHUB_STEP_SUMMARY
.\build\benchmarks\all\Release\reflect-cpp-all-format-benchmarks.exe --benchmark_filter=licenses_read >> $env:GITHUB_STEP_SUMMARY
.\build\benchmarks\all\Release\reflect-cpp-all-format-benchmarks.exe --benchmark_filter=licenses_write >> $env:GITHUB_STEP_SUMMARY
.\build\benchmarks\all\Release\reflect-cpp-all-format-benchmarks.exe --benchmark_filter=person_read >> $env:GITHUB_STEP_SUMMARY
.\build\benchmarks\all\Release\reflect-cpp-all-format-benchmarks.exe --benchmark_filter=person_write >> $env:GITHUB_STEP_SUMMARY
echo '```' >> $env:GITHUB_STEP_SUMMARY
echo '## Benchmarks for JSON' >> $env:GITHUB_STEP_SUMMARY
echo '```' >> $env:GITHUB_STEP_SUMMARY
.\build\benchmarks\json\Release\reflect-cpp-json-benchmarks.exe --benchmark_filter=person_read >> $env:GITHUB_STEP_SUMMARY
.\build\benchmarks\json\Release\reflect-cpp-json-benchmarks.exe --benchmark_filter=canada >> $env:GITHUB_STEP_SUMMARY
.\build\benchmarks\json\Release\reflect-cpp-json-benchmarks.exe --benchmark_filter=licenses >> $env:GITHUB_STEP_SUMMARY
echo '```' >> $env:GITHUB_STEP_SUMMARY
echo '# Benchmarks' >> $GITHUB_STEP_SUMMARY
echo '## Benchmarks across different formats' >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=canada_read >> $GITHUB_STEP_SUMMARY
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=canada_write >> $GITHUB_STEP_SUMMARY
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=licenses_read >> $GITHUB_STEP_SUMMARY
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=licenses_write >> $GITHUB_STEP_SUMMARY
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=person_read >> $GITHUB_STEP_SUMMARY
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=person_write >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo '## Benchmarks for JSON' >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
./build/benchmarks/json/reflect-cpp-json-benchmarks --benchmark_filter=person_read >> $GITHUB_STEP_SUMMARY
./build/benchmarks/json/reflect-cpp-json-benchmarks --benchmark_filter=canada >> $GITHUB_STEP_SUMMARY
./build/benchmarks/json/reflect-cpp-json-benchmarks --benchmark_filter=licenses >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY

31 changes: 19 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ cmake_minimum_required(VERSION 3.23)
option(REFLECTCPP_BUILD_SHARED "Build shared library" ${BUILD_SHARED_LIBS})
option(REFLECTCPP_INSTALL "Install reflect cpp" OFF)

option(REFLECTCPP_ALL_FORMATS "Enable all supported formats" OFF)
option(REFLECTCPP_JSON "Enable JSON support" ON) # enabled by default
option(REFLECTCPP_AVRO "Enable AVRO support" OFF)
option(REFLECTCPP_BSON "Enable BSON support" OFF)
option(REFLECTCPP_CAPNPROTO "Enable Cap’n Proto support" OFF)
option(REFLECTCPP_CBOR "Enable CBOR support" OFF)
option(REFLECTCPP_FLEXBUFFERS "Enable flexbuffers support" OFF)
option(REFLECTCPP_MSGPACK "Enable msgpack support" OFF)
option(REFLECTCPP_XML "Enable XML support" OFF)
option(REFLECTCPP_TOML "Enable TOML support" OFF)
option(REFLECTCPP_UBJSON "Enable UBJSON support" OFF)
option(REFLECTCPP_YAML "Enable YAML support" OFF)
option(REFLECTCPP_AVRO "Enable AVRO support" ${REFLECTCPP_ALL_FORMATS})
option(REFLECTCPP_BSON "Enable BSON support" ${REFLECTCPP_ALL_FORMATS})
option(REFLECTCPP_CAPNPROTO "Enable Cap’n Proto support" ${REFLECTCPP_ALL_FORMATS})
option(REFLECTCPP_CBOR "Enable CBOR support" ${REFLECTCPP_ALL_FORMATS})
option(REFLECTCPP_FLEXBUFFERS "Enable flexbuffers support" ${REFLECTCPP_ALL_FORMATS})
option(REFLECTCPP_MSGPACK "Enable msgpack support" ${REFLECTCPP_ALL_FORMATS})
option(REFLECTCPP_XML "Enable XML support" ${REFLECTCPP_ALL_FORMATS})
option(REFLECTCPP_TOML "Enable TOML support" ${REFLECTCPP_ALL_FORMATS})
option(REFLECTCPP_UBJSON "Enable UBJSON support" ${REFLECTCPP_ALL_FORMATS})
option(REFLECTCPP_YAML "Enable YAML support" ${REFLECTCPP_ALL_FORMATS})

option(REFLECTCPP_BUILD_BENCHMARKS "Build benchmarks" OFF)
option(REFLECTCPP_BUILD_TESTS "Build tests" OFF)
Expand Down Expand Up @@ -59,6 +60,12 @@ if (REFLECTCPP_BUILD_TESTS OR REFLECTCPP_BUILD_BENCHMARKS OR
set(REFLECTCPP_USE_VCPKG_DEFAULT ON)
endif()

if(REFLECTCPP_JSON OR REFLECTCPP_AVRO OR REFLECTCPP_CBOR OR REFLECTCPP_UBJSON)
set(_REFLECTCPP_NEEDS_JSON_IMPL ON)
else()
set(_REFLECTCPP_NEEDS_JSON_IMPL OFF)
endif()

option(REFLECTCPP_USE_VCPKG "Use VCPKG to download and build dependencies" ${REFLECTCPP_USE_VCPKG_DEFAULT})

if (REFLECTCPP_USE_VCPKG)
Expand Down Expand Up @@ -94,7 +101,7 @@ if (REFLECTCPP_USE_VCPKG)
list(APPEND VCPKG_MANIFEST_FEATURES "flexbuffers")
endif()

if (REFLECTCPP_JSON AND NOT REFLECTCPP_USE_BUNDLED_DEPENDENCIES)
if (_REFLECTCPP_NEEDS_JSON_IMPL AND NOT REFLECTCPP_USE_BUNDLED_DEPENDENCIES)
list(APPEND VCPKG_MANIFEST_FEATURES "json")
endif()

Expand Down Expand Up @@ -162,7 +169,7 @@ else ()
target_link_libraries(reflectcpp PUBLIC ctre::ctre)
endif ()

if (REFLECTCPP_JSON)
if (_REFLECTCPP_NEEDS_JSON_IMPL)
list(APPEND REFLECT_CPP_SOURCES
src/reflectcpp_json.cpp
)
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/all/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ add_executable(
reflect-cpp-all-format-benchmarks
${SOURCES}
)
target_precompile_headers(reflect-cpp-all-format-benchmarks PRIVATE [["rfl.hpp"]] <iostream> <string> <functional> <gtest/gtest.h>)
target_precompile_headers(reflect-cpp-all-format-benchmarks PRIVATE [["rfl.hpp"]] <iostream> <string> <functional>)

target_include_directories(reflect-cpp-all-format-benchmarks SYSTEM PRIVATE "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include")
target_include_directories(reflect-cpp-all-format-benchmarks SYSTEM PRIVATE "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/tinycbor")
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/json/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ add_executable(
reflect-cpp-json-benchmarks
${SOURCES}
)
target_precompile_headers(reflect-cpp-json-benchmarks PRIVATE [["rfl.hpp"]] <iostream> <string> <functional> <gtest/gtest.h>)
target_precompile_headers(reflect-cpp-json-benchmarks PRIVATE [["rfl.hpp"]] <iostream> <string> <functional>)

target_include_directories(reflect-cpp-json-benchmarks SYSTEM PRIVATE "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include")

Expand Down
5 changes: 4 additions & 1 deletion reflectcpp-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ endif()

include(${CMAKE_CURRENT_LIST_DIR}/reflectcpp-exports.cmake)

if (REFLECTCPP_JSON AND NOT REFLECTCPP_USE_BUNDLED_DEPENDENCIES)
if (NOT REFLECTCPP_USE_BUNDLED_DEPENDENCIES)
find_dependency(ctre)
endif()

if ((REFLECTCPP_JSON OR REFLECTCPP_AVRO OR REFLECTCPP_CBOR OR REFLECTCPP_UBJSON) AND NOT REFLECTCPP_USE_BUNDLED_DEPENDENCIES)
find_dependency(yyjson)
endif()

Expand Down
Loading