[cmake-developers] [PATCH] ExternalProject_Add: Allow generator expressions in CMAKE_CACHE_ARGS

Brad King brad.king at kitware.com
Mon Apr 20 10:48:47 EDT 2015


On 04/17/2015 01:58 PM, David Cole via cmake-developers wrote:
> Great -- thanks for checking. This proposed change looks reasonable to me...

Thanks for checking it, David.

Andrey, thanks for working on this!

On 04/17/2015 12:55 AM, Andrey Pokrovskiy wrote:
> generator expressions are supported in CMAKE_ARGS

This is not true when the LOG_CONFIGURE option is used, and for a very
similar reason.  See this issue:

 ExternalProject commands do not support generator expressions
 http://www.cmake.org/Bug/view.php?id=15287

In particular, see my note here:

 http://www.cmake.org/Bug/view.php?id=15287#c37425

The multi-config generator problem will likely trigger with your
proposed patch too.  Please look at updating the
_ep_write_initial_cache call site with something like

 -      set(_ep_cache_args_script "${tmp_dir}/${name}-cache.cmake")
 +      set(_ep_cache_args_script "${tmp_dir}/${name}-cache-$<CONFIG>.cmake")

(untested).

Thanks,
-Brad



More information about the cmake-developers mailing list