[Cmake] Using EXECUTABLE_OUTPUT_PATH breaks "make test"

Wheeler, Fred (CRD) wheeler at crd.ge.com
Mon Jan 28 10:10:58 EST 2002


Ken, thanks.

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?

I'm going to try the following cmake flags...

  -DEXECUTABLE_OUTPUT_PATH:PATH=$SR/vxl_bld/bin
  -DLIBRARY_OUTPUT_PATH:PATH=$SR/vxl_bld/lib
  -DCXX_TEST_PATH:PATH=$SR/vxl_bld/bin

Fred Wheeler

-----Original Message-----
From: Ken Martin [mailto:ken.martin at kitware.com]
Sent: Monday, January 28, 2002 9:47 AM
To: Wheeler, Fred (CRD); cmake at public.kitware.com
Subject: RE: [Cmake] Using EXECUTABLE_OUTPUT_PATH breaks "make test"


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