[CMake] Post-Generate commands

LaViolette, Alan ALAVIOLETTE at overwatch.textron.com
Wed May 26 13:41:48 EDT 2010


What I really want to do is generate Intel Compiler project files for
the just generated visual studio project files.  I am trying to do this
without any cmake C++ changes at the moment.  I can generate the icproj
during the cmake run but have no way to generate a new solution, so I
have a script that will process the solution and projects to generate a
new solution.  I know this is not a great solution but it currently
works.

 

Alan

 

 

From: David Cole [mailto:david.cole at kitware.com] 
Sent: Wednesday, May 26, 2010 1:18 PM
To: LaViolette, Alan
Cc: a.neundorf-work at gmx.net; cmake at cmake.org
Subject: Re: [CMake] Post-Generate commands

 

This is not easily possible without modifying the CMake C++ code. (Where
it would be fairly easy to add a feature like this...) Perhaps filing a
feature request for a "post generate action" would be the best thing to
do.

However, in the meantime, you could always add a custom target that
executes your stuff at the beginning of the build, and make all other
top level targets depend on it with add_dependencies. Would that work in
your case?



On Wed, May 26, 2010 at 1:05 PM, LaViolette, Alan
<ALAVIOLETTE at overwatch.textron.com> wrote:

I want to run at the end of cmake.  I am generating some additional
files that are more complex then configure can do. But I need the
generated projects and solutions.



-----Original Message-----
From: Alexander Neundorf [mailto:a.neundorf-work at gmx.net]
Sent: Wednesday, May 26, 2010 12:16 PM
To: cmake at cmake.org
Cc: LaViolette, Alan
Subject: Re: [CMake] Post-Generate commands

On Wednesday 26 May 2010, LaViolette, Alan wrote:
> Is it possible to have cmake run a command after all files are
> generated?   I want to do some additional build environment setup.


You can use add_custom_command(TARGET your_target POST_BUILD COMMAND
...) to
have commands executed after a target has been built.

Or do you mean at the end of the cmake run ?
What do you want to do ? Please let us know some more details, otherwise
it's
hard to help.

Alex
_______________________________________________
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

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100526/da9040ee/attachment-0001.htm>


More information about the CMake mailing list