[CMake] print content of linking script ?
Eric Noulard
eric.noulard at gmail.com
Sun Dec 11 12:24:43 EST 2011
2011/12/11 Ilias Miroslav <Miroslav.Ilias at umb.sk>:
> Dear all,
>
> is there an easy way of printing out content of the linking file
>
> CMakeFiles/<TARGET>.dir/link.txt
>
> as a simple command in the CMakeLists.txt file ?
>
> Usually we do cat .../link.txt after the cmake-configuration but we would prefer some more elegant form within the "message(...)" commad.
You can read the content of any file using
file(READ your-file YOURVAR) cmake command
then use
message("Your-file=${YOURVAR}") to display it,
that said I don't **when** the link.txt file is getting generated so
that I don't
if it'll work from within CMakeLists.txt.
Why do you want to do that?
if you are using Makefile generator then may be
make VERBOSE=1 <target>
would be enough?
--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
More information about the CMake
mailing list