diff --git a/CMakeLists.txt b/CMakeLists.txt index 72f961a..8a7d7ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,6 +64,7 @@ if (BUILD_JVM_RUNTIME) add_subdirectory(java_runtime) endif () if (BUILD_CPP_TESTS) + enable_testing() add_subdirectory(tests/cpp) endif () diff --git a/tests/cpp/CMakeLists.txt b/tests/cpp/CMakeLists.txt index 1ac14c3..a29268e 100644 --- a/tests/cpp/CMakeLists.txt +++ b/tests/cpp/CMakeLists.txt @@ -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