Skip to content

Commit

Permalink
build: add ASSERT_ENABLE_TESTS option (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
threeal authored Jun 23, 2024
1 parent 492e061 commit 2983050
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Configure Project
uses: threeal/cmake-action@v1.3.0
with:
options: BUILD_TESTING=ON
options: ASSERT_ENABLE_TESTS=ON

- name: Test Project
uses: threeal/ctest-action@v1.0.0
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ project(
LANGUAGES NONE
)

option(ASSERT_ENABLE_TESTS "Enable test targets.")
option(ASSERT_ENABLE_INSTALL "Enable install targets." ${PROJECT_IS_TOP_LEVEL})

include(cmake/Assertion.cmake)

if(PROJECT_IS_TOP_LEVEL AND BUILD_TESTING)
if(ASSERT_ENABLE_TESTS)
enable_testing()

add_test(
Expand Down

0 comments on commit 2983050

Please sign in to comment.