summaryrefslogtreecommitdiffstats
path: root/Modules/ExternalProject.cmake
diff options
context:
space:
mode:
authorMarcus D. Hanwell <marcus.hanwell@kitware.com>2010-12-13 17:50:38 (GMT)
committerMarcus D. Hanwell <marcus.hanwell@kitware.com>2010-12-13 17:50:38 (GMT)
commit3bc828df9a0869f292de09ddcec306c16fe6d743 (patch)
tree657ded0672012bf1e193f5393ccf0264fcfc0dea /Modules/ExternalProject.cmake
parentb316087c095e23e131bf2ccf5eb7110b35df0e29 (diff)
downloadCMake-3bc828df9a0869f292de09ddcec306c16fe6d743.zip
CMake-3bc828df9a0869f292de09ddcec306c16fe6d743.tar.gz
CMake-3bc828df9a0869f292de09ddcec306c16fe6d743.tar.bz2
Fixed bug where last entry would be lost.
The code to build up a list was missing the final entry in an initial cache.
Diffstat (limited to 'Modules/ExternalProject.cmake')
-rw-r--r--Modules/ExternalProject.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 542dbc2..a3590cf 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -579,6 +579,11 @@ function(_ep_write_initial_cache script_filename args)
set(accumulator "${accumulator};${line}")
endif()
endforeach()
+ # Catch the final line of the args
+ if(setArg)
+ set(setArg "${setArg}${accumulator}\" CACHE ${type} \"Initial cache\" FORCE)")
+ set(script_initial_cache "${script_initial_cache}\n${setArg}")
+ endif()
# Write out the initial cache file to the location specified.
if(NOT EXISTS "${script_filename}.in")
file(WRITE "${script_filename}.in" "\@script_initial_cache\@\n")