[Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-665-g773fa85

Brad King brad.king at kitware.com
Wed Oct 19 10:46:38 EDT 2016


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  773fa853f2c6bc5d108b47a536f6cb43658771ac (commit)
       via  63d215dfa8373899d0d35f2c28ea0aa7a672be8c (commit)
      from  24b4801a660b64f6736a0fcc6f8f4c0f2b5d72ed (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=773fa853f2c6bc5d108b47a536f6cb43658771ac
commit 773fa853f2c6bc5d108b47a536f6cb43658771ac
Merge: 24b4801 63d215d
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Oct 19 10:46:37 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Oct 19 10:46:37 2016 -0400

    Merge topic 'external-project-configure-command-extraction' into next
    
    63d215df ExternalProject: support extracting the configure command


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=63d215dfa8373899d0d35f2c28ea0aa7a672be8c
commit 63d215dfa8373899d0d35f2c28ea0aa7a672be8c
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Tue Oct 18 10:39:05 2016 -0400
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Wed Oct 19 08:58:25 2016 -0400

    ExternalProject: support extracting the configure command
    
    Previously, the configure command generated by ExternalProject was not
    accessible prior to actually adding the targets. This makes the CMake
    configure command accessible with just a call to _ep_parse_arguments.
    
    Future work will leverage this to support custom environment settings on
    a per-project basis.

diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 4551cc8..4d702c8 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -1180,6 +1180,7 @@ function(_ep_write_initial_cache target_name script_filename script_initial_cach
   # Write out values into an initial cache, that will be passed to CMake with -C
   # Replace location tags.
   _ep_replace_location_tags(${target_name} script_initial_cache)
+  _ep_replace_location_tags(${target_name} script_filename)
   # Write out the initial cache file to the location specified.
   file(GENERATE OUTPUT "${script_filename}" CONTENT "${script_initial_cache}")
 endfunction()
@@ -2181,24 +2182,7 @@ function(_ep_add_patch_command name)
 endfunction()
 
 
-# TODO: Make sure external projects use the proper compiler
-function(_ep_add_configure_command name)
-  ExternalProject_Get_Property(${name} source_dir source_subdir binary_dir tmp_dir)
-
-  # Depend on other external projects (file-level).
-  set(file_deps)
-  get_property(deps TARGET ${name} PROPERTY _EP_DEPENDS)
-  foreach(dep IN LISTS deps)
-    get_property(dep_type TARGET ${dep} PROPERTY TYPE)
-    if(dep_type STREQUAL "UTILITY")
-      get_property(is_ep TARGET ${dep} PROPERTY _EP_IS_EXTERNAL_PROJECT)
-      if(is_ep)
-        _ep_get_step_stampfile(${dep} "done" done_stamp_file)
-        list(APPEND file_deps ${done_stamp_file})
-      endif()
-    endif()
-  endforeach()
-
+function(_ep_extract_configure_command var name)
   get_property(cmd_set TARGET ${name} PROPERTY _EP_CONFIGURE_COMMAND SET)
   if(cmd_set)
     get_property(cmd TARGET ${name} PROPERTY _EP_CONFIGURE_COMMAND)
@@ -2219,7 +2203,7 @@ function(_ep_add_configure_command name)
     get_property(cmake_cache_default_args TARGET ${name} PROPERTY _EP_CMAKE_CACHE_DEFAULT_ARGS)
 
     if(cmake_cache_args OR cmake_cache_default_args)
-      set(_ep_cache_args_script "${tmp_dir}/${name}-cache-$<CONFIG>.cmake")
+      set(_ep_cache_args_script "<TMP_DIR>/${name}-cache-$<CONFIG>.cmake")
       if(cmake_cache_args)
         _ep_command_line_to_initial_cache(script_initial_cache_force "${cmake_cache_args}" 1)
       endif()
@@ -2261,9 +2245,32 @@ function(_ep_add_configure_command name)
       endif()
     endif()
 
-    list(APPEND cmd "${source_dir}${source_subdir}")
+    list(APPEND cmd "<SOURCE_DIR><SOURCE_SUBDIR>")
   endif()
 
+  set("${var}" "${cmd}" PARENT_SCOPE)
+endfunction()
+
+# TODO: Make sure external projects use the proper compiler
+function(_ep_add_configure_command name)
+  ExternalProject_Get_Property(${name} binary_dir tmp_dir)
+
+  # Depend on other external projects (file-level).
+  set(file_deps)
+  get_property(deps TARGET ${name} PROPERTY _EP_DEPENDS)
+  foreach(dep IN LISTS deps)
+    get_property(dep_type TARGET ${dep} PROPERTY TYPE)
+    if(dep_type STREQUAL "UTILITY")
+      get_property(is_ep TARGET ${dep} PROPERTY _EP_IS_EXTERNAL_PROJECT)
+      if(is_ep)
+        _ep_get_step_stampfile(${dep} "done" done_stamp_file)
+        list(APPEND file_deps ${done_stamp_file})
+      endif()
+    endif()
+  endforeach()
+
+  _ep_extract_configure_command(cmd ${name})
+
   # If anything about the configure command changes, (command itself, cmake
   # used, cmake args or cmake generator) then re-run the configure step.
   # Fixes issue https://gitlab.kitware.com/cmake/cmake/issues/10258

-----------------------------------------------------------------------

Summary of changes:
 Modules/ExternalProject.cmake |   47 +++++++++++++++++++++++------------------
 1 file changed, 27 insertions(+), 20 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list