[CMake] custom commands and dependence problems
Bradley Lowekamp
blowekamp at mail.nih.gov
Fri Jun 17 10:55:14 EDT 2005
Hi Brad,
I do not under stand what property you are recommending me getting
here. The purpose of this code it to try to add dependencies of source
code to generated header file. Lets just say this is a greatly
simplified version of what I am trying to do :)
Can source files depend on custom targets which don't generate files?
Also I have posted a response to my on post, when I tried to get this
dependency working under the assumption that they can't.
Thanks
========================================================
Bradley Lowekamp
Management Systems Designers Contractor for
Office of High Performance Computing and Communications
National Library of Medicine
'blowekamp at mail.nih.gov
On Jun 17, 2005, at 10:19 AM, Brad King wrote:
> Bradley Lowekamp wrote:
>> I have code similar to this and I don't under stand why it is not
>> working:
>> ADD_CUSTOM_TARGET(gen DEPENDS ${SOME_GENERATED_FILES})
>> SET_SOURCE_FILES_PROPERTIES(${SOME_SRC_FILES} PROPERTIES
>> OBJECT_DEPENDS gen)
>> ADD_LIBRARY(my ${SOME_SRC_FILES})
>> I am using make files on linux, a recent CVS version (last week).
>> There make error message I am getting is "No rule to make target
>> 'gen', needed by 'mysrc.cpp'. Stop. " Am I not under standing
>> something or have I encountered a bug or something?
>
> Use GET_TARGET_PROPERTY as shown here:
>
> http://public.kitware.com/Wiki/
> CMake_FAQ#How_can_I_generate_a_source_file_during_the_build.3F
>
> to get the proper name for the dependency.
>
> -Brad
>
>
More information about the CMake
mailing list