diff --git a/CMakeLists.txt b/CMakeLists.txt index 117db7c..36ce526 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,5 +37,6 @@ add_custom_target(uninstall option(DISABLE_TEST "Disable building of test framework." OFF) if (NOT DISABLE_TEST) + enable_testing() add_subdirectory(test) endif() diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 0432279..347676a 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -13,10 +13,7 @@ include_directories( link_directories( ${mbe_BINARY_DIR} ) -add_custom_target(test - DEPENDS mbetest - COMMAND mbetest -) - ADD_EXECUTABLE(mbetest ${SRCS}) TARGET_LINK_LIBRARIES(mbetest mbe gmock gtest) + +add_test(gtest mbetest)