[CMake] Refer to all debug or release targets with generator expressions

Robert Dailey rcdailey.lists at gmail.com
Mon Oct 27 20:10:39 EDT 2014


I know that when defining link libraries, I can do this:

$<$<CONFIG:Debug>:${my_debug_libs}>

The debug libraries will be the same for all debug targets. Likewise
with Release targets. Is there a way to refer to *all* release targets
using generator expressions? There are 3 release configurations that
ship with CMake by default for IDEs like Visual Studio. It would be
redundant for me to specify a generator expression for each and every
configuration. It'd be simpler to somehow map my release libs to all
release configurations somehow since they do not differ.

Any ideas on how to do this?


More information about the CMake mailing list