Skip to content
Closed
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

- name: Configure CMake
run: |
cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_TESTS=ON -DBUILD_BENCHMARKS=ON -DCMAKE_CXX_FLAGS="-fno-omit-frame-pointer -fsanitize=address"
cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_STANDARD=20 -DBUILD_TESTS=ON -DBUILD_BENCHMARKS=ON -DCMAKE_CXX_FLAGS="-fno-omit-frame-pointer -fsanitize=address"

- name: Build
run: |
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:

- name: Build for analysis
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=20
cmake --build build -j$(nproc)

- name: Perform CodeQL Analysis
Expand Down
28 changes: 16 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,29 +76,33 @@ endif()
find_package(OpenSSL REQUIRED)
find_package(nlohmann_json REQUIRED)

# Handle spdlog and fmt with fallback to FetchContent
# Handle fmt and spdlog with fallback to FetchContent
include(FetchContent)

find_package(spdlog QUIET)
if(NOT spdlog_FOUND)
message(STATUS "spdlog not found, downloading...")
FetchContent_Declare(
spdlog
GIT_REPOSITORY https://github.com/gabime/spdlog.git
GIT_TAG v1.12.0)
FetchContent_MakeAvailable(spdlog)
endif()

find_package(fmt QUIET)
if(NOT fmt_FOUND)
message(STATUS "fmt not found, downloading...")
FetchContent_Declare(
fmt
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
GIT_TAG 10.1.1)
GIT_TAG 10.2.1)
FetchContent_MakeAvailable(fmt)
endif()

set(SPDLOG_FMT_EXTERNAL
ON
CACHE BOOL "Use external fmt in spdlog" FORCE)

find_package(spdlog QUIET)
if(NOT spdlog_FOUND)
message(STATUS "spdlog not found, downloading...")
FetchContent_Declare(
spdlog
GIT_REPOSITORY https://github.com/gabime/spdlog.git
GIT_TAG v1.14.1)
FetchContent_MakeAvailable(spdlog)
endif()

# Create OpenSSL targets if they don't exist (for compatibility with older
# CMake)
if(OPENSSL_FOUND AND NOT TARGET OpenSSL::SSL)
Expand Down
Loading