]> Creatis software - clitk.git/commitdiff
We need to find a better way to fix this.
authordelmon <delmon>
Mon, 4 Apr 2011 13:31:01 +0000 (13:31 +0000)
committerdelmon <delmon>
Mon, 4 Apr 2011 13:31:01 +0000 (13:31 +0000)
The problem arises when a target depends on a ggo.h but does not depends on the
ggo.c.
When a target depends on a ggo.c it is explicitly listed in its dependencies
including the custom command that generates it.
When the ggo.h is include in a cxx included in a target CMake has no way to
know it and does not include the custom command that generates it.

In this patch I manually add the dependency between the cxx and the ggo.h.

tools/CMakeLists.txt

index 8fdef8ddadda73a84a7d4343596aa6fd8896195e..9d5abdc2eb7cc38557285e676b81900c8f832ad8 100644 (file)
@@ -16,6 +16,8 @@ ADD_LIBRARY(clitkImageConvertLib clitkImageConvertGenericFilter.cxx)
 ADD_LIBRARY(clitkBinarizeImageLib clitkBinarizeImageGenericFilter.cxx)
 ADD_LIBRARY(clitkImageArithmImageLib clitkImageArithmGenericFilter.cxx)
 ADD_LIBRARY(clitkResampleImageLib clitkResampleImageGenericFilter.cxx)
+SET_SOURCE_FILES_PROPERTIES(clitkResampleImageGenericFilter.cxx PROPERTIES
+                            OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/clitkResampleImage_ggo.h) 
 ADD_LIBRARY(clitkMIPLib clitkMIPGenericFilter.cxx)
 
 TARGET_LINK_LIBRARIES(clitkBinarizeImageLib clitkToolsGgoLib)