On Wed, Feb 05, 2014 at 12:00:41 -0700, Steve Wilson wrote:
> In the documentation for CMAKE_CONFIGURATION_TYPES it states:
> 
> “… but can be extended to provide other build types. … “
> 
> How would one provide other build types?

It's just a list with a default of
"Release;RelWithDebInfo;RelMinSize;Debug", so just add your
configuration name to the list. Please do *not* set it in other
generators which don't already use it (they use CMAKE_BUILD_TYPE) since
they only generate for a single build type at a time and some projects
have to detect whether subdirectories will be thrown into places by the
build for various reasons[1].

In order for any custom configurations to be *useful*, you'd have to
populate the variables for them (e.g., CMAKE_CXX_FLAGS_<CONFIG> and
friends).

--Ben

[1]The one I usually have to deal with is Python builds where I want to
move the configuration directory to a different place:

    lib/python/$<CONFIGURATION>/.../module.so

rather than:

    lib/python/.../$<CONFIGURATION>/module.so

For make and Ninja generators, such hackery isn't necessary because
there isn't an implicit subdirectory. Of course, if there is some way to
detect these generators other than CMAKE_CONFIGURATION_TYPES and
CMAKE_BUILD_TYPE, that would be nice as well :) .
-- 

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to