[CMake] Excluding targets from a solution config in a Visual Studio build

Alessio masariello+cmake.org at gmail.com
Mon Apr 22 13:15:12 EDT 2013


Hi there

Is there a way to tell the Visual Studio generators that a target should
not be included in “whole solution” builds?

With the following sequence A will be excluded from all solution
configurations, but B will be included.

add_custom_target(A)

add_custom_target(B COMMAND echo This is target B)

add_dependencies(A B)

I’m actually trying to define a set of targets that do not get built
automatically when one does a “solution build” in Visual Studio. I.e. I’d
like to find a way to have B excluded as well.

Is this possible at all?

Thanks in advance! And thanks to the CMake folks for the great tool!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130422/00040c68/attachment.htm>


More information about the CMake mailing list