[CMake] Top level target depending on a file

Eric Noulard eric.noulard at gmail.com
Mon Dec 12 06:18:00 EST 2011


2011/12/12 Alexander Broekhuis <a.broekhuis at gmail.com>:
> Hi,
>
> Can anyone help me with this? I haven't found a proper solution myself yet..

The fact is there is no "builtin" support for what you ask
see: http://public.kitware.com/Bug/view.php?id=8438

But the thing is.
Why don't you create a top level target using

add_custom_target instead of a post-build event?

this custom target would depend on both the text file
and the library target your are building.

The only issue would be that you have to "call" (i.e. build) the new
custom target explicitely instead of relying on POST BUILD.

Note that may be I didn't catch your usage so may be you can
send us the concerned bits of your CMakeLists.txt

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list