[Insight-developers] Re: Wrap ITK patch

Karthik Krishnan Karthik.Krishnan at kitware.com
Fri Sep 8 17:07:42 EDT 2006


Gaëtan Lehmann wrote:

><gaetan.lehmann at jouy.inra.fr <http://www.itk.org/mailman/listinfo/insight-developers>> a écrit:
>
>>/ Hi Karthik,
>/>/  Le Fri, 08 Sep 2006 19:44:43 +0200, Karthik Krishnan  
>/>/ <Karthik.Krishnan at kitware.com <http://www.itk.org/mailman/listinfo/insight-developers>> a écrit:
>/>/  Also, why do I get a cache variable for IMAGE_COMPARE when I build ITK
>/>/ and where do I get this executable from ?  The code, I can see is in
>/>/ Code/IO and the executable should can be specified internally. Is this
>/>/ to handle paths for multi-configuration build systems like
>/>/ Windows/XCode, which determine the executable path at build time ? There
>/>/ is a workaround for that. //
>/
>ctest seems to be clever enough to understand that  
>/Users/glehmann/src/Insight/build-wrap/bin/itkTestDriver is really  
>/Users/glehmann/src/Insight/build-wrap/bin/Debug/itkTestDriver, at least  
>with Xcode.
>Please let me know if that's also the case with windows
>  
>
It was never an issue with the path of the test driver.. That's handled 
by ctest..

It is an issue with anything you are passing to the driver as a command 
line argument . Those strings are handled by you, not ctest

http://www.itk.org/cgi-bin/viewcvs.cgi/Wrapping/WrapITK/Tcl/Tests/tclTestDriver.tcl.in?annotate=1.1&root=Insight

Line 37 of that file would always fail on VisualStudio or XCode ..

You need to handle that with ifdefs like..

  std::string  = 
itksys::SystemTools::ConvertToOutputPath(ImageCompareExecutableIn);
  #if defined(_WIN32) && defined(CMAKE_INTDIR)
    itksys::SystemTools::ReplaceString(ImageCompareExecutable, 
"$(OutDir)", CMAKE_INTDIR);
  #endif

So you would need a Cxx test driver, that gets built rather than a Tcl one.

-----------
Thanks
-karthik

>Thanks,
>
>Gaetan
>


More information about the Insight-developers mailing list