Dear All,
    I have a question about ADD_CUSTOM_COMMAND. I read in the doc

"If DEPENDS specifies any target (created by an ADD_* command) a target-level 
dependency is created to make sure the target is built before any target using 
this custom command. Additionally, if the target is an executable or library a 
file-level dependency is created to cause the custom command to re-run whenever 
the target is recompiled."

However if I add to the DEPENDS list a target built with ADD_CUSTOM_TARGET, 
first the target is correctly scanned and built, then make crashes because it 
considers it also a file dependencies and looks for a file with the same name 
of the target. Is this the normal behaviour? I can fix it with

ADD_CUSTOM_TARGET(all-todo COMMAND touch all-todo)
ADD_CUSTOM_COMMAND(OUTPUT ... COMMAND ... DEPENDS all-todo ....)


Thanks and best regards, 

Federico Carminati
CERN-PH 
1211 Geneva 23
Switzerland
Tel: +41 22 76 74959
Fax: +41 22 76 68505
Mobile: +41 76 487 4843



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to