[CMake] CMake 2.5 GENERATED true bug
Brandon J. Van Every
bvanevery at gmail.com
Fri May 12 19:14:57 EDT 2006
I'm building with cmake version 2.5-20060510. The following is either a
bug, or I don't understand the docs because they're not terribly clear.
ADD_CUSTOM_COMMAND(
OUTPUT ${Chicken_BINARY_DIR}/cheese.c
MAIN_DEPENDENCY ${Chicken_SOURCE_DIR}/batch-driver.scm
COMMAND cp ${Chicken_SOURCE_DIR}/batch-driver.scm
${Chicken_BINARY_DIR}/cheese.c
)
SET_SOURCE_FILES_PROPERTIES(${Chicken_BINARY_DIR}/cheese.c PROPERTIES
GENERATED true)
ADD_DEPENDENCIES(${Chicken_BINARY_DIR}/cheese.c parameters.scm)
This fails with:
CMake Error: Error in cmake code at
E:/devel/src/chicken/CMakeLists.txt:233:
ADD_DEPENDENCIES Adding dependency to non-existent target:
E:/devel/msys/chicken/cheese.c
The reason I want to ADD_DEPENDENCIES independent of the
ADD_CUSTOM_COMMAND is it makes MACROS and argument passing a lot
easier. I prefer to automate whatever I can rather than write out many
tedious verbose lines of similar commands. I am already using the MACRO
ARGV to add extra compile flags, and I really don't want to parse for
things to stick in a DEPENDS.
Cheers,
Brandon Van Every
More information about the CMake
mailing list