<div dir="ltr"><div><div>Hi Nicolas.<br><br></div>Last time I asked for something like that, it was rejected: <a href="http://public.kitware.com/Bug/view.php?id=13020">http://public.kitware.com/Bug/view.php?id=13020</a><br><br></div><div>But maybe the stance could change on that? After all, I don't think CMake would want to cater for every possible postprocessing anyone needs. Perhaps it could be considered if a big warning "May not be forward compatible" was attached to it?<br></div><div><br></div>Petr<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 29, 2016 at 8:13 PM, Nicolas Schneider <span dir="ltr"><<a href="mailto:nioncode@gmail.com" target="_blank">nioncode@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Is it possible to execute commands after the generation step of the<br>
project files?<br>
<br>
I want to set custom properties in the generated Visual Studio project,<br>
because it should be built as a driver, which requires a few extra steps.<br>
These changes should be done automatically by CMake (or a script run<br>
after project generation) to be in sync between all developers.<br>
<br>
I also tried just setting the properties with something like: cmake<br>
--build . -- /p:FilesToPackage="a;b;c"<br>
<br>
But it seems like CMake does not pass the command as raw string, because<br>
msbuild complains about non-existing property, like it does when called<br>
directly without quotes: msbuild project /p:FilesToPackage=a;b;c<br>
which would treat 'b' as a property key instead of part of the value for<br>
FilesToPackage.<br>
<br>
The only workaround, currently, is to use:<br>
cmake ..<br>
modifyProjects.py<br>
cmake --build .<br>
<br>
However, I assume this does not work correctly if CMake regenerates the<br>
project files because of changes in CMakeLists (because<br>
modifyProjects.py will not be called automatically by CMake), correct?<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br>
</blockquote></div><br></div>