[CMake] Question regarding CMAKE_CONFIGURATION_TYPES

Laurentiu Nicolae Laurentiu.Nicolae at quintiq.com
Mon Aug 7 08:15:34 EDT 2006


Hi,

I found an easy way to do it, so I decided to post it here if someone
else needs to do this trick. It seems indeed that
CMAKE_CONFIGURATION_TYPES can only be defined once (and is written in
the cache). However, the CMAKE_CXX_FLAGS_* parameters _can_ be set on a
per-folder basis. I simply set all of them to CMAKE_CXX_FLAGS_RELEASE
for my DLL2 folder, thus ensuring that no matter what I'm compiling, out
comes a release library. This is a handy trick if you have (like me) a
resource-only DLL.

Cheers,
Laurentiu
-- 

Laurentiu Nicolae
Senior Software Engineer
Quintiq

Tel: +31 (0)73 691 07 39
Fax: +31 (0)73 691 07 54
www.quintiq.com 

>>> On 04-Aug-06 at 5:46 PM, "Laurentiu Nicolae"
<Laurentiu.Nicolae at quintiq.com>
wrote:
> Hi,
> 
> I am using CMake to generate Visual Studio projects. I have the
> following dir structure:
> 
> Root
> \DLL1
> \DLL2
> 
> The Root and DLL1 projects support multiple configurations; however,
> DLL2 should only be built as Release. I tried to set
> CMAKE_CONFIGURATION_TYPES again in the \DLL2\CMakeList.txt, but it
> doesn't work. I tried setting it on cache (also forced), but it seems
to
> have no effect. The DLL2 project is generated exactly as the other
ones.
> It seems to me that CMake looks at CMAKE_CONFIGURATION_TYPES only
once,
> and ignores any per-folder settings. Is this the normal behavior?
> 
> Cheers,
> Laurentiu


This message contains information that may be privileged or confidential
and is the property of Quintiq. It is only intended for the person to
whom it is addressed. If you are not the intended recipient, you are not
authorized to read, print, retain, copy, disseminate, distribute or use
this message or any part thereof. If you have received this message in
error, please notify the sender immediately and delete all copies of
this message. Please note that e-mails are susceptible to change,
therefore they are not binding. 


More information about the CMake mailing list