Is it possible to execute commands after the generation step of the
project files?

I want to set custom properties in the generated Visual Studio project,
because it should be built as a driver, which requires a few extra steps.
These changes should be done automatically by CMake (or a script run
after project generation) to be in sync between all developers.

I also tried just setting the properties with something like: cmake
--build . -- /p:FilesToPackage="a;b;c"

But it seems like CMake does not pass the command as raw string, because
msbuild complains about non-existing property, like it does when called
directly without quotes: msbuild project /p:FilesToPackage=a;b;c
which would treat 'b' as a property key instead of part of the value for
FilesToPackage.

The only workaround, currently, is to use:
cmake ..
modifyProjects.py
cmake --build .

However, I assume this does not work correctly if CMake regenerates the
project files because of changes in CMakeLists (because
modifyProjects.py will not be called automatically by CMake), correct?
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to