Skip to content

Commit

Permalink
Use vcpkg to find Catch2
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisThrasher committed Sep 24, 2024
1 parent 7b55dd6 commit 44b2aea
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 14 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:

- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

- name: Install Vcpkg
run: ./cmake/vcpkg/bootstrap-vcpkg.sh

- name: Configure
run: cmake --preset dev ${{matrix.platform.flags}} -DBUILD_SHARED_LIBS=${{matrix.type.flags}} -DCMAKE_BUILD_TYPE=${{matrix.config.name}} -DCMAKE_VERBOSE_MAKEFILE=ON
Expand All @@ -58,6 +63,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

- name: Install Vcpkg
run: ./cmake/vcpkg/bootstrap-vcpkg.sh

- name: Configure
run: cmake --preset coverage
Expand Down Expand Up @@ -87,6 +97,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

- name: Install Vcpkg
run: ./cmake/vcpkg/bootstrap-vcpkg.sh

- name: Configure
run: cmake --preset clang-tools
Expand All @@ -103,6 +118,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

- name: Install Vcpkg
run: ./cmake/vcpkg/bootstrap-vcpkg.sh

- name: Configure
run: cmake --preset clang-tools
Expand All @@ -124,6 +144,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

- name: Install Vcpkg
run: ./cmake/vcpkg/bootstrap-vcpkg.sh

- name: Configure
run: cmake --preset ${{matrix.sanitizer.preset}}
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "vcpkg"]
path = cmake/vcpkg
url = [email protected]:Microsoft/vcpkg.git
1 change: 1 addition & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"name": "dev",
"binaryDir": "build",
"installDir": "build/install",
"toolchainFile": "cmake/vcpkg/scripts/buildsystems/vcpkg.cmake",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_CXX_EXTENSIONS": "OFF",
Expand Down
1 change: 1 addition & 0 deletions cmake/vcpkg
Submodule vcpkg added at 350898
2 changes: 0 additions & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})

find_package(Catch2 3.6.0 REQUIRED)
include(Catch)

Expand Down
12 changes: 0 additions & 12 deletions tests/FindCatch2.cmake

This file was deleted.

7 changes: 7 additions & 0 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "argon",
"version-string": "0.12.0",
"dependencies": [
"catch2"
]
}

0 comments on commit 44b2aea

Please sign in to comment.