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.
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)