ctest not working yet
I open this issue, which traces back to !103 (merged), regarding ctest and gtest.
I finally left the project as this (checkout branch frame-base-tests
):
-
wolf/src/tests
--> here all the gtest files are located -
In
wolf/CMakeLists.txt
if(BUILD_TESTS)
enable_testing()
endif()
- In
wolf/src/CMakeLists.txt
if(BUILD_TESTS)
MESSAGE("Building tests.")
add_subdirectory(test)
endif()
- In
wolf/src/tests/CMakeLists.txt
# Retrieve googletest from github & compile
add_subdirectory(gtest)
# Include config.h directory at first.
include_directories(${PROJECT_BINARY_DIR}/conf/)
# Include third party directory.
include_directories(${PROJECT_SOURCE_DIR}/third_party/spdlog/include/)
# Include gtest directory.
include_directories(${GTEST_INCLUDE_DIRS})
I compile as usual, and the tests are placed in wolf/bin
as usual.
Then, in wolf/build
, I call ctest
, and this is what I get:
vermicelle:wolf jsola$ ctest
*********************************
No test configuration file found!
*********************************
Usage
ctest [options]
Help !