Does anyone have any code that can detect if a given configuration (by
name) is a debug or release configuration? This should work in both
single-configuration and multi-configuration generators.

For example, in Visual Studio:

Release -> Release
MinSizeRel -> Release
RelWithDebInfo -> Release
Debug -> Debug

Also any custom-added configurations should also work.

For single configuration generators, it should also work. Example:

CMAKE_BUILD_TYPE -> MinSizeRel -> should evaluate to "Release".
CMAKE_BUILD_TYPE -> Debug -> should evaluate to "Debug".

Thanks in advance.

I'm creating 1 custom target per configuration that will copy third
party DLL dependencies to the binary output directory. I store my
third party binaries in "release" and "debug" directories, which is
why I need to know whether or not a specific configuration falls into
either of those more general configuration categories.
--

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://www.cmake.org/mailman/listinfo/cmake

Reply via email to