I am also interested in this. Not because I couldn’t do 2 seperate build 
directories for CLI and IDE building, but because VS projects are still the 
best shot at getting parallel builds on Windows. NMake batch support is not 
implemented, and Ninja has never built any of my projects without errors.






Feladó: Alessio
Elküldve: ‎kedd‎, ‎2015‎. ‎május‎ ‎12‎. ‎13‎:‎28
Címzett: cmake@cmake.org





Hi All



(similar questions have been asked before, but none has quite hit the mark)




Is there any way to force MSVC to build custom targets marked with 
EXCLUDE_FROM_DEFAULT_BUILD?




Using




      cmake --build . --target SOME_EXCLUDED_TARGET --config Release




will produce the well known message




     Project not selected to build for this solution configuration




I could find the following two ways to get the targets to build, but they all 
have drawbacks:

Use a BATCH_BUILD variable that will disable the setting of 
EXCLUDE_FROM_DEFAULT_BUILD on the targets.

Define a set of build configurations on which 
EXCLUDE_FROM_DEFAULT_BUILD_<config> is not set (e.g. Release_ALL is identical 
to Release, except it has no build exclusions)


Option 1 has the drawback of producing solutions that do not work well for 
interactive development





Option 2 is rather cumbersome and would require the users to build separate 
sets of binaries. I could not quite figure out a way to make the Release_ALL 
packaging commands reference the Release target binaries.




Has anyone figured out a way to get the full monty, i.e. a way to generate an 
MSVC solution that works well for both interactive and command line builds?




Thank you so much for any feedback you can provide on this

-alessio
-- 

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