[Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-597-g3881d58

Brad King brad.king at kitware.com
Tue Oct 18 13:08:54 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  3881d58885ad322596ceb98a66631b0f9a65bc3c (commit)
       via  615f3ed2b43129bd7d2466d369beef3003e1e0de (commit)
       via  fdce782b61c6a1501b6ea2459c659d9a42bae59b (commit)
      from  387e43639e56691356a9c5617b24ff7ff7e25e92 (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=3881d58885ad322596ceb98a66631b0f9a65bc3c
commit 3881d58885ad322596ceb98a66631b0f9a65bc3c
Merge: 387e436 615f3ed
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Oct 18 13:08:52 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Oct 18 13:08:52 2016 -0400

    Merge topic 'external-project-source-subdir-usage' into next
    
    615f3ed2 ExternalProject: make SOURCE_SUBDIR directly appendable
    fdce782b ExternalProject: error out only if the property is unset


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=615f3ed2b43129bd7d2466d369beef3003e1e0de
commit 615f3ed2b43129bd7d2466d369beef3003e1e0de
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Tue Oct 18 10:55:24 2016 -0400
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Tue Oct 18 12:51:38 2016 -0400

    ExternalProject: make SOURCE_SUBDIR directly appendable
    
    This allows it to be used in expansions without being conditional based
    on its value.

diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index e3bdc6d..1f64701 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -1087,10 +1087,14 @@ function(_ep_set_directories name)
   endforeach()
   get_property(source_subdir TARGET ${name} PROPERTY _EP_SOURCE_SUBDIR)
   if(NOT source_subdir)
-    set_property(TARGET ${name} PROPERTY _EP_SOURCE_SUBDIR ".")
+    set_property(TARGET ${name} PROPERTY _EP_SOURCE_SUBDIR "")
   elseif(IS_ABSOLUTE "${source_subdir}")
     message(FATAL_ERROR
       "External project ${name} has non-relative SOURCE_SUBDIR!")
+  else()
+    # Prefix with a slash so that when appended to the source directory, it
+    # behaves as expected.
+    set_property(TARGET ${name} PROPERTY _EP_SOURCE_SUBDIR "/${source_subdir}")
   endif()
   if(build_in_source)
     get_property(source_dir TARGET ${name} PROPERTY _EP_SOURCE_DIR)
@@ -2257,11 +2261,7 @@ function(_ep_add_configure_command name)
       endif()
     endif()
 
-    if(source_subdir STREQUAL ".")
-      list(APPEND cmd "${source_dir}")
-    else()
-      list(APPEND cmd "${source_dir}/${source_subdir}")
-    endif()
+    list(APPEND cmd "${source_dir}${source_subdir}")
   endif()
 
   # If anything about the configure command changes, (command itself, cmake

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fdce782b61c6a1501b6ea2459c659d9a42bae59b
commit fdce782b61c6a1501b6ea2459c659d9a42bae59b
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Tue Oct 18 12:50:46 2016 -0400
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Tue Oct 18 12:51:06 2016 -0400

    ExternalProject: error out only if the property is unset
    
    Property values may be empty; instead make sure they exist and allow for
    empty values.

diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index bbeeeed..e3bdc6d 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -1184,10 +1184,11 @@ endfunction()
 function(ExternalProject_Get_Property name)
   foreach(var ${ARGN})
     string(TOUPPER "${var}" VAR)
-    get_property(${var} TARGET ${name} PROPERTY _EP_${VAR})
-    if(NOT ${var})
+    get_property(is_set TARGET ${name} PROPERTY _EP_${VAR} SET)
+    if(NOT is_set)
       message(FATAL_ERROR "External project \"${name}\" has no ${var}")
     endif()
+    get_property(${var} TARGET ${name} PROPERTY _EP_${VAR})
     set(${var} "${${var}}" PARENT_SCOPE)
   endforeach()
 endfunction()

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

Summary of changes:
 Modules/ExternalProject.cmake |   17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list