From 835fd804f75bb6fdc2acddfec28994b954834a55 Mon Sep 17 00:00:00 2001 From: "Maarten L. Hekkelman" Date: Wed, 6 Mar 2024 15:26:47 +0100 Subject: [PATCH] for ci? --- .github/workflows/cmake-multi-platform.yml | 13 ++----------- test/CMakeLists.txt | 13 ++++++++++++- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 6845919..d986bab 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -16,8 +16,8 @@ jobs: matrix: os: [ubuntu-latest, windows-latest, macos-latest] include: - # - os: windows-latest - # cpp_compiler: cl + - os: windows-latest + cpp_compiler: cl - os: ubuntu-latest cpp_compiler: g++ - os: macos-latest @@ -36,15 +36,6 @@ jobs: run: > sudo apt-get update && sudo apt-get install catch2 - # - name: Install Catch2 Windows - # if: matrix.os == 'windows-latest' - # uses: MarkusJx/install-boost@v2.4.4 - # id: install-boost - # with: - # boost_version: 1.82.0 - # platform_version: 2019 - # toolset: msvc - - name: Install Catch2 macOS if: matrix.os == 'macos-latest' run: > diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 6f65f2c..951a329 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,4 +1,15 @@ -find_package(Catch2 REQUIRED) +find_package(Catch2 QUIET) + +if(NOT Catch2_FOUND) + FetchContent_Declare( + Catch2 + GIT_REPOSITORY https://github.com/catchorg/Catch2.git + GIT_TAG v2.13.9) + + FetchContent_MakeAvailable(Catch2) + + set(Catch2_VERSION "2.13.9") +endif() add_executable(mcfp-unit-test ${CMAKE_CURRENT_SOURCE_DIR}/unit-test.cpp)