[Insight-developers] Tcl failure on MacOSX-WrapITK
Brad King
brad.king at kitware.com
Tue Feb 22 17:09:05 EST 2011
On 02/22/2011 03:24 PM, Bradley Lowekamp wrote:
> That seems a bit odd to me. It was my understanding that
> CMake's EXECUTABLE_OUTPUT_PATH and RUNTIME_OUTPUT_PATH were suppose to
> take care of that type of thing. A quick grep across the toolkit shows
> that WrapITK is the only area using CTEST_CONFIGURATION_TYPE. Have you
> tried using CXX_TEST_PATH?
The goal is to reference the itkwish executable as an argument on a test
command line. Currently it looks like this is used:
"${EXECUTABLE_OUTPUT_PATH}/\${CTEST_CONFIGURATION_TYPE}/itkwish"
The EXECUTABLE_OUTPUT_PATH holds the real output location for Makefile
generators. The Xcode and VS generators append the configuration to
the path because multiple configurations can be built in one tree.
The above reference to itkwish works for the Xcode and VS case but
not the Makefile case.
The modern way to solve this problem is to use the add_test(NAME) mode
introduced in CMake 2.8. It supports "generator expressions" like this:
add_test(NAME mytest COMMAND itkTestDriver ...
$<TARGET_FILE:itkwish> ...)
Each CMake generator will substitute the proper location of the file in
place of the $<> expression (hence the name "generator expression").
-Brad
More information about the Insight-developers
mailing list