[Cmake] Using EXECUTABLE_OUTPUT_PATH breaks "make test"

Miller, James V (CRD) millerjv at crd.ge.com
Mon Jan 28 10:24:17 EST 2002


The CXX_TEST_PATH is just a variable name.  It gets expanded in Ken's example
in the ADD_TEST command.  This variable could have been "FOO" or anything else.

Just setting the CXX_TEST_PATH or whatever you choose to call the variable is not
enough.  The ADD_TEST commands (in the CMakeLists.txt files) need to know where executables are going
to be located. 


-----Original Message-----
From: Wheeler, Fred (CRD) 
Sent: Monday, January 28, 2002 10:11 AM
To: 'Ken Martin'
Cc: cmake at public.kitware.com
Subject: RE: [Cmake] Using EXECUTABLE_OUTPUT_PATH breaks "make test"



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

_______________________________________________
Cmake mailing list
Cmake at public.kitware.com
http://public.kitware.com/mailman/listinfo/cmake



More information about the CMake mailing list