[Insight-users] run test manually

David Froger david.froger at inria.fr
Mon Dec 2 04:46:39 EST 2013


Replacing the CMakeLists.txt with, the following content almost works (I get
'relocation has invalid symbol index' at link, seems that objects compiled
without -fPIC are put in dynamic lib).

cmake_minimum_required(VERSION 2.8)

PROJECT(MAIN)

FIND_PACKAGE(ITK)              
  
SET(CMAKE_BUILD_TYPE debug)    
  
IF(ITK_FOUND)                  
    INCLUDE(${ITK_USE_FILE})   
ELSE(ITK_FOUND)                
    MESSAGE(FATAL_ERROR "ITK not found. Please set ITK_DIR.")
ENDIF(ITK_FOUND)               
    
ADD_EXECUTABLE(main itkHDF5ImageIOStreamingReadWriteTest.cxx)
    
TARGET_LINK_LIBRARIES(main ${ITK_LIBRARIES})

Quoting David Froger (2013-12-02 10:33:56)
> Hi all,
> 
> How to run a ITK test manuall?
> 
> I would like to experiment with
> ITK/Modules/IO/HDF5/test/itkHDF5ImageIOStreamingReadWriteTest.cxx, but when
> trying to build the test:
> 
>     cd ITK/Modules/IO/HDF5/test
>     mkdir build
>     cd build
>     cmake ..
> 
> Because the ITK cmake testing module (I'm not sure how to name it) is not loaded,
> functions are not found: 
> 
> CMake Error at CMakeLists.txt:1 (itk_module_test):
>   Unknown CMake command "itk_module_test".
> 
> Thanks,
> David


More information about the Insight-users mailing list