From 27b3f1b6235d82c19208d40098b2c6e095884523 Mon Sep 17 00:00:00 2001 From: Jared Szechy Date: Sun, 3 Dec 2017 12:29:07 -0500 Subject: [PATCH] Use cmake's test command Resolves #16 --- CMakeLists.txt | 1 + test/CMakeLists.txt | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) 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)