[Cmake-commits] CMake branch, master, updated. v3.6.1-637-g65120d1

2016-08-16 Thread Kitware Robot
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, master has been updated
   via  65120d180b6e7658e296fd2c4c85a23f337c06dc (commit)
  from  e240a7c0176450e092e2398148c1e13f8940c239 (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=65120d180b6e7658e296fd2c4c85a23f337c06dc
commit 65120d180b6e7658e296fd2c4c85a23f337c06dc
Author: Kitware Robot 
AuthorDate: Wed Aug 17 00:01:04 2016 -0400
Commit: Kitware Robot 
CommitDate: Wed Aug 17 00:01:04 2016 -0400

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 8d950fd..ac1ae03 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
 # CMake version number components.
 set(CMake_VERSION_MAJOR 3)
 set(CMake_VERSION_MINOR 6)
-set(CMake_VERSION_PATCH 20160816)
+set(CMake_VERSION_PATCH 20160817)
 #set(CMake_VERSION_RC 1)

---

Summary of changes:
 Source/CMakeVersion.cmake |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v3.6.1-1278-g662661b

2016-08-16 Thread Daniel Pfeifer
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  662661b2b462946f8ba6c82af22f014a18619756 (commit)
   via  e7b842e18955d13f6d9c021bab4a8935bf282744 (commit)
  from  11d0fcfcfecdcef2e21a1acb550979d208e43aa0 (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=662661b2b462946f8ba6c82af22f014a18619756
commit 662661b2b462946f8ba6c82af22f014a18619756
Merge: 11d0fcf e7b842e
Author: Daniel Pfeifer 
AuthorDate: Tue Aug 16 19:50:25 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Tue Aug 16 19:50:25 2016 -0400

Merge topic 'readability-named-parameter' into next

e7b842e1 Make sure unnused parameters are /*named*/


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e7b842e18955d13f6d9c021bab4a8935bf282744
commit e7b842e18955d13f6d9c021bab4a8935bf282744
Author: Daniel Pfeifer 
AuthorDate: Wed Aug 17 01:49:57 2016 +0200
Commit: Daniel Pfeifer 
CommitDate: Wed Aug 17 01:49:57 2016 +0200

Make sure unnused parameters are /*named*/

diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx 
b/Source/CPack/cmCPackArchiveGenerator.cxx
index b1f6864..9120a2f 100644
--- a/Source/CPack/cmCPackArchiveGenerator.cxx
+++ b/Source/CPack/cmCPackArchiveGenerator.cxx
@@ -259,7 +259,7 @@ int cmCPackArchiveGenerator::PackageFiles()
   return 1;
 }
 
-int cmCPackArchiveGenerator::GenerateHeader(std::ostream*)
+int cmCPackArchiveGenerator::GenerateHeader(std::ostream* /*unused*/)
 {
   return 1;
 }
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index 771519c..de572c0 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -50,7 +50,7 @@ static const char* cmDocumentationOptions[][2] = {
   { CM_NULLPTR, CM_NULLPTR }
 };
 
-int cpackUnknownArgument(const char*, void*)
+int cpackUnknownArgument(const char* /*unused*/, void* /*unused*/)
 {
   return 1;
 }
diff --git a/Source/CTest/cmCTestBZR.cxx b/Source/CTest/cmCTestBZR.cxx
index 0e08e1c..7baf7a3 100644
--- a/Source/CTest/cmCTestBZR.cxx
+++ b/Source/CTest/cmCTestBZR.cxx
@@ -19,7 +19,7 @@
 
 #include 
 
-extern "C" int cmBZRXMLParserUnknownEncodingHandler(void*,
+extern "C" int cmBZRXMLParserUnknownEncodingHandler(void* /*unused*/,
 const XML_Char* name,
 XML_Encoding* info)
 {
@@ -215,7 +215,7 @@ private:
 return true;
   }
 
-  void StartElement(const std::string& name, const char**) CM_OVERRIDE
+  void StartElement(const std::string& name, const char** /*atts*/) CM_OVERRIDE
   {
 this->CData.clear();
 if (name == "log") {
@@ -275,7 +275,7 @@ private:
 this->CData.clear();
   }
 
-  void ReportError(int, int, const char* msg) CM_OVERRIDE
+  void ReportError(int /*line*/, int /*column*/, const char* msg) CM_OVERRIDE
   {
 this->BZR->Log << "Error parsing bzr log xml: " << msg << "\n";
   }
diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx 
b/Source/CTest/cmCTestBuildAndTestHandler.cxx
index eddbddc..9dab98a 100644
--- a/Source/CTest/cmCTestBuildAndTestHandler.cxx
+++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx
@@ -123,14 +123,15 @@ int cmCTestBuildAndTestHandler::RunCMake(std::string* 
outstring,
   return 0;
 }
 
-void CMakeMessageCallback(const char* m, const char*, bool&, void* s)
+void CMakeMessageCallback(const char* m, const char* /*unused*/,
+  bool& /*unused*/, void* s)
 {
   std::string* out = (std::string*)s;
   *out += m;
   *out += "\n";
 }
 
-void CMakeProgressCallback(const char* msg, float, void* s)
+void CMakeProgressCallback(const char* msg, float /*unused*/, void* s)
 {
   std::string* out = (std::string*)s;
   *out += msg;
diff --git a/Source/CTest/cmCTestCurl.cxx b/Source/CTest/cmCTestCurl.cxx
index b335e32..6910f6f 100644
--- a/Source/CTest/cmCTestCurl.cxx
+++ b/Source/CTest/cmCTestCurl.cxx
@@ -54,8 +54,8 @@ static size_t curlWriteMemoryCallback(void* ptr, size_t size, 
size_t nmemb,
   return realsize;
 }
 
-static size_t curlDebugCallback(CURL*, curl_infotype, char* chPtr, size_t size,
-void* data)
+static size_t curlDebugCallback(CURL* /*unused*/, curl_infotype /*unused*/,
+char* chPtr, size_t size, void* data)
 {
   std::vector* vec = static_cast*>(data);
   vec->insert(vec->end(), chPtr, chPtr + size);
diff --git a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx 
b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx
index 1bda9be..09ae1fc 100644
--- a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx
+++ b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx
@@ -14,7 +14,7 @@
 #includ

[Cmake-commits] CMake branch, next, updated. v3.6.1-1276-g11d0fcf

2016-08-16 Thread Daniel Pfeifer
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  11d0fcfcfecdcef2e21a1acb550979d208e43aa0 (commit)
   via  a2af850ba6dbee7797484ec5f6696525123023fc (commit)
  from  bbafe31c4f905a77622f6da7307c05dba838ac80 (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=11d0fcfcfecdcef2e21a1acb550979d208e43aa0
commit 11d0fcfcfecdcef2e21a1acb550979d208e43aa0
Merge: bbafe31 a2af850
Author: Daniel Pfeifer 
AuthorDate: Tue Aug 16 19:09:24 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Tue Aug 16 19:09:24 2016 -0400

Merge topic 'include-what-you-use' into next

a2af850b fix a batch of include-what-you-use violations


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a2af850ba6dbee7797484ec5f6696525123023fc
commit a2af850ba6dbee7797484ec5f6696525123023fc
Author: Daniel Pfeifer 
AuthorDate: Wed Aug 17 01:08:13 2016 +0200
Commit: Daniel Pfeifer 
CommitDate: Wed Aug 17 01:08:13 2016 +0200

fix a batch of include-what-you-use violations

diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.h 
b/Source/CursesDialog/cmCursesCacheEntryComposite.h
index 8ed3902..c9c8238 100644
--- a/Source/CursesDialog/cmCursesCacheEntryComposite.h
+++ b/Source/CursesDialog/cmCursesCacheEntryComposite.h
@@ -14,6 +14,8 @@
 
 #include "cmCursesLabelWidget.h"
 
+class cmake;
+
 class cmCursesCacheEntryComposite
 {
 public:
diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h
index 2331867..14e0f0a 100644
--- a/Source/cmCacheManager.h
+++ b/Source/cmCacheManager.h
@@ -17,6 +17,7 @@
 #include "cmPropertyMap.h"
 #include "cmState.h"
 
+class cmake;
 class cmMarkAsAdvancedCommand;
 
 /** \class cmCacheManager
diff --git a/Source/cmGhsMultiTargetGenerator.h 
b/Source/cmGhsMultiTargetGenerator.h
index 92a1109..118cae6 100644
--- a/Source/cmGhsMultiTargetGenerator.h
+++ b/Source/cmGhsMultiTargetGenerator.h
@@ -16,13 +16,13 @@
 
 #include "cmTarget.h"
 
+class cmCustomCommand;
 class cmGeneratedFileStream;
+class cmGeneratorTarget;
 class cmGlobalGhsMultiGenerator;
 class cmLocalGhsMultiGenerator;
 class cmMakefile;
 class cmSourceFile;
-class cmGeneratedFileStream;
-class cmCustomCommand;
 
 class cmGhsMultiTargetGenerator
 {
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 0470508..d4eb90a 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -15,10 +15,19 @@
 #include "cmCacheManager.h"
 #include "cmCommand.h"
 #include "cmDefinitions.h"
+#include "cmListFileCache.h"
+#include "cmSystemTools.h"
+#include "cmTypeMacro.h"
 #include "cmVersion.h"
 #include "cmake.h"
 
+#include 
 #include 
+#include 
+#include 
+#include 
+#include 
+#include 
 
 struct cmState::SnapshotDataType
 {
diff --git a/Source/cmState.h b/Source/cmState.h
index e5f9917..9ab4213 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -12,19 +12,25 @@
 #ifndef cmState_h
 #define cmState_h
 
-#include "cmStandardIncludes.h"
+#include  // IWYU pragma: keep
 
 #include "cmAlgorithms.h"
+#include "cmDefinitions.h"
 #include "cmLinkedTree.h"
 #include "cmPolicies.h"
+#include "cmProperty.h"
 #include "cmPropertyDefinitionMap.h"
 #include "cmPropertyMap.h"
 
-class cmake;
+#include 
+#include 
+#include 
+#include 
+
+class cmCacheManager;
 class cmCommand;
-class cmDefinitions;
 class cmListFileBacktrace;
-class cmCacheManager;
+class cmPropertyDefinition;
 
 class cmState
 {
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index d0a28e1..3c1a9f4 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -12,10 +12,13 @@
 #ifndef cmSystemTools_h
 #define cmSystemTools_h
 
-#include "cmStandardIncludes.h"
+#include  // IWYU pragma: keep
 
 #include 
 #include 
+#include 
+#include 
+#include 
 
 class cmSystemToolsFileTime;
 
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 8476538..5681885 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -12,21 +12,25 @@
 #include "cmTarget.h"
 
 #include "cmAlgorithms.h"
-#include "cmComputeLinkInformation.h"
 #include "cmGeneratorExpression.h"
-#include "cmGeneratorExpressionDAGChecker.h"
+#include "cmGeneratorTarget.h"
 #include "cmGlobalGenerator.h"
 #include "cmListFileCache.h"
 #include "cmMakefile.h"
 #include "cmOutputConverter.h"
+#include "cmProperty.h"
 #include "cmSourceFile.h"
+#include "cmSourceFileLocation.h"
+#include "cmSystemTools.h"
 #include "cmake.h"
+
+#include 
 #include 
 #include 
-#include 
 #include 
 #include 
-#include  // required for atof
+#include 
+#include 
 
 #if defined(CMake_HAVE_CXX_UNORDERED_SET)
 #include 
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 209a729..fc30166 100644
--- a/Source/cm

[Cmake-commits] CMake branch, next, updated. v3.6.1-1274-gbbafe31

2016-08-16 Thread Brad King
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  bbafe31c4f905a77622f6da7307c05dba838ac80 (commit)
   via  ea51b71a4f76597ada400d8bdea75cc9548530a3 (commit)
   via  c18dc6fbe5b68312be52353aa0a493106584ffe7 (commit)
  from  1dde35c113c24ec4d47e1a624ee68ae797e6a2c6 (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=bbafe31c4f905a77622f6da7307c05dba838ac80
commit bbafe31c4f905a77622f6da7307c05dba838ac80
Merge: 1dde35c ea51b71
Author: Brad King 
AuthorDate: Tue Aug 16 14:27:14 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Tue Aug 16 14:27:14 2016 -0400

Merge topic 'cmake-developer-reference' into next

ea51b71a QtIFW: Developer Reference installation
c18dc6fb Added CMake_BUILD_DEVELOPER_REFERENCE option


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ea51b71a4f76597ada400d8bdea75cc9548530a3
commit ea51b71a4f76597ada400d8bdea75cc9548530a3
Author: Konstantin Podsvirov 
AuthorDate: Thu Aug 4 13:02:39 2016 +0300
Commit: Konstantin Podsvirov 
CommitDate: Tue Aug 16 19:02:35 2016 +0300

QtIFW: Developer Reference installation

diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake
index 34bb6bb..4d7c6fd 100644
--- a/CMakeCPack.cmake
+++ b/CMakeCPack.cmake
@@ -107,6 +107,14 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
 if(SPHINX_QTHELP)
   list(APPEND _CPACK_IFW_COMPONENTS_ALL sphinx-qthelp)
 endif()
+if(CMake_BUILD_DEVELOPER_REFERENCE)
+  if(CMake_BUILD_DEVELOPER_REFERENCE_HTML)
+list(APPEND _CPACK_IFW_COMPONENTS_ALL cmake-developer-reference-html)
+  endif()
+  if(CMake_BUILD_DEVELOPER_REFERENCE_QTHELP)
+list(APPEND _CPACK_IFW_COMPONENTS_ALL cmake-developer-reference-qthelp)
+  endif()
+endif()
 set(_CPACK_IFW_COMPONENTS_CONFIGURATION "
   # Components
   set(CPACK_COMPONENTS_ALL \"${_CPACK_IFW_COMPONENTS_ALL}\")
@@ -122,7 +130,8 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
   # Components scripts configuration
   foreach(_script
 CMake
-CMake.Documentation.SphinxHTML)
+CMake.Documentation.SphinxHTML
+CMake.DeveloperReference.HTML)
 configure_file("${CMake_SOURCE_DIR}/Source/QtIFW/${_script}.qs.in"
   "${CMake_BINARY_DIR}/${_script}.qs" @ONLY)
   endforeach()
@@ -136,6 +145,11 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
 if(SPHINX_HTML)
   set(_CPACK_IFW_SHORTCUT_OPTIONAL 
"${_CPACK_IFW_SHORTCUT_OPTIONAL}component.addOperation(\"CreateShortcut\", 
\"@TargetDir@/doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}/html/index.html\",
 \"@StartMenuDir@/CMake Documentation.lnk\");\n")
 endif()
+if(CMake_BUILD_DEVELOPER_REFERENCE)
+  if(CMake_BUILD_DEVELOPER_REFERENCE_HTML)
+  set(_CPACK_IFW_SHORTCUT_OPTIONAL 
"${_CPACK_IFW_SHORTCUT_OPTIONAL}component.addOperation(\"CreateShortcut\", 
\"@TargetDir@/doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}/developer-reference/html/index.html\",
 \"@StartMenuDir@/CMake Developer Reference.lnk\");\n")
+  endif()
+endif()
 configure_file("${CMake_SOURCE_DIR}/Source/QtIFW/installscript.qs.in"
   "${CMake_BINARY_DIR}/installscript.qs" @ONLY
 )
diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in
index 1d61613..d7a33bc 100644
--- a/CMakeCPackOptions.cmake.in
+++ b/CMakeCPackOptions.cmake.in
@@ -175,6 +175,29 @@ if(CPACK_GENERATOR MATCHES "IFW")
   set(CPACK_IFW_COMPONENT_SPHINX-QTHELP_NAME "SphinxQtHelp")
   set(CPACK_IFW_COMPONENT_SPHINX-QTHELP_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
 
+  # Developer Reference
+  set(CPACK_COMPONENT_GROUP_DEVELOPERREFERENCE_DISPLAY_NAME "Developer 
Reference")
+  set(CPACK_COMPONENT_GROUP_DEVELOPERREFERENCE_DESCRIPTION
+"CMake Reference in different formats (html, qch)")
+  set(CPACK_COMPONENT_GROUP_DEVELOPERREFERENCE_PARENT_GROUP CMake)
+  set(CPACK_IFW_COMPONENT_GROUP_DEVELOPERREFERENCE_PRIORITY 50)
+  set(CPACK_IFW_COMPONENT_GROUP_DEVELOPERREFERENCE_VERSION
+"@_CPACK_IFW_PACKAGE_VERSION@")
+
+  set(CPACK_COMPONENT_CMAKE-DEVELOPER-REFERENCE-HTML_DISPLAY_NAME "HTML")
+  set(CPACK_COMPONENT_CMAKE-DEVELOPER-REFERENCE-HTML_GROUP DeveloperReference)
+  set(CPACK_COMPONENT_CMAKE-DEVELOPER-REFERENCE-HTML_DISABLED TRUE)
+  set(CPACK_IFW_COMPONENT_CMAKE-DEVELOPER-REFERENCE-HTML_NAME "HTML")
+  set(CPACK_IFW_COMPONENT_CMAKE-DEVELOPER-REFERENCE-HTML_SCRIPT
+"@CMake_BINARY_DIR@/CMake.DeveloperReference.HTML.qs")
+  set(CPACK_IFW_COMPONENT_CMAKE-DEVELOPER-REFERENCE-HTML_VERSION 
"@_CPACK_IFW_PACKAGE_VERSION@")
+
+  set(CPACK_COMPONENT_CMAKE-DEVELOPER-REFERENCE-QTHELP_DISPLAY_NAME "Qt 
Compressed Help")
+  set(CPACK_COMPONENT_CMAKE-DEVELOPER

[Cmake-commits] CMake branch, next, updated. v3.6.1-1271-g1dde35c

2016-08-16 Thread Brad King
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  1dde35c113c24ec4d47e1a624ee68ae797e6a2c6 (commit)
   via  7ded655f7ba82ea72a82d0555449f2df5ef38594 (commit)
  from  8bc1788a12d60261a957b98254694c4a776ce62a (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=1dde35c113c24ec4d47e1a624ee68ae797e6a2c6
commit 1dde35c113c24ec4d47e1a624ee68ae797e6a2c6
Merge: 8bc1788 7ded655
Author: Brad King 
AuthorDate: Tue Aug 16 14:20:09 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Tue Aug 16 14:20:09 2016 -0400

Merge topic 'FindCUDA-target-include-dirs' into next

7ded655f FindCUDA: Take NVCC include directories from target properties


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7ded655f7ba82ea72a82d0555449f2df5ef38594
commit 7ded655f7ba82ea72a82d0555449f2df5ef38594
Author: Peter Boettcher 
AuthorDate: Tue Aug 16 13:22:06 2016 -0400
Commit: Brad King 
CommitDate: Tue Aug 16 14:16:35 2016 -0400

FindCUDA: Take NVCC include directories from target properties

Fixes issue where include directories specified on the target are
not passed on to NVCC.  This includes both target_include_directories()
as well as include directories added by dependency chaining.

Closes: #14201

diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 78b716d..317a9cd 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -730,7 +730,7 @@ else()
 endif()
 
 # Set the user list of include dir to nothing to initialize it.
-set (CUDA_NVCC_INCLUDE_ARGS_USER "")
+set (CUDA_NVCC_INCLUDE_DIRS_USER "")
 set (CUDA_INCLUDE_DIRS ${CUDA_TOOLKIT_INCLUDE})
 
 macro(cuda_find_library_local_first_with_path_ext _var _names _doc _path_ext )
@@ -1025,7 +1025,7 @@ find_package_handle_standard_args(CUDA
 # Add include directories to pass to the nvcc command.
 macro(CUDA_INCLUDE_DIRECTORIES)
   foreach(dir ${ARGN})
-list(APPEND CUDA_NVCC_INCLUDE_ARGS_USER -I${dir})
+list(APPEND CUDA_NVCC_INCLUDE_DIRS_USER ${dir})
   endforeach()
 endmacro()
 
@@ -1249,17 +1249,15 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
   endif()
 
   # Initialize our list of includes with the user ones followed by the CUDA 
system ones.
-  set(CUDA_NVCC_INCLUDE_ARGS ${CUDA_NVCC_INCLUDE_ARGS_USER} 
"-I${CUDA_INCLUDE_DIRS}")
-  # Get the include directories for this directory and use them for our nvcc 
command.
-  # Remove duplicate entries which may be present since include_directories
-  # in CMake >= 2.8.8 does not remove them.
-  get_directory_property(CUDA_NVCC_INCLUDE_DIRECTORIES INCLUDE_DIRECTORIES)
-  list(REMOVE_DUPLICATES CUDA_NVCC_INCLUDE_DIRECTORIES)
-  if(CUDA_NVCC_INCLUDE_DIRECTORIES)
-foreach(dir ${CUDA_NVCC_INCLUDE_DIRECTORIES})
-  list(APPEND CUDA_NVCC_INCLUDE_ARGS -I${dir})
-endforeach()
-  endif()
+  set(CUDA_NVCC_INCLUDE_DIRS ${CUDA_NVCC_INCLUDE_DIRS_USER} 
"${CUDA_INCLUDE_DIRS}")
+  # Append the include directories for this target via generator expression, 
which is
+  # expanded by the FILE(GENERATE) call below.  This generator expression 
captures all
+  # include dirs set by the user, whether via directory properties or target 
properties
+  list(APPEND CUDA_NVCC_INCLUDE_DIRS 
"$")
+
+  # Do the same thing with compile definitions
+  set(CUDA_NVCC_COMPILE_DEFINITIONS 
"$")
+
 
   # Reset these variables
   set(CUDA_WRAP_OPTION_NVCC_FLAGS)
@@ -1349,14 +1347,6 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
 string(REGEX REPLACE "[-]+std=c\\+\\+11" "" _cuda_host_flags 
"${_cuda_host_flags}")
   endif()
 
-  # Get the list of definitions from the directory property
-  get_directory_property(CUDA_NVCC_DEFINITIONS COMPILE_DEFINITIONS)
-  if(CUDA_NVCC_DEFINITIONS)
-foreach(_definition ${CUDA_NVCC_DEFINITIONS})
-  list(APPEND nvcc_flags "-D${_definition}")
-endforeach()
-  endif()
-
   if(_cuda_build_shared_libs)
 list(APPEND nvcc_flags "-D${cuda_target}_EXPORTS")
   endif()
diff --git a/Modules/FindCUDA/run_nvcc.cmake b/Modules/FindCUDA/run_nvcc.cmake
index ff1f515..28cc1e9 100644
--- a/Modules/FindCUDA/run_nvcc.cmake
+++ b/Modules/FindCUDA/run_nvcc.cmake
@@ -73,10 +73,25 @@ set(CUDA_NVCC_EXECUTABLE "@CUDA_NVCC_EXECUTABLE@") # path
 set(CUDA_NVCC_FLAGS @CUDA_NVCC_FLAGS@ ;; @CUDA_WRAP_OPTION_NVCC_FLAGS@) # list
 @CUDA_NVCC_FLAGS_CONFIG@
 set(nvcc_flags @nvcc_flags@) # list
-set(CUDA_NVCC_INCLUDE_ARGS "@CUDA_NVCC_INCLUDE_ARGS@") # list (needs to be in 
quotes to handle spaces properly).
+set(CUDA_NVCC_INCLUDE_DIRS "@CUDA_NVCC_INCLUDE_DIRS@") # list (needs to be in 
quotes to handle spaces properly).
+set(CUDA_NVCC_COMPILE_DEFIN

[Cmake-commits] CMake branch, next, updated. v3.6.1-1269-g8bc1788

2016-08-16 Thread Brad King
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  8bc1788a12d60261a957b98254694c4a776ce62a (commit)
   via  0a8182399db73fc85a98802faae8e534e4d22767 (commit)
  from  bf26fa0d1e1eea567b656366e0510e9018b530cd (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=8bc1788a12d60261a957b98254694c4a776ce62a
commit 8bc1788a12d60261a957b98254694c4a776ce62a
Merge: bf26fa0 0a81823
Author: Brad King 
AuthorDate: Tue Aug 16 14:08:29 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Tue Aug 16 14:08:29 2016 -0400

Merge topic 'process-output-encoding' into next

0a818239 Windows: Encode child process output to internally-used encoding


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0a8182399db73fc85a98802faae8e534e4d22767
commit 0a8182399db73fc85a98802faae8e534e4d22767
Author: Dāvis Mosāns 
AuthorDate: Mon Aug 15 23:34:21 2016 +0300
Commit: Brad King 
CommitDate: Tue Aug 16 13:59:17 2016 -0400

Windows: Encode child process output to internally-used encoding

Typically Windows applications (eg. MSVC compiler) use current console's
codepage for output to pipes so we need to encode that to our
internally-used encoding (`KWSYS_ENCODING_DEFAULT_CODEPAGE`).

diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index cdc8fb1..580c3eb 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -317,6 +317,8 @@ set(SRCS
   cmOrderDirectories.h
   cmPolicies.h
   cmPolicies.cxx
+  cmProcessOutput.cxx
+  cmProcessOutput.hxx
   cmProcessTools.cxx
   cmProcessTools.h
   cmProperty.cxx
@@ -375,6 +377,9 @@ set(SRCS
   cm_utf8.c
   )
 
+SET_PROPERTY(SOURCE cmProcessOutput.cxx APPEND PROPERTY COMPILE_DEFINITIONS
+  KWSYS_ENCODING_DEFAULT_CODEPAGE=${KWSYS_ENCODING_DEFAULT_CODEPAGE})
+
 set(COMMAND_INCLUDES "#include \"cmTargetPropCommandBase.cxx\"\n")
 list(APPEND SRCS cmTargetPropCommandBase.cxx)
 set_property(SOURCE cmTargetPropCommandBase.cxx PROPERTY HEADER_FILE_ONLY ON)
diff --git a/Source/cmExecProgramCommand.cxx b/Source/cmExecProgramCommand.cxx
index 58bbc31..4391a19 100644
--- a/Source/cmExecProgramCommand.cxx
+++ b/Source/cmExecProgramCommand.cxx
@@ -11,6 +11,7 @@
 */
 #include "cmExecProgramCommand.h"
 
+#include "cmProcessOutput.hxx"
 #include "cmSystemTools.h"
 
 #include 
@@ -219,6 +220,7 @@ bool cmExecProgramCommand::RunCommand(const char* command, 
std::string& output,
   int length;
   char* data;
   int p;
+  cmProcessOutput processOutput;
   while ((p = cmsysProcess_WaitForData(cp, &data, &length, CM_NULLPTR), p)) {
 if (p == cmsysProcess_Pipe_STDOUT || p == cmsysProcess_Pipe_STDERR) {
   if (verbose) {
@@ -230,6 +232,7 @@ bool cmExecProgramCommand::RunCommand(const char* command, 
std::string& output,
 
   // All output has been read.  Wait for the process to exit.
   cmsysProcess_WaitForExit(cp, CM_NULLPTR);
+  processOutput.DecodeText(output, output);
 
   // Check the result of running the process.
   std::string msg;
diff --git a/Source/cmExecuteProcessCommand.cxx 
b/Source/cmExecuteProcessCommand.cxx
index d97b25f..1ffb163 100644
--- a/Source/cmExecuteProcessCommand.cxx
+++ b/Source/cmExecuteProcessCommand.cxx
@@ -11,6 +11,7 @@
 */
 #include "cmExecuteProcessCommand.h"
 
+#include "cmProcessOutput.hxx"
 #include "cmSystemTools.h"
 
 #include 
@@ -228,17 +229,21 @@ bool 
cmExecuteProcessCommand::InitialPass(std::vector const& args,
   int length;
   char* data;
   int p;
+  cmProcessOutput processOutput;
+  std::string strdata;
   while ((p = cmsysProcess_WaitForData(cp, &data, &length, CM_NULLPTR), p)) {
 // Put the output in the right place.
 if (p == cmsysProcess_Pipe_STDOUT && !output_quiet) {
   if (output_variable.empty()) {
-cmSystemTools::Stdout(data, length);
+processOutput.DecodeText(data, length, strdata, 1);
+cmSystemTools::Stdout(strdata.c_str(), strdata.size());
   } else {
 cmExecuteProcessCommandAppend(tempOutput, data, length);
   }
 } else if (p == cmsysProcess_Pipe_STDERR && !error_quiet) {
   if (error_variable.empty()) {
-cmSystemTools::Stderr(data, length);
+processOutput.DecodeText(data, length, strdata, 2);
+cmSystemTools::Stderr(strdata.c_str(), strdata.size());
   } else {
 cmExecuteProcessCommandAppend(tempError, data, length);
   }
@@ -247,6 +252,8 @@ bool 
cmExecuteProcessCommand::InitialPass(std::vector const& args,
 
   // All output has been read.  Wait for the p

[Cmake-commits] CMake branch, next, updated. v3.6.1-1267-gbf26fa0

2016-08-16 Thread Brad King
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  bf26fa0d1e1eea567b656366e0510e9018b530cd (commit)
   via  49ad7f9af84dd46e5527e6fefaa47d8bde748bca (commit)
   via  1d408dc10f492d060b8b9546c3ed3521d7051fd8 (commit)
  from  1b6398fea8e3606984decc76dc0d38092985fbd7 (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=bf26fa0d1e1eea567b656366e0510e9018b530cd
commit bf26fa0d1e1eea567b656366e0510e9018b530cd
Merge: 1b6398f 49ad7f9
Author: Brad King 
AuthorDate: Tue Aug 16 13:50:28 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Tue Aug 16 13:50:28 2016 -0400

Merge topic 'cmake-capabilities' into next

49ad7f9a cmake: Add `cmake -E capabilities` mode
1d408dc1 cmake: Constify cmake::GetRegisteredGenerators


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=49ad7f9af84dd46e5527e6fefaa47d8bde748bca
commit 49ad7f9af84dd46e5527e6fefaa47d8bde748bca
Author: Tobias Hunger 
AuthorDate: Thu Jun 30 15:38:44 2016 +0200
Commit: Brad King 
CommitDate: Tue Aug 16 13:45:05 2016 -0400

cmake: Add `cmake -E capabilities` mode

Add `cmake -E capabilities` to report on generators, cmake version and
possibly other static capabilities of cmake.

Closes: #15462

diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst
index 8f7c336..2ccc6be 100644
--- a/Help/manual/cmake.1.rst
+++ b/Help/manual/cmake.1.rst
@@ -180,6 +180,43 @@ CMake provides builtin command-line tools through the 
signature::
 Run ``cmake -E`` or ``cmake -E help`` for a summary of commands.
 Available commands are:
 
+``capabilities``
+  Report cmake capabilities in JSON format. The output is a JSON object
+  with the following keys:
+
+  ``version``
+A JSON object with version information. Keys are:
+
+``string``
+  The full version string as displayed by cmake ``--version``.
+``major``
+  The major version number in integer form.
+``minor``
+  The minor version number in integer form.
+``patch``
+  The patch level in integer form.
+``suffix``
+  The cmake version suffix string.
+``isDirty``
+  A bool that is set if the cmake build is from a dirty tree.
+
+  ``generators``
+A list available generators. Each generator is a JSON object with the
+following keys:
+
+``name``
+  A string containing the name of the generator.
+``toolsetSupport``
+  ``true`` if the generator supports toolsets and ``false`` otherwise.
+``platformSupport``
+  ``true`` if the generator supports platforms and ``false`` otherwise.
+``extraGenerators``
+  A list of strings with all the extra generators compatible with
+  the generator.
+
+  ``serverMode``
+``true`` if cmake supports server-mode and ``false`` otherwise.
+
 ``chdir   [...]``
   Change the current working directory and run a command.
 
diff --git a/Help/release/dev/cmake-capabilities.rst 
b/Help/release/dev/cmake-capabilities.rst
new file mode 100644
index 000..7abb973
--- /dev/null
+++ b/Help/release/dev/cmake-capabilities.rst
@@ -0,0 +1,6 @@
+cmake-capabilities
+--
+
+* :manual:`cmake(1)` gained a ``-E capabilities`` option to provide a
+  machine-readable (JSON) description of the capabilities of the
+  cmake tool (available generators, etc.).
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index a265ead..4313d83 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -23,11 +23,15 @@
 #include "cmState.h"
 #include "cmTest.h"
 #include "cmUtils.hxx"
+#include "cmVersionMacros.h"
 
 #if defined(CMAKE_BUILD_WITH_CMAKE)
 #include "cmGraphVizWriter.h"
 #include "cmVariableWatch.h"
 #include 
+
+#include "cm_jsoncpp_value.h"
+#include "cm_jsoncpp_writer.h"
 #endif
 
 #include 
@@ -110,6 +114,18 @@
 
 #include 
 
+namespace {
+
+#if defined(CMAKE_BUILD_WITH_CMAKE)
+#ifdef CMake_HAVE_CXX_UNORDERED_MAP
+typedef std::unordered_map JsonValueMapType;
+#else
+typedef cmsys::hash_map JsonValueMapType;
+#endif
+#endif
+
+} // namespace
+
 static bool cmakeCheckStampFile(const char* stampName);
 static bool cmakeCheckStampList(const char* stampName);
 
@@ -201,6 +217,68 @@ cmake::~cmake()
   delete this->FileComparison;
 }
 
+std::string cmake::ReportCapabilities() const
+{
+  std::string result;
+#if defined(CMAKE_BUILD_WITH_CMAKE)
+  Json::Value obj = Json::objectValue;
+  // Version information:
+  Json::Value version = Json::objectValue;
+  version["string"] = CMake_VERSION;
+  version["major"] = CMake_VERSION_MAJOR;
+  version["minor"] = CMake_VERSION_MINOR;
+  version["suffix"] = CMake_VERSION_SUFFIX;
+  version["isDirty"] = (CMake_VERSION_IS_DIRTY

[Cmake-commits] CMake branch, next, updated. v3.6.1-1264-g1b6398f

2016-08-16 Thread Brad King
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  1b6398fea8e3606984decc76dc0d38092985fbd7 (commit)
   via  e240a7c0176450e092e2398148c1e13f8940c239 (commit)
   via  074d098ffb001c6e6c03483746c7bb6e02ab4484 (commit)
   via  447b142b6a5ae8ee1669cb1a424619af808f1c17 (commit)
   via  6b07972fbdf7e8687577a430597e40e7e0b4831d (commit)
  from  cac8c6542a38c2a234e39af7a99e46e8ad5ab336 (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=1b6398fea8e3606984decc76dc0d38092985fbd7
commit 1b6398fea8e3606984decc76dc0d38092985fbd7
Merge: cac8c65 e240a7c
Author: Brad King 
AuthorDate: Tue Aug 16 13:26:32 2016 -0400
Commit: Brad King 
CommitDate: Tue Aug 16 13:26:32 2016 -0400

Merge branch 'master' into next


---

Summary of changes:
 Source/CMakeVersion.cmake |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, master, updated. v3.6.1-634-g074d098

2016-08-16 Thread Brad King
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, master has been updated
   via  074d098ffb001c6e6c03483746c7bb6e02ab4484 (commit)
   via  8ba204a69602ca8744aeec4ca3d808c964715ed5 (commit)
  from  447b142b6a5ae8ee1669cb1a424619af808f1c17 (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=074d098ffb001c6e6c03483746c7bb6e02ab4484
commit 074d098ffb001c6e6c03483746c7bb6e02ab4484
Merge: 447b142 8ba204a
Author: Brad King 
AuthorDate: Tue Aug 16 13:26:19 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Tue Aug 16 13:26:19 2016 -0400

Merge topic 'FindMatlab-mingw'

8ba204a6 FindMatlab: Use pre-built libraries for MinGW if needed


---

Summary of changes:
 Modules/FindMatlab.cmake |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, master, updated. v3.6.1-636-ge240a7c

2016-08-16 Thread Brad King
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, master has been updated
   via  e240a7c0176450e092e2398148c1e13f8940c239 (commit)
   via  a8345d65f359d75efb057d22976cfb92b4d477cf (commit)
  from  074d098ffb001c6e6c03483746c7bb6e02ab4484 (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=e240a7c0176450e092e2398148c1e13f8940c239
commit e240a7c0176450e092e2398148c1e13f8940c239
Merge: 074d098 a8345d6
Author: Brad King 
AuthorDate: Tue Aug 16 13:26:22 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Tue Aug 16 13:26:22 2016 -0400

Merge topic 'ExternalProject-SOURCE_SUBDIR'

a8345d65 ExternalProject: Add SOURCE_SUBDIR option


---

Summary of changes:
 Modules/ExternalProject.cmake  |   28 
 Tests/CMakeLists.txt   |   12 +
 Tests/ExternalProjectSourceSubdir/CMakeLists.txt   |   10 +++
 .../Example/subdir/CMakeLists.txt} |2 +-
 4 files changed, 46 insertions(+), 6 deletions(-)
 create mode 100644 Tests/ExternalProjectSourceSubdir/CMakeLists.txt
 copy Tests/{RunCMake/Syntax/UnterminatedBrace0.cmake => 
ExternalProjectSourceSubdir/Example/subdir/CMakeLists.txt} (70%)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, master, updated. v3.6.1-632-g447b142

2016-08-16 Thread Brad King
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, master has been updated
   via  447b142b6a5ae8ee1669cb1a424619af808f1c17 (commit)
   via  2bdba83e4bbd5435ee6faf5a2eedec4f0d0dfb0a (commit)
  from  6b07972fbdf7e8687577a430597e40e7e0b4831d (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=447b142b6a5ae8ee1669cb1a424619af808f1c17
commit 447b142b6a5ae8ee1669cb1a424619af808f1c17
Merge: 6b07972 2bdba83
Author: Brad King 
AuthorDate: Tue Aug 16 13:26:15 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Tue Aug 16 13:26:15 2016 -0400

Merge topic 'issue-tracker-urls'

2bdba83e issues: update references to the CMake issue tracker


---

Summary of changes:
 Modules/CMakeDetermineCCompiler.cmake   |2 +-
 Modules/CMakeDetermineCXXCompiler.cmake |2 +-
 Modules/CMakeFindEclipseCDT4.cmake  |2 +-
 Modules/Compiler/IAR.cmake  |5 +++--
 Modules/ExternalProject.cmake   |2 +-
 Modules/FindHDF5.cmake  |4 ++--
 Source/cmExtraCodeBlocksGenerator.cxx   |4 ++--
 Source/cmExtraEclipseCDT4Generator.cxx  |4 ++--
 Source/cmExtraSublimeTextGenerator.cxx  |2 +-
 Source/cmQtAutoGeneratorInitializer.cxx |2 +-
 Tests/CPackComponents/Issue 7470.html   |4 ++--
 Tests/CTestLimitDashJ/CMakeLists.txt|2 +-
 12 files changed, 18 insertions(+), 17 deletions(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v3.6.1-1259-gcac8c65

2016-08-16 Thread Brad King
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  cac8c6542a38c2a234e39af7a99e46e8ad5ab336 (commit)
   via  a8345d65f359d75efb057d22976cfb92b4d477cf (commit)
  from  7a4d3516aedece0736be4c1ad1702522a3526dd6 (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=cac8c6542a38c2a234e39af7a99e46e8ad5ab336
commit cac8c6542a38c2a234e39af7a99e46e8ad5ab336
Merge: 7a4d351 a8345d6
Author: Brad King 
AuthorDate: Tue Aug 16 13:24:37 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Tue Aug 16 13:24:37 2016 -0400

Merge topic 'ExternalProject-SOURCE_SUBDIR' into next

a8345d65 ExternalProject: Add SOURCE_SUBDIR option


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a8345d65f359d75efb057d22976cfb92b4d477cf
commit a8345d65f359d75efb057d22976cfb92b4d477cf
Author: Matthew Woehlke 
AuthorDate: Mon Aug 15 14:42:22 2016 -0400
Commit: Brad King 
CommitDate: Tue Aug 16 13:18:18 2016 -0400

ExternalProject: Add SOURCE_SUBDIR option

Add a new SOURCE_SUBDIR option to ExternalProject_Add that allows
specifying the location of the CMakeLists.txt to use as the project root
relative to the SOURCE_DIR.

This is helpful for projects that have unusual layouts, or projects that
provide both a superbuild and project-only build depending on which
CMakeLists.txt is used.

Fixes: #15118

diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 2ff18fc..634ef42 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -98,6 +98,8 @@ Create custom targets to build projects in external trees
 
   ``SOURCE_DIR ``
 Source dir to be used for build
+  ``SOURCE_SUBDIR ``
+Path to source CMakeLists.txt relative to ``SOURCE_DIR``
   ``CONFIGURE_COMMAND ...``
 Build tree configuration command
   ``CMAKE_COMMAND /.../cmake``
@@ -236,6 +238,11 @@ Create custom targets to build projects in external trees
   interpreted with respect to the build directory corresponding to the
   source directory in which ``ExternalProject_Add`` is invoked.
 
+  If ``SOURCE_SUBDIR`` is set and no ``CONFIGURE_COMMAND`` is specified, the
+  configure command will run CMake using the ``CMakeLists.txt`` located in the
+  relative path specified by ``SOURCE_SUBDIR``, relative to the ``SOURCE_DIR``.
+  If no ``SOURCE_SUBDIR`` is given, ``SOURCE_DIR`` is used.
+
   If ``SOURCE_DIR`` is explicitly set to an existing directory the project
   will be built from it.  Otherwise a download step must be specified
   using one of the ``DOWNLOAD_COMMAND``, ``CVS_*``, ``SVN_*``, or ``URL``
@@ -287,8 +294,8 @@ Create custom targets to build projects in external trees
 
   The command line, comment, working directory, and byproducts of every
   standard and custom step are processed to replace tokens ,
-  , , and  with
-  corresponding property values.
+  ,  , , and 
+  with corresponding property values.
 
 Any builtin step that specifies a ``_COMMAND cmd...`` or custom
 step that specifies a ``COMMAND cmd...`` may specify additional command
@@ -1064,6 +1071,13 @@ function(_ep_set_directories name)
 endif()
 set_property(TARGET ${name} PROPERTY _EP_${VAR}_DIR "${${var}_dir}")
   endforeach()
+  get_property(source_subdir TARGET ${name} PROPERTY _EP_SOURCE_SUBDIR)
+  if(NOT 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!")
+  endif()
   if(build_in_source)
 get_property(source_dir TARGET ${name} PROPERTY _EP_SOURCE_DIR)
 set_property(TARGET ${name} PROPERTY _EP_BINARY_DIR "${source_dir}")
@@ -1095,7 +1109,7 @@ 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 DOWNLOADED_FILE)
+  foreach(dir SOURCE_DIR SOURCE_SUBDIR BINARY_DIR INSTALL_DIR TMP_DIR 
DOWNLOADED_FILE)
 get_property(val TARGET ${target_name} PROPERTY _EP_${dir})
 string(REPLACE "<${dir}>" "${val}" ${var} "${${var}}")
   endforeach()
@@ -2131,7 +2145,7 @@ endfunction()
 
 # TODO: Make sure external projects use the proper compiler
 function(_ep_add_configure_command name)
-  ExternalProject_Get_Property(${name} source_dir binary_dir tmp_dir)
+  ExternalProject_Get_Property(${name} source_dir source_subdir binary_dir 
tmp_dir)
 
   # Depend on other external projects (file-level).
   set(file_deps)
@@ -2209,7 +2223,11 @@ function(_ep_add_configure_comman