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 6b923d9
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 24 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 = git@github.com:Microsoft/vcpkg.git
10 changes: 1 addition & 9 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 All @@ -13,15 +14,6 @@
"ARGON_ENABLE_WARNINGS": "ON",
"ARGON_BUILD_TESTING": "ON",
"ARGON_BUILD_EXAMPLES": "ON"
},
"warnings": {
"dev": true,
"deprecated": true,
"uninitialized": true
},
"errors": {
"dev": true,
"deprecated": true
}
},
{
Expand Down
1 change: 1 addition & 0 deletions cmake/vcpkg
Submodule vcpkg added at 350898
4 changes: 1 addition & 3 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})

find_package(Catch2 3.6.0 REQUIRED)
find_package(Catch2 3.7.0 REQUIRED)
include(Catch)

add_executable(test-argon Main.cpp Argument.cpp Option.cpp Parser.cpp Position.cpp)
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 6b923d9

Please sign in to comment.