[Cmake] Using EXECUTABLE_OUTPUT_PATH breaks "make test"

Brad King brad.king at kitware.com
Mon Jan 28 10:32:20 EST 2002


> Why the CXX_ prefix?  Is there a corresponding C_TEST_PATH, or does
> cmake use CXX_TEST_PATH to find all of the test executables?
The variable means nothing special for CMake.  In Ken's example, he set
it in the top-level CMakeLists.txt file, and then used it whenever a test
was added.

Top-level.  Choose where the tests should be found:
> # 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)

Anywhere a test is added uses the variable for the full path:
> ADD_TEST(ObjectFactory ${CXX_TEST_PATH}/ObjectFactory)

CMake does not treat this special in any way.  The code is merely
programming the correct path for the executable to be found.  Similar code
should be written for VXL.

-Brad





More information about the CMake mailing list