Skip to content

Commit

Permalink
Enable ctest to execute tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnfeng0 committed Apr 18, 2023
1 parent 16bb4c2 commit 3a3a619
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ if (ULOG_BUILD_EXAMPLES)
endif ()

if (ULOG_BUILD_TESTS)
enable_testing()
add_subdirectory(tests)
endif ()

Expand Down
4 changes: 2 additions & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# ulog build test
enable_testing()
add_executable(ulog_test ulog_test.c)
target_link_libraries(ulog_test ulog)
add_test(test ulog_test)
add_test(test_c_compile ulog_test)

add_executable(ulog_test_cpp ulog_test.cc)
target_link_libraries(ulog_test_cpp ulog)
add_test(test_cpp_compile ulog_test_cpp)

0 comments on commit 3a3a619

Please sign in to comment.