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

Daniel Franke franke.daniel at gmail.com
Tue Oct 12 09:08:29 EDT 2010


On Tuesday, October 12, 2010, John Drescher wrote:
> On Tue, Oct 12, 2010 at 8:58 AM, Mr Shore <shore.cloud at gmail.com> wrote:
> > Can I restrict the scope so that this setting is only for one specific
> > target?
> 
> 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.

Try:
		set_target_properties (<target> PROPERTIES
		                       COMPILE_FLAGS "..." LINK_FLAGS "...")

where <target> is the name of your target, of course.

Cheers

	Daniel


More information about the CMake mailing list