[Cmake-commits] CMake branch, next, updated. v2.8.3-1254-g91ff6bc
David Cole
david.cole at kitware.com
Fri Jan 7 12:22:26 EST 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 91ff6bcf1da227154d8c6c54f06553808c61d3da (commit)
via d67a5134471dadb8b9578d598002832114a171b4 (commit)
via d7a87b52a0d5e71f1d3c6bcb58c9bc2ef1f438a9 (commit)
from f64399934485d4c5159c4b1af8acdae26787cc5f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=91ff6bcf1da227154d8c6c54f06553808c61d3da
commit 91ff6bcf1da227154d8c6c54f06553808c61d3da
Merge: f643999 d67a513
Author: David Cole <david.cole at kitware.com>
AuthorDate: Fri Jan 7 12:22:22 2011 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Jan 7 12:22:22 2011 -0500
Merge topic 'ep-fix-substitutions' into next
d67a513 ExternalProject: Replace location tags in CMAKE_CACHE_ARGS
d7a87b5 Merge branch 'ep-log-output-under-vs' into ep-fix-substitutions
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d67a5134471dadb8b9578d598002832114a171b4
commit d67a5134471dadb8b9578d598002832114a171b4
Author: David Cole <david.cole at kitware.com>
AuthorDate: Fri Jan 7 08:04:16 2011 -0500
Commit: David Cole <david.cole at kitware.com>
CommitDate: Fri Jan 7 08:04:16 2011 -0500
ExternalProject: Replace location tags in CMAKE_CACHE_ARGS
When we added CMAKE_CACHE_ARGS, we did not try it with any
<SOURCE_DIR> or <INSTALL_DIR> references. This commit fixes
that accidental omission.
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 1f8844e..3de6b7e 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -550,7 +550,24 @@ function(_ep_set_directories name)
endforeach()
endfunction(_ep_set_directories)
-function(_ep_write_initial_cache script_filename args)
+
+# IMPORTANT: this MUST be a macro and not a function because of the
+# in-place replacements that occur in each ${var}
+#
+macro(_ep_replace_location_tags target_name)
+ set(vars ${ARGN})
+ foreach(var ${vars})
+ if(${var})
+ foreach(dir SOURCE_DIR BINARY_DIR INSTALL_DIR TMP_DIR)
+ get_property(val TARGET ${target_name} PROPERTY _EP_${dir})
+ string(REPLACE "<${dir}>" "${val}" ${var} "${${var}}")
+ endforeach()
+ endif()
+ endforeach()
+endmacro()
+
+
+function(_ep_write_initial_cache target_name script_filename args)
# Write out values into an initial cache, that will be passed to CMake with -C
set(script_initial_cache "")
set(regex "^([^:]+):([^=]+)=(.*)$")
@@ -584,6 +601,8 @@ function(_ep_write_initial_cache script_filename args)
set(setArg "${setArg}${accumulator}\" CACHE ${type} \"Initial cache\" FORCE)")
set(script_initial_cache "${script_initial_cache}\n${setArg}")
endif()
+ # Replace location tags.
+ _ep_replace_location_tags(${target_name} script_initial_cache)
# 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")
@@ -864,14 +883,7 @@ function(ExternalProject_Add_Step name step)
endif()
# Replace location tags.
- foreach(var comment command work_dir)
- if(${var})
- foreach(dir SOURCE_DIR BINARY_DIR INSTALL_DIR TMP_DIR)
- get_property(val TARGET ${name} PROPERTY _EP_${dir})
- string(REPLACE "<${dir}>" "${val}" ${var} "${${var}}")
- endforeach()
- endif()
- endforeach()
+ _ep_replace_location_tags(${name} comment command work_dir)
# Custom comment?
get_property(comment_set TARGET ${name} PROPERTY _EP_${step}_COMMENT SET)
@@ -1271,7 +1283,7 @@ function(_ep_add_configure_command name)
get_property(cmake_cache_args TARGET ${name} PROPERTY _EP_CMAKE_CACHE_ARGS)
if(cmake_cache_args)
set(_ep_cache_args_script "${tmp_dir}/${name}-cache.cmake")
- _ep_write_initial_cache("${_ep_cache_args_script}" "${cmake_cache_args}")
+ _ep_write_initial_cache(${name} "${_ep_cache_args_script}" "${cmake_cache_args}")
list(APPEND cmd "-C${_ep_cache_args_script}")
endif()
diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt
index a878194..5158f31 100644
--- a/Tests/ExternalProject/CMakeLists.txt
+++ b/Tests/ExternalProject/CMakeLists.txt
@@ -115,7 +115,8 @@ if(can_build_tutorial_step5)
set(proj TutorialStep5-Local)
ExternalProject_Add(${proj}
URL "${CMAKE_CURRENT_SOURCE_DIR}/../Tutorial/Step5"
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -G ${CMAKE_GENERATOR} <SOURCE_DIR>
+ CMAKE_CACHE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
+ CMAKE_ARGS -G ${CMAKE_GENERATOR} <SOURCE_DIR>
TEST_BEFORE_INSTALL 1
LOG_INSTALL 1
)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d7a87b52a0d5e71f1d3c6bcb58c9bc2ef1f438a9
commit d7a87b52a0d5e71f1d3c6bcb58c9bc2ef1f438a9
Merge: 8e6ad8c 44aff73
Author: David Cole <david.cole at kitware.com>
AuthorDate: Fri Jan 7 07:59:21 2011 -0500
Commit: David Cole <david.cole at kitware.com>
CommitDate: Fri Jan 7 07:59:21 2011 -0500
Merge branch 'ep-log-output-under-vs' into ep-fix-substitutions
-----------------------------------------------------------------------
Summary of changes:
Modules/ExternalProject.cmake | 32 ++++++++++++++++++++++----------
Tests/ExternalProject/CMakeLists.txt | 3 ++-
2 files changed, 24 insertions(+), 11 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list