[CMake] Building multiple configurations with Xcode?

clinton at elemtech.com clinton at elemtech.com
Fri May 3 09:21:50 EDT 2013



----- 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.

For the install tree, I don't see how it is known which configurations will be installed.  If there was some way to know both Release and Debug were going to be installed, then it could be known at that point to rename the debug file to "foo-d".

Clint


More information about the CMake mailing list