Skip to content

Commit 5c33e19

Browse files
committed
fix(cmake): correct ctest config
1 parent 5565011 commit 5c33e19

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,6 @@ jobs:
7171
7272
- name: Run test
7373
run: |
74-
cd ${{ env.CMAKE_BUILD_DIR }}/tests
74+
cd ${{ env.CMAKE_BUILD_DIR }}
7575
set CTEST_OUTPUT_ON_FAILURE=1
7676
ctest -C Debug

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,9 @@ endif()
7171
option(STDSHARP_BUILD_TEST "Whether to build test")
7272

7373
if(STDSHARP_BUILD_TEST)
74+
#
75+
# Add the unit tests
76+
#
77+
include(CTest)
7478
add_subdirectory(tests)
7579
endif()

tests/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,6 @@ endif()
9999
# if(${CMAKE_CXX_COMPILER_ID} MATCHES Clang)
100100
# target_enable_coverage(${PROJECT_NAME} FORMAT lcov)
101101
# endif()
102-
103-
#
104-
# Add the unit tests
105-
#
106-
enable_testing()
107102
add_test(NAME ${PROJECT_NAME} COMMAND ${PROJECT_NAME})
108103

109104
verbose_message("Finished adding unit tests for ${CMAKE_PROJECT_NAME}.")

0 commit comments

Comments
 (0)