I wrote the following CMakeLists.txt
in order to build a tester using CxxTest (it's almost the standard example provided by FindCxxTest
):
cmake_minimum_required(VERSION 2.8)
project(tester)
set(CMAKE_INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
find_package(CxxTest REQUIRED)
if(CXXTEST_FOUND)
include_directories(${CXXTEST_INCLUDE_DIR})
enable_testing()
CXXTEST_ADD_TEST(tester_executable runner.cpp
${CMAKE_CURRENT_SOURCE_DIR}/myTestsuite.h)
endif()
The problem is that CxxTest is not found although I have the folder cxxtest and the file cxxtest/TestSuite.h
inside the directory where CMakeLists.txt
exists.
I already looked into the source code of FindCxxTest.cmake
to see how far it gets, but it doesn't even find the path CXXTEST_INCLUDE_DIR
.
Do I have to set another search path or something? I'm testing on Windows.