[cmake-developers] Generator expressions for <archive|library|runtime> output directory

Brad King brad.king at kitware.com
Tue Jul 21 10:03:42 EDT 2015


On 07/17/2015 02:34 PM, Robert Goulet wrote:
> I'm going to be away for a few weeks, is it ok if the master branch
> stays in that state for a while?

Okay.  I've made a note about this issue to make sure it is fixed before 3.4.

Meanwhile I have another comment on genex support in the OUTPUT_DIRECTORY
properties.  Currently the properties support both

 {ARCHIVE,LIBRARY,RUNTIME}_OUTPUT_DIRECTORY

and

 {ARCHIVE,LIBRARY,RUNTIME}_OUTPUT_DIRECTORY_<CONFIG>

variants.  When the former is used CMake will still add the /<CONFIG>
directory suffix to the end of the value.  When the latter is used
CMake does not do this.

With the former, when a genex like $<CONFIG> is used, it is likely
that the user does not want CMake to add the /<CONFIG> suffix.
Perhaps we should detect when a genex is present in the value and
skip adding the suffix, thus trusting the user to have done the right
thing (e.g. $<1:value> will still not get a suffix).

Of course this would have to be documented carefully.  We could also
disallow a genex in the latter (per-config) variants to encourage
modern use of the former.

-Brad



More information about the cmake-developers mailing list