[Insight-developers] [Fwd: Changes to MetaImage...]

Stephen R. Aylward aylward@unc.edu
Thu, 22 Mar 2001 18:01:58 -0500


How should we reference data files in the example directories if the
build is placing the executables in different directories?  See below
for more details....

Thanks,
Stephen

Parag Chandra wrote:
> 
> Ok, that solves half the problem. I'll put the test and the accompanying
> files into examples. But how would I reference that (the examples) directory from within
> the test program? Each platform will place the executable for this test into
> something like ${CMAKE_BINARY_DIR}/Examples, but ${CMAKE_BINARY_DIR} isn't
> even an environment variable for me to reference, it's a variable that's
> internal to CMake. If I reference the file without the pathname, like
> "TestInput.mhd", then the file has to be in the same directory as the
> executable, and that means I would have to place a copy of the test file
> into Insight-Cygwin, Insight-VC++, Insight-Linux, etc. Not only is that
> redundant, but there's no way I could foresee the additional platforms we
> might target, and so the test running on those platforms will generate an
> exception when it can't find the file. The only thing I can see is to place
> the test file into one directory, and then run the test for each platform
> from that directory by using the full pathname of the executable, e.g.
> /Insight-Cygwin/Examples/itkFileIOMetaImageTest.exe. Does anyone have any
> other ideas?
> 
> Thanks,
> -Parag
> 
> ---
> You are currently subscribed to caddlab as: aylward@unc.edu
> To unsubscribe send a blank email to leave-caddlab-706N@listserv.unc.edu

-- 
===============================================
Stephen R. Aylward
Assistant Professor of Radiology
Adjunct Assistant Professor of Computer Science
http://www.cs.unc.edu/~aylward
aylward@unc.edu
(919) 966-9695