[CMake] CMake 2.4.2 dependency path qualifier bug
William A. Hoffman
billlist at nycap.rr.com
Thu May 18 23:14:50 EDT 2006
At 03:21 PM 5/18/2006, Brandon. Van Every wrote:
>William A. Hoffman wrote:
>>One more thing, what generator is this?
>The error occurs both with the CMakeSetup MSYS generator, and with CCMake on Cygwin. I first discovered it on Cygwin when doing a totally clean build. I went back and found out it affected my MSYS builds as well, completely different environment.
OK, I found the problem.
# It is inconvenient to specify extra dependencies in custom build
# rule macros. Much easier to do them separately here.
# Most generated .c files depend on non-generated .scm sources.
MACRO(C_SCM_DEPS outroot)
# After outroot, you supply roots of additional scheme dependencies.
# Put all optional arguments in deproots.
SET(deproots ${ARGV})
LIST(REMOVE_ITEM deproots 0)
ADD_SUFFIX(deproots dep_scm .scm)
ADD_PREFIX(dep_scm source_dep_scm ${Chicken_SOURCE_DIR}/)
# ADD_FILE_DEPENDENCIES(${Chicken_BINARY_DIR}/${outroot}.c ${source_dep_scm})
ENDMACRO(C_SCM_DEPS)
ADD_FILE_DEPENDENCIES can not be used to add a depend from a source file to another
source file. The macro basically, calls OBJECT_DEPENDS on the .c file. It is meant
to add an extra depend onto a .o or .obj file, and should not have anything to do
with custom commands. Any effect it has on them can not be expected to work.
If I comment out the above it works. There may be some way to unify the
depend stuff a bit more, but for now (CMake 2.4.2 and less ) you will have
to use the DEPENDS on the custom comand.
-Bill
More information about the CMake
mailing list