Hello list, I have the following directory layout
TopLevel -- Dir1 -- CMakeLists.txt (3) -- foo.cpp -- Installation -- CMakeLists.txt (2) -- CMakeLists.txt (1) with (1) add_subdirectory(Installation) and (2) enable_testing() add_subdirectory("${CMAKE_SOURCE_DIR}/Dir1" "${CMAKE_BINARY_DIR}/test/Dir1") # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # has to be specified, # because Dir1 is a # out-of-tree source and in (3) add_executable(foo foo.cpp) add_test(foo_test ${CMAKE_CURRENT_BINARY_DIR}/foo) No CTestTestFile.cmake will be added to the build directory, no test target is created and ctest will complain about no tests. If I use add_subdirectory("${CMAKE_SOURCE_DIR}/Dir1") from (1) everything works fine. I could find related things in the bug-tracker, but they were not quite as this case. Is there an easy work-around or am I misunderstanding something? cmake --version cmake version 2.8.8 Cheers, Philipp -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake