[CMake] Question about ADD_CUSTOM_COMMAND
Carminati Federico
Federico.Carminati at cern.ch
Sun Feb 13 12:10:56 EST 2011
Dear Michael,
Thanks a lot! I upgraded cmake to the git "next" version and indeed it works now. 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
On 13 Feb 2011, at 05:34, Michael Hertling wrote:
> On 02/12/2011 03:00 PM, Carminati Federico wrote:
>> 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 ....)
>
> See http://public.kitware.com/Bug/view.php?id=11332#c22532.
>
> This should be fixed in CMake 2.8.4.
>
> Regards,
>
> Michael
> _______________________________________________
> 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
More information about the CMake
mailing list