diff options
author | Andrey Pokrovskiy <pokroa@amazon.com> | 2015-04-17 04:42:19 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-04-21 14:50:29 (GMT) |
commit | 7bd8cfb813e9bd19cebda92b280beb2deaf052d4 (patch) | |
tree | ad76020e79e4d286a99a0c19d74a8d4cb7b32837 /Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS.cmake | |
parent | 1cf43dcf7c63a61e6254d102314b121623d2086d (diff) | |
download | CMake-7bd8cfb813e9bd19cebda92b280beb2deaf052d4.zip CMake-7bd8cfb813e9bd19cebda92b280beb2deaf052d4.tar.gz CMake-7bd8cfb813e9bd19cebda92b280beb2deaf052d4.tar.bz2 |
ExternalProject: Allow generator expressions in initial cache options
Use file(GENERATE) to write the initial cache file so that we can
evaluate generator expressions. Use a per-config initial cache file
name in case the content varies by configuration.
Diffstat (limited to 'Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS.cmake')
-rw-r--r-- | Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS.cmake | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS.cmake b/Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS.cmake index 5e37eec..62b1640 100644 --- a/Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS.cmake +++ b/Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS.cmake @@ -1,5 +1,8 @@ +if(NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE Debug) +endif() include(ExternalProject) ExternalProject_Add(FOO TMP_DIR "${CMAKE_CURRENT_BINARY_DIR}/tmp" DOWNLOAD_COMMAND "" - CMAKE_CACHE_ARGS "-DFOO:STRING=BAR") + CMAKE_CACHE_ARGS "-DFOO:STRING=$<1:BAR>$<0:BAD>") |