summaryrefslogtreecommitdiffstats
path: root/Modules/ExternalProject.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-06-05 15:23:22 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-06-05 15:23:49 (GMT)
commit21b7e1480056ba9a057ff15573fe22ad8decc2e0 (patch)
treeab6f1c373bb2cb84ab9bb23f12e17824c265c4c6 /Modules/ExternalProject.cmake
parentf790273ef0fb33145ceb9d5a19c22c56be76a023 (diff)
parent7ad5165c675d23e9d3f8c076b7cb32a2618e7e96 (diff)
downloadCMake-21b7e1480056ba9a057ff15573fe22ad8decc2e0.zip
CMake-21b7e1480056ba9a057ff15573fe22ad8decc2e0.tar.gz
CMake-21b7e1480056ba9a057ff15573fe22ad8decc2e0.tar.bz2
Merge topic 'ep-support-passing-var-ending-with-notfound'
7ad5165c67 ExternalProject: Fix cache generation when args end with "-NOTFOUND" Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2127
Diffstat (limited to 'Modules/ExternalProject.cmake')
-rw-r--r--Modules/ExternalProject.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 370d447..0c5b33f 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -1686,7 +1686,7 @@ function(_ep_command_line_to_initial_cache var args force)
foreach(line ${args})
if("${line}" MATCHES "^-D(.*)")
set(line "${CMAKE_MATCH_1}")
- if(setArg)
+ if(NOT "${setArg}" STREQUAL "")
# This is required to build up lists in variables, or complete an entry
string(APPEND setArg "${accumulator}\" CACHE ${type} \"Initial cache\" ${forceArg})")
string(APPEND script_initial_cache "\n${setArg}")