[Insight-developers] How do I make a module default to Off?

Brad King brad.king at kitware.com
Thu Nov 1 13:19:56 EDT 2012


On 11/01/2012 12:54 PM, Williams, Norman K wrote:
> On the other hand, the Gerrit dashboard for this patch seems to indicate
> we've regressed on finding include filesŠ.

This is the dependency problem you've struggled with.  There is a race
between building ITKIODCMTKHeaderTest1 and ITKDCMTK_ExtProject.  By
luck I was able to reproduce it this time around.  The solution is to
make header tests depend on their libraries, as with the patch below.

I pushed a separate change to Gerrit for this:

 http://review.source.kitware.com/8282

and rebased the DCMTK changes on it.

-Brad


diff --git a/CMake/ITKModuleHeaderTest.cmake b/CMake/ITKModuleHeaderTest.cmake
index 5b8137c..c56a995 100644
--- a/CMake/ITKModuleHeaderTest.cmake
+++ b/CMake/ITKModuleHeaderTest.cmake
@@ -80,6 +80,7 @@ macro( itk_module_headertest _name )
         )
       add_executable( ${_test_name} ${_header_test_src} )
       target_link_libraries( ${_test_name} ITKCommon )
+      add_dependencies(${_test_name} ${${_name}_LIBRARIES})
       add_dependencies(${_name}-all ${_test_name})
       math( EXPR _test_num "${_test_num} + 1" )
     endforeach()


More information about the Insight-developers mailing list