From: delmon Date: Mon, 4 Apr 2011 13:31:01 +0000 (+0000) Subject: We need to find a better way to fix this. X-Git-Tag: v1.2.0~73 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=3c16b9312456025cbf9ace40996a1962551bb889;p=clitk.git We need to find a better way to fix this. 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. --- diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 8fdef8d..9d5abdc 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -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)