Hi, I tried to be clever and add a test to NrrdIO but it's proved harder than it should be. I'm following "Approach A" directions on the wiki http://www.itk.org/Wiki/ITK/Release_4/Modularization/_Add_tests
1. I created ThirdParty/NrrdIO/test/CMakeLists.txt containing:
itk_module_test()
set(ITKNrrdIOTests
itkNrrdSaneTest.cxx
)
CreateTestDriver(ITKNrrdIO "${ITKNrrdIO-Test_LIBRARIES}" "${ITKNrrdIOTests}")
itk_add_test(NAME itkNrrdSaneTest
COMMAND ITKNrrdIOTestDriver itkNrrdSaneTest)
2. Compiling fails:
[ 0%] Built target itkzlib
[100%] Built target ITKNrrdIO
[100%] Building CXX object
Modules/ThirdParty/NrrdIO/test/CMakeFiles/ITKNrrdIOTestDriver.dir/ITKNrrdIOTestDriver.cxx.o
/home/steve/Packages/insighttoolkit/upstream/ITK/build/Modules/ThirdParty/NrrdIO/test/ITKNrrdIOTestDriver.cxx:6:53:
fatal error: itkTestDriverIncludeRequiredIOFactories.h: No such file or
directory
compilation terminated.
make[2]: ***
[Modules/ThirdParty/NrrdIO/test/CMakeFiles/ITKNrrdIOTestDriver.dir/ITKNrrdIOTestDriver.cxx.o]
Error 1
make[1]: ***
[Modules/ThirdParty/NrrdIO/test/CMakeFiles/ITKNrrdIOTestDriver.dir/all] Error 2
I can see that ITKNrrdIOTestDriver.cxx is generated and includes
"IncludeRequiredIOFactories.h". What I can't see is how to get the
right directories on the include path. None of the examples I looked
at (e.g. ITK/Modules/IO/BMP/test/CMakeLists.txt) use
include_directories() ... what did I do wrong?
Thanks,
-Steve
signature.asc
Description: Digital signature
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://www.itk.org/mailman/listinfo/insight-developers
