[CMake] [CMAKE] Call macro in CMake as last step
SOUMAGNE Jeremy
jeremy.soumagne at thalesgroup.com
Wed Jul 20 11:30:51 EDT 2016
Hi all,
I'm trying to emulate a custom global target (like the CMake install target).
The only that came through is by only writing commands in a global variable throughout the cmakelists and at the very end, the last line in the top cmakelists.txt does an include(final) to create the target with all the commands previously produced.
I would like to know if there is a way of doing this as the last step without the need to be called explicitly at the end of the CMakeLists.txt. To prevent all the developer to change their CMake to add this line.
I saw a similarly thread on stackoverflow, but I was wondering if since a better approach was implemented.
(link: http://www.google.fr/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&uact=8&ved=0ahUKEwi6xffHqoLOAhWFVRoKHQUBCH4QFgguMAI&url=http%3A%2F%2Fstackoverflow.com%2Fquestions%2F15760580%2Fexecute-command-or-macro-in-cmake-as-last-step-before-configure-step-finishes&usg=AFQjCNGHo0jkrpqw5vm7nx2_YzhJtRtenQ&bvm=bv.127521224,d.d2s)
Best regards,
jeremy
More information about the CMake
mailing list