From 2dd9eafa4fd0a4cacd83fd26bece700fa691b52d Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Thu, 3 Sep 2015 21:25:47 -0700 Subject: [PATCH] Enable "make test" on cmake. --- CMakeLists.txt | 7 ++----- test/unit/CMakeLists.txt | 1 + 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b7155ed88c..c70e03dec8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,14 +86,11 @@ INSTALL(TARGETS ntcore ARCHIVE DESTINATION lib COMPONENT lib) INSTALL(DIRECTORY include DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT headers) - -# -# -# - # We need thread support find_package(Threads REQUIRED) +enable_testing() + add_subdirectory(gmock) include_directories("gmock/include") include_directories("gmock/gtest/include") diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt index cf0b2c8d13..4929b1e6ee 100644 --- a/test/unit/CMakeLists.txt +++ b/test/unit/CMakeLists.txt @@ -1,6 +1,7 @@ file(GLOB SRCS *.cpp) add_executable(testntcore ${SRCS}) +add_test(testntcore testntcore) if(MSVC) target_link_libraries(testntcore