[CMake] How to compile as "release" with /MT /GS in cmake?

John Drescher drescherjm at gmail.com
Tue Oct 12 09:03:27 EDT 2010


On Tue, Oct 12, 2010 at 8:58 AM, Mr Shore <shore.cloud at gmail.com> wrote:
> Hi John
>
> Can I restrict the scope so that this setting is only for one specific
> target?
>

If the targets are in their own subdirectory yes. Just set the
variable in the CMakeLists.txt file in that target after all
add_subdirectory lines so it does not pick up other projects.

If the targets are all in 1 CMakeLists.txt I am not sure how to do
that. I am not saying its not possible I just never had to look into
that since every project I create is in its own folder /
CMakeLists.txt file.

John


More information about the CMake mailing list