Skip to content

Commit

Permalink
Setup CMake to have 'check' target like autoconf
Browse files Browse the repository at this point in the history
This setups the CMake build system to have the same `make check`
functionality as the autoconf build system
  • Loading branch information
Matt Schulte authored and serge1 committed Oct 30, 2020
1 parent 1559155 commit b2154b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ endif()

if (ELFIO_BUILD_TESTS AND IS_TOP_PROJECT)
enable_testing()
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} USES_TERMINAL)
add_subdirectory(tests)
endif()

Expand Down
2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ add_test(
WORKING_DIRECTORY
${CMAKE_CURRENT_BINARY_DIR})

add_custom_target(check DEPENDS test)
add_dependencies(check ELFIOTest)

0 comments on commit b2154b3

Please sign in to comment.