Skip to content

Commit

Permalink
catch2 on github
Browse files Browse the repository at this point in the history
  • Loading branch information
mhekkel committed Jan 27, 2025
1 parent 685ffe7 commit bba712a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DFETCH_CATCH2=ON
-S ${{ github.workspace }}
- name: Build
Expand Down
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ include(CTest)
set(CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(FETCH_CATCH2 OFF CACHE BOOL "Force using a private copy of catch2")

if(MSVC)
# make msvc standards compliant...
Expand Down Expand Up @@ -90,7 +91,9 @@ target_link_libraries(mrc mcfp::mcfp)
target_link_libraries(mrc-bootstrap mcfp::mcfp)

if(BUILD_TESTING)
find_package(Catch2 3 QUIET)
if(NOT FETCH_CATCH2)
find_package(Catch2 3 QUIET)
endif()

if(NOT Catch2_FOUND)
Include(FetchContent)
Expand Down

0 comments on commit bba712a

Please sign in to comment.