[CMake] OBJECT_DEPENDS problem
Brad King
brad.king at kitware.com
Wed Oct 27 16:22:23 EDT 2004
Alexander Neundorf wrote:
> Hi,
>
> it seems I can add only one dependancy to a source file using
> SET_SOURCE_FILES_PROPERTIES()
> E.g. after
> SET_SOURCE_FILES_PROPERTIES(foo.c PROPERTIES OBJECT_DEPENDS test1.c)
> SET_SOURCE_FILES_PROPERTIES(foo.c PROPERTIES OBJECT_DEPENDS test2.c)
>
> After this foo.c only depends on test2.c but not on test1.c, so it seems
> this simply gets overwritten.
> Any ideas how to solve this problem ?
List all the dependencies as one value:
SET(foo_c_deps test1.c test2.c)
SET_SOURCE_FILES_PROPERTIES(
foo.c PROPERTIES OBJECT_DEPENDS "${foo_c_deps}")
Note the double quotes are used to keep the arguments from getting
separated.
-Brad
More information about the CMake
mailing list