[Cmake] Using EXECUTABLE_OUTPUT_PATH breaks "make test"
Ken Martin
ken.martin at kitware.com
Mon Jan 28 09:46:57 EST 2002
This is probably a CMakeLists problem (you could say cmake should
handle it but...) Basically Dart (and ctest which is what make test
does) by default look for executables in the binary tree in the
subdirectories where the tests were added to the cmake lists files.
They also look in subdirectories such as Release, Debug etc. When you
use EXECUTABLE_OUTPUT_PATH the executable get placed somewhere else.
What I have done in the past is in the top level CMake file
# where will executable tests be written ?
IF (EXECUTABLE_OUTPUT_PATH)
SET (CXX_TEST_PATH ${EXECUTABLE_OUTPUT_PATH})
ELSE (EXECUTABLE_OUTPUT_PATH)
SET (CXX_TEST_PATH .)
ENDIF (EXECUTABLE_OUTPUT_PATH)
and when I add a test
ADD_TEST(ObjectFactory ${CXX_TEST_PATH}/ObjectFactory)
Ken
More information about the CMake
mailing list