[CMake] Building multiple configurations with Xcode?

Stephen Kelly steveire at gmail.com
Fri May 3 09:28:41 EDT 2013


clinton at elemtech.com wrote:

> 
> 
> ----- Original Message -----
>> Stephen Kelly wrote:
>> 
>> > Is it possible to build multi-config frameworks with cmake at all?
>> 
>> I also notice that the Framework unit test uses
>> 
>>  set_target_properties(foo PROPERTIES
>>    FRAMEWORK TRUE
>>    DEBUG_POSTFIX -d
>>  )
>> 
>> but the debug file is called 'foo', not 'foo-d'. If I use
>> 
>>  cmake --build . --target install --config Debug
>>  cmake --build . --target install --config Release
>> 
>> the debug and release versions overwrite each other.
>> 
>> Does this mean it has always been broken? Has no one ever tried to create
>> a framework using cmake?
> 
> In the build tree, I would expect "foo" not "foo-d" for the debug
> framework.
> And in the build tree, it is possible to differentiate the release from
> debug simply by having two "foo.framework/foo".  One will be in the
> Release folder and one in the Debug folder, and a Debug build will use the
> one from the Debug folder, while the release build will use the one from
> the Release folder.

That indeed appears to be what happens.

> 
> For the install tree, I don't see how it is known which configurations
> will be installed. 

I'm not familiar with xcode, so I assumed that if you install it would 
install all configurations, or you would specify which you want to install.

When I use the command line I use

 cmake --build . --target install --config Debug

so it is specified. 

So, I don't know what you mean here. Can you be more specific, keeping in 
mind I don't know xcode?

Assuming there is some unavoidable reason that the configuration is not 
known when installing, does that mean that frameworks which contain a foo 
and a foo_debug can not be created by cmake?

I left a comment on the original Qt bug above that he should look into using 
DYLD_IMAGE_SUFFIX. Is that right?

Thanks,

Steve.




More information about the CMake mailing list