[CMake] List of debug configurations for multi-generators?

Robert Dailey rcdailey.lists at gmail.com
Thu Dec 3 10:28:12 EST 2015


For any arbitrary configuration in a multi-generator, I need to
determine if it's configuration is optimized or not (release or
debug). At the moment I thought I could do this by comparing against
the list of DEBUG_CONFIGURATIONS, however this property is empty if I
have not set it. I was expecting CMake to fill this in at least with
"Debug" for the pre-provided configurations.

Is there no way to get this information? The only other way to do this
is to compare if the current configuration is "Debug", and if not,
treat it as release. But this will not work if I add my own custom
configurations.

I need to do this because for third party libraries, I only build
"Debug" and "Release" versions. "RelMinSize" and "RelWithDebInfo" both
use "release" libraries. I use this logic to help build relative paths
to point to the proper libs.


More information about the CMake mailing list