Skip to content

Commit

Permalink
Add ctest target
Browse files Browse the repository at this point in the history
  • Loading branch information
hcho3 committed May 18, 2023
1 parent 39448bc commit 20d90a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ if (BUILD_JVM_RUNTIME)
add_subdirectory(java_runtime)
endif ()
if (BUILD_CPP_TESTS)
enable_testing()
add_subdirectory(tests/cpp)
endif ()

Expand Down
4 changes: 4 additions & 0 deletions tests/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ target_link_libraries(tl2cgen_cpp_test
PRIVATE obj_tl2cgen rapidjson
GTest::GTest GTest::gmock fmt::fmt-header-only)
set_output_directory(tl2cgen_cpp_test ${PROJECT_BINARY_DIR})
add_test(
NAME TestTL2cgen
COMMAND tl2cgen_cpp_test
WORKING_DIRECTORY ${PROJECT_BINARY_DIR})

if (MSVC)
target_compile_options(tl2cgen_cpp_test PRIVATE
Expand Down

0 comments on commit 20d90a1

Please sign in to comment.