From 3c16b9312456025cbf9ace40996a1962551bb889 Mon Sep 17 00:00:00 2001 From: delmon Date: Mon, 4 Apr 2011 13:31:01 +0000 Subject: [PATCH 1/1] 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. --- tools/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) 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) -- 2.45.2