[Cmake-commits] CMake branch, master, updated. v3.13.3-1015-g9ea2f0e

Kitware Robot kwrobot at kitware.com
Mon Jan 21 07:53:06 EST 2019


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  9ea2f0eb948548aab2fc865d62a658e0c78e90f9 (commit)
       via  4dba5d6ce251257259874bce394b2fba954e200c (commit)
       via  7e5f9b192e9c3ed7130e1e52b7f9d3243f51e2ab (commit)
       via  15fe5c4c9d90aa03e146fe8b9585e82c4f3b5ffe (commit)
       via  0526ae4415f61c5a2adfd78e05b797de1d44fba6 (commit)
       via  d704cc34071f0c6f95099670c94c7f1940ab7fa2 (commit)
       via  d1aa2e11092acdcc22b333e219187026d38549a5 (commit)
       via  fefae527c8c54d249c44313d9b09cdb0157e2f5d (commit)
       via  0ffe8f8844bb74e785feec84e4871ec139185625 (commit)
       via  ef61997b1be5c2f542472f8eb48dac62cd26bf5c (commit)
       via  cae9d2a61afea3948c8dfaf1f7dbc39ebaa71055 (commit)
       via  7370b02c36b45bcd92b6c5bb7cc65ecff75b9b2b (commit)
       via  62fec84ad7b44b7c54130e9eb3686f4fbc22672e (commit)
       via  2e5307a2a45d456b7fb52e4d3fab1416dc9a1bd8 (commit)
       via  75a7a237465e37215525831f942a3904d20d1380 (commit)
       via  fecbc87608f4b1429721292d3414bde9eb9f073f (commit)
       via  2915a75615bab216753c902fa716b11f9fc5de83 (commit)
       via  d6475daa79810e332c3d2d1659e3d73250717219 (commit)
       via  938f06fda69a0f4ef04b2ed43a945a3c901b9750 (commit)
       via  65e725c95756a4e2348e9fb52b3d5aca7ee21115 (commit)
       via  65f1fc9d6329feb2d48ee986d4243166a66049af (commit)
       via  2bedd5fb7c02987ad209f96889e2578a16806e01 (commit)
       via  0f08ed89362d207e18b06e806f127cd683b79141 (commit)
       via  593d986470ce1938436da312e0c93e3c9c07017e (commit)
       via  9a3d85cfc501fe3c1655e4a6ae9fd08fd9a1fbb7 (commit)
       via  e68ea269d72773e53db0c6c6848f6f69f3fd7329 (commit)
       via  45aa9c65a13105ff505e18f5029ef794b7aef9ab (commit)
       via  8bb7562f1a4e75fa5cd00f4ebd868d1494b63e7a (commit)
       via  81650e488c734702384ef903630838015a3f81b1 (commit)
       via  b773e58099b2fc8ebdf8319172fb018d0139396d (commit)
       via  a5e948a36f5d1c1cf6a0ea34b04bbc4b6058e7d9 (commit)
      from  7ac3844ab5a09ad4018c40569ccdc07c313eb407 (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=9ea2f0eb948548aab2fc865d62a658e0c78e90f9
commit 9ea2f0eb948548aab2fc865d62a658e0c78e90f9
Merge: 4dba5d6 0ffe8f8
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jan 21 12:52:34 2019 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Jan 21 07:52:40 2019 -0500

    Merge topic 'swift-module-name'
    
    0ffe8f8844 Ninja: support `SWIFT_MODULE_NAME` property
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2813


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4dba5d6ce251257259874bce394b2fba954e200c
commit 4dba5d6ce251257259874bce394b2fba954e200c
Merge: 7e5f9b1 ef61997
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jan 21 12:51:46 2019 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Jan 21 07:51:54 2019 -0500

    Merge topic 'use-emplace'
    
    ef61997b1b clang-tidy: Use emplace
    2e5307a2a4 CTestSVN: Accept std::string in SVNInfo constructor
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2811


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7e5f9b192e9c3ed7130e1e52b7f9d3243f51e2ab
commit 7e5f9b192e9c3ed7130e1e52b7f9d3243f51e2ab
Merge: 15fe5c4 cae9d2a
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jan 21 12:50:54 2019 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Jan 21 07:51:08 2019 -0500

    Merge topic 'ctest-json-polish'
    
    cae9d2a61a CTest: Teach --show-only= to reject unknown values
    7370b02c36 CTest: Teach --show-only=json-v1 to filter out not-available tests
    62fec84ad7 Tests: Fix RunCMake.CTestCommandLine case when no python is found
    75a7a23746 Tests: Rename RunCMake.CTestCommandLine show-only test cases
    fecbc87608 Tests: Fix RunCMake.CTestCommandLine to actually check json-v1
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2812


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=15fe5c4c9d90aa03e146fe8b9585e82c4f3b5ffe
commit 15fe5c4c9d90aa03e146fe8b9585e82c4f3b5ffe
Merge: d704cc3 0526ae4
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jan 21 12:50:16 2019 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Jan 21 07:50:23 2019 -0500

    Merge topic 'FindCURL-typo'
    
    0526ae4415 FindCURL: fix component failure when no pkg-config
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2826


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0526ae4415f61c5a2adfd78e05b797de1d44fba6
commit 0526ae4415f61c5a2adfd78e05b797de1d44fba6
Author:     Hiroshi Miura <miurahr at linux.com>
AuthorDate: Fri Jan 18 21:52:42 2019 +0900
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Jan 21 07:49:00 2019 -0500

    FindCURL: fix component failure when no pkg-config
    
    find_package(CURL COMPONENTS foo) fails when there is
    no pkg-config module because of variable name typo.
    
    Signed-off-by: Hiroshi Miura <miurahr at linux.com>
    Fixes: #18802

diff --git a/Modules/FindCURL.cmake b/Modules/FindCURL.cmake
index d28dfea..b1989b1 100644
--- a/Modules/FindCURL.cmake
+++ b/Modules/FindCURL.cmake
@@ -110,12 +110,12 @@ if(CURL_FIND_COMPONENTS)
                       OUTPUT_VARIABLE CURL_CONFIG_FEATURES_STRING
                       ERROR_QUIET
                       OUTPUT_STRIP_TRAILING_WHITESPACE)
-      string(REPLACE "\n" ";" CURL_CONFIG_FEATURES "${CURL_CONFIG_FEATURES_STRING}")
+      string(REPLACE "\n" ";" CURL_SUPPORTED_FEATURES "${CURL_CONFIG_FEATURES_STRING}")
       execute_process(COMMAND ${CURL_CONFIG_EXECUTABLE} --protocols
                       OUTPUT_VARIABLE CURL_CONFIG_PROTOCOLS_STRING
                       ERROR_QUIET
                       OUTPUT_STRIP_TRAILING_WHITESPACE)
-      string(REPLACE "\n" ";" CURL_CONFIG_PROTOCOLS "${CURL_CONFIG_PROTOCOLS_STRING}")
+      string(REPLACE "\n" ";" CURL_SUPPORTED_PROTOCOLS "${CURL_CONFIG_PROTOCOLS_STRING}")
     endif()
 
   endif()

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d704cc34071f0c6f95099670c94c7f1940ab7fa2
commit d704cc34071f0c6f95099670c94c7f1940ab7fa2
Merge: d1aa2e1 0f08ed8
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jan 21 12:48:19 2019 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Jan 21 07:48:26 2019 -0500

    Merge topic 'command_file_link'
    
    0f08ed8936 cmSystemTools: Silence CreateLink and CreateSymlink errors
    593d986470 Tests: Avoid cross-device links in CREATE_LINK test
    9a3d85cfc5 Tests: Skip symlink tests on Windows
    e68ea269d7 Tests: CREATE_LINK subcommand negative test case
    45aa9c65a1 Tests: file CREATE_LINK subcommand test cases
    8bb7562f1a Help: Add documentation for file(CREATE_LINK) subcommand
    81650e488c cmFileCommand: Add CREATE_LINK subcommand
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2759


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d1aa2e11092acdcc22b333e219187026d38549a5
commit d1aa2e11092acdcc22b333e219187026d38549a5
Merge: fefae52 b773e58
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jan 21 12:47:22 2019 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Jan 21 07:47:29 2019 -0500

    Merge topic 'find-package-resolve-symlinks'
    
    b773e58099 find_package: add test coverage for CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS
    a5e948a36f find_package: optionally resolve symlinks when discovering packages
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2798


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fefae527c8c54d249c44313d9b09cdb0157e2f5d
commit fefae527c8c54d249c44313d9b09cdb0157e2f5d
Merge: 7ac3844 2915a75
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jan 21 12:46:13 2019 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Jan 21 07:46:20 2019 -0500

    Merge topic 'submit-url'
    
    2915a75615 CTest: Add documentation and release notes for SubmitURL
    d6475daa79 Modules/CTest: Set SubmitURL
    938f06fda6 ctest_submit: Add parameter SUBMIT_URL
    65e725c957 CTest: Add option SubmitURL
    65f1fc9d63 CTest: Add function GetSubmitURL
    2bedd5fb7c ctest_submit: Remove submit method from log output
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2719


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0ffe8f8844bb74e785feec84e4871ec139185625
commit 0ffe8f8844bb74e785feec84e4871ec139185625
Author:     Saleem Abdulrasool <compnerd at compnerd.org>
AuthorDate: Wed Jan 16 11:42:10 2019 -0800
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Jan 18 07:52:17 2019 -0500

    Ninja: support `SWIFT_MODULE_NAME` property
    
    Add a new `SWIFT_MODULE_NAME` property that defaults to the target name.
    This is needed as otherwise, the first source file determines the module
    name.
    
    Issue: #18800

diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 5013be5..c959a04 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -433,6 +433,7 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang)
   vars.ObjectFileDir = "$OBJECT_FILE_DIR";
   if (lang == "Swift") {
     vars.SwiftAuxiliarySources = "$SWIFT_AUXILIARY_SOURCES";
+    vars.SwiftModuleName = "$SWIFT_MODULE_NAME";
   }
 
   // For some cases we do an explicit preprocessor invocation.
@@ -904,9 +905,9 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
   vars["FLAGS"] = this->ComputeFlagsForObject(source, language);
   vars["DEFINES"] = this->ComputeDefines(source, language);
   vars["INCLUDES"] = this->ComputeIncludes(source, language);
-  // The swift compiler needs all the sources besides the one being compiled in
-  // order to do the type checking.  List all these "auxiliary" sources.
   if (language == "Swift") {
+    // The swift compiler needs all the sources besides the one being compiled
+    // in order to do the type checking.  List all these "auxiliary" sources.
     std::string aux_sources;
     cmGeneratorTarget::KindedSources const& sources =
       this->GeneratorTarget->GetKindedSources(this->GetConfigName());
@@ -917,6 +918,8 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
       aux_sources += " " + this->GetSourceFilePath(src.Source.Value);
     }
     vars["SWIFT_AUXILIARY_SOURCES"] = aux_sources;
+
+    vars["SWIFT_MODULE_NAME"] = this->GeneratorTarget->GetName();
   }
 
   if (!this->NeedDepTypeMSVC(language)) {
diff --git a/Source/cmRulePlaceholderExpander.cxx b/Source/cmRulePlaceholderExpander.cxx
index 4b74ff0..c3e8ff5 100644
--- a/Source/cmRulePlaceholderExpander.cxx
+++ b/Source/cmRulePlaceholderExpander.cxx
@@ -167,6 +167,11 @@ std::string cmRulePlaceholderExpander::ExpandRuleVariable(
       return replaceValues.SwiftAuxiliarySources;
     }
   }
+  if (replaceValues.SwiftModuleName) {
+    if (variable == "SWIFT_MODULE_NAME") {
+      return replaceValues.SwiftModuleName;
+    }
+  }
   if (variable == "TARGET_SONAME" || variable == "SONAME_FLAG" ||
       variable == "TARGET_INSTALLNAME_DIR") {
     // All these variables depend on TargetSOName
diff --git a/Source/cmRulePlaceholderExpander.h b/Source/cmRulePlaceholderExpander.h
index a936747..7aa63db 100644
--- a/Source/cmRulePlaceholderExpander.h
+++ b/Source/cmRulePlaceholderExpander.h
@@ -59,6 +59,7 @@ public:
     const char* DependencyFile;
     const char* FilterPrefix;
     const char* SwiftAuxiliarySources;
+    const char* SwiftModuleName;
   };
 
   // Expand rule variables in CMake of the type found in language rules

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ef61997b1be5c2f542472f8eb48dac62cd26bf5c
commit ef61997b1be5c2f542472f8eb48dac62cd26bf5c
Author:     Regina Pfeifer <regina at mailbox.org>
AuthorDate: Wed Jan 16 07:13:07 2019 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Jan 17 13:12:02 2019 -0500

    clang-tidy: Use emplace

diff --git a/.clang-tidy b/.clang-tidy
index 3ae249f..aef99dc 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -15,7 +15,6 @@ modernize-*,\
 -modernize-raw-string-literal,\
 -modernize-return-braced-init-list,\
 -modernize-use-auto,\
--modernize-use-emplace,\
 -modernize-use-equals-default,\
 -modernize-use-equals-delete,\
 -modernize-use-noexcept,\
diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx
index 326d26c..be4a18e 100644
--- a/Source/CPack/cmCPackDragNDropGenerator.cxx
+++ b/Source/CPack/cmCPackDragNDropGenerator.cxx
@@ -71,8 +71,8 @@ int cmCPackDragNDropGenerator::InitializeInternal()
   // Starting with Xcode 4.3, look in "/Applications/Xcode.app" first:
   //
   std::vector<std::string> paths;
-  paths.push_back("/Applications/Xcode.app/Contents/Developer/Tools");
-  paths.push_back("/Developer/Tools");
+  paths.emplace_back("/Applications/Xcode.app/Contents/Developer/Tools");
+  paths.emplace_back("/Developer/Tools");
 
   const std::string hdiutil_path =
     cmSystemTools::FindProgram("hdiutil", std::vector<std::string>(), false);
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index b205105..f7f3f24 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -1036,7 +1036,8 @@ int cmCPackGenerator::DoPackage()
    * may update this during PackageFiles.
    * (either putting several names or updating the provided one)
    */
-  packageFileNames.push_back(tempPackageFileName ? tempPackageFileName : "");
+  packageFileNames.emplace_back(tempPackageFileName ? tempPackageFileName
+                                                    : "");
   toplevel = tempDirectory;
   { // scope that enables package generators to run internal scripts with
     // latest CMake policies enabled
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index d02aa5a..4b865ca 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -610,7 +610,7 @@ bool cmCPackNSISGenerator::GetListOfSubdirectories(
       }
     }
   }
-  dirs.push_back(topdir);
+  dirs.emplace_back(topdir);
   return true;
 }
 
diff --git a/Source/CPack/cmCPackPackageMakerGenerator.cxx b/Source/CPack/cmCPackPackageMakerGenerator.cxx
index a24dd30..28e0561 100644
--- a/Source/CPack/cmCPackPackageMakerGenerator.cxx
+++ b/Source/CPack/cmCPackPackageMakerGenerator.cxx
@@ -340,16 +340,16 @@ int cmCPackPackageMakerGenerator::InitializeInternal()
   // If found, save result in the CPACK_INSTALLER_PROGRAM variable.
 
   std::vector<std::string> paths;
-  paths.push_back("/Applications/Xcode.app/Contents/Applications"
-                  "/PackageMaker.app/Contents/MacOS");
-  paths.push_back("/Applications/Utilities"
-                  "/PackageMaker.app/Contents/MacOS");
-  paths.push_back("/Applications"
-                  "/PackageMaker.app/Contents/MacOS");
-  paths.push_back("/Developer/Applications/Utilities"
-                  "/PackageMaker.app/Contents/MacOS");
-  paths.push_back("/Developer/Applications"
-                  "/PackageMaker.app/Contents/MacOS");
+  paths.emplace_back("/Applications/Xcode.app/Contents/Applications"
+                     "/PackageMaker.app/Contents/MacOS");
+  paths.emplace_back("/Applications/Utilities"
+                     "/PackageMaker.app/Contents/MacOS");
+  paths.emplace_back("/Applications"
+                     "/PackageMaker.app/Contents/MacOS");
+  paths.emplace_back("/Developer/Applications/Utilities"
+                     "/PackageMaker.app/Contents/MacOS");
+  paths.emplace_back("/Developer/Applications"
+                     "/PackageMaker.app/Contents/MacOS");
 
   std::string pkgPath;
   const char* inst_program = this->GetOption("CPACK_INSTALLER_PROGRAM");
diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx
index d49fba2..6496af8 100644
--- a/Source/CTest/cmCTestBuildAndTestHandler.cxx
+++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx
@@ -232,7 +232,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
 
   // do the build
   if (this->BuildTargets.empty()) {
-    this->BuildTargets.push_back("");
+    this->BuildTargets.emplace_back();
   }
   for (std::string const& tar : this->BuildTargets) {
     cmDuration remainingTime = std::chrono::seconds(0);
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx
index 361883c..d07bd21 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -341,17 +341,17 @@ int cmCTestBuildHandler::ProcessHandler()
   // warnings and warning exceptions.
   std::vector<std::string>::size_type cc;
   for (cc = 0; cmCTestErrorMatches[cc]; cc++) {
-    this->CustomErrorMatches.push_back(cmCTestErrorMatches[cc]);
+    this->CustomErrorMatches.emplace_back(cmCTestErrorMatches[cc]);
   }
   for (cc = 0; cmCTestErrorExceptions[cc]; cc++) {
-    this->CustomErrorExceptions.push_back(cmCTestErrorExceptions[cc]);
+    this->CustomErrorExceptions.emplace_back(cmCTestErrorExceptions[cc]);
   }
   for (cc = 0; cmCTestWarningMatches[cc]; cc++) {
-    this->CustomWarningMatches.push_back(cmCTestWarningMatches[cc]);
+    this->CustomWarningMatches.emplace_back(cmCTestWarningMatches[cc]);
   }
 
   for (cc = 0; cmCTestWarningExceptions[cc]; cc++) {
-    this->CustomWarningExceptions.push_back(cmCTestWarningExceptions[cc]);
+    this->CustomWarningExceptions.emplace_back(cmCTestWarningExceptions[cc]);
   }
 
   // Pre-compile regular expressions objects for all regular expressions
@@ -365,7 +365,7 @@ int cmCTestBuildHandler::ProcessHandler()
       cmCTestOptionalLog(this->CTest, DEBUG,                                  \
                          "Add " #strings ": " << s << std::endl,              \
                          this->Quiet);                                        \
-      (regexes).push_back(s.c_str());                                         \
+      (regexes).emplace_back(s);                                              \
     }                                                                         \
   } while (false)
 
@@ -1034,7 +1034,7 @@ void cmCTestBuildHandler::ProcessBuffer(const char* data, size_t length,
           }
         } else {
           // Otherwise store pre-context for the next error
-          this->PreContext.push_back(line);
+          this->PreContext.emplace_back(line);
           if (this->PreContext.size() > this->MaxPreContext) {
             this->PreContext.erase(this->PreContext.begin(),
                                    this->PreContext.end() -
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx
index fbd1038..6c68f46 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -56,12 +56,12 @@ public:
   void SetCommand(const char* command)
   {
     this->CommandLineStrings.clear();
-    this->CommandLineStrings.push_back(command);
+    this->CommandLineStrings.emplace_back(command);
   }
   void AddArgument(const char* arg)
   {
     if (arg) {
-      this->CommandLineStrings.push_back(arg);
+      this->CommandLineStrings.emplace_back(arg);
     }
   }
   void SetWorkingDirectory(const char* dir) { this->WorkingDirectory = dir; }
@@ -316,8 +316,7 @@ int cmCTestCoverageHandler::ProcessHandler()
   // setup the regex exclude stuff
   this->CustomCoverageExcludeRegex.clear();
   for (std::string const& rex : this->CustomCoverageExclude) {
-    this->CustomCoverageExcludeRegex.push_back(
-      cmsys::RegularExpression(rex.c_str()));
+    this->CustomCoverageExcludeRegex.emplace_back(rex);
   }
 
   if (this->HandleBullseyeCoverage(&cont)) {
@@ -1005,7 +1004,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
   std::vector<std::string> basecovargs =
     cmSystemTools::ParseArguments(gcovExtraFlags.c_str());
   basecovargs.insert(basecovargs.begin(), gcovCommand);
-  basecovargs.push_back("-o");
+  basecovargs.emplace_back("-o");
 
   // files is a list of *.da and *.gcda files with coverage data in them.
   // These are binary files that you give as input to gcov so that it will
diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx
index 4facea2..5218993 100644
--- a/Source/CTest/cmCTestLaunch.cxx
+++ b/Source/CTest/cmCTestLaunch.cxx
@@ -146,7 +146,7 @@ void cmCTestLaunch::HandleRealArg(const char* arg)
     return;
   }
 #endif
-  this->RealArgs.push_back(arg);
+  this->RealArgs.emplace_back(arg);
 }
 
 void cmCTestLaunch::ComputeFileNames()
@@ -534,9 +534,9 @@ void cmCTestLaunch::LoadScrapeRules()
   // Common compiler warning formats.  These are much simpler than the
   // full log-scraping expressions because we do not need to extract
   // file and line information.
-  this->RegexWarning.push_back("(^|[ :])[Ww][Aa][Rr][Nn][Ii][Nn][Gg]");
-  this->RegexWarning.push_back("(^|[ :])[Rr][Ee][Mm][Aa][Rr][Kk]");
-  this->RegexWarning.push_back("(^|[ :])[Nn][Oo][Tt][Ee]");
+  this->RegexWarning.emplace_back("(^|[ :])[Ww][Aa][Rr][Nn][Ii][Nn][Gg]");
+  this->RegexWarning.emplace_back("(^|[ :])[Rr][Ee][Mm][Aa][Rr][Kk]");
+  this->RegexWarning.emplace_back("(^|[ :])[Nn][Oo][Tt][Ee]");
 
   // Load custom match rules given to us by CTest.
   this->LoadScrapeRules("Warning", this->RegexWarning);
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx
index 9c9532a..8ba59d3 100644
--- a/Source/CTest/cmCTestMemCheckHandler.cxx
+++ b/Source/CTest/cmCTestMemCheckHandler.cxx
@@ -261,8 +261,8 @@ void cmCTestMemCheckHandler::InitializeResultsVectors()
   };
   this->GlobalResults.clear();
   for (int i = 0; cmCTestMemCheckResultStrings[i] != nullptr; ++i) {
-    this->ResultStrings.push_back(cmCTestMemCheckResultStrings[i]);
-    this->ResultStringsLong.push_back(cmCTestMemCheckResultLongStrings[i]);
+    this->ResultStrings.emplace_back(cmCTestMemCheckResultStrings[i]);
+    this->ResultStringsLong.emplace_back(cmCTestMemCheckResultLongStrings[i]);
     this->GlobalResults.push_back(0);
   }
 }
@@ -528,11 +528,11 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
   switch (this->MemoryTesterStyle) {
     case cmCTestMemCheckHandler::VALGRIND: {
       if (this->MemoryTesterOptions.empty()) {
-        this->MemoryTesterOptions.push_back("-q");
-        this->MemoryTesterOptions.push_back("--tool=memcheck");
-        this->MemoryTesterOptions.push_back("--leak-check=yes");
-        this->MemoryTesterOptions.push_back("--show-reachable=yes");
-        this->MemoryTesterOptions.push_back("--num-callers=50");
+        this->MemoryTesterOptions.emplace_back("-q");
+        this->MemoryTesterOptions.emplace_back("--tool=memcheck");
+        this->MemoryTesterOptions.emplace_back("--leak-check=yes");
+        this->MemoryTesterOptions.emplace_back("--show-reachable=yes");
+        this->MemoryTesterOptions.emplace_back("--num-callers=50");
       }
       if (!this->CTest->GetCTestConfiguration("MemoryCheckSuppressionFile")
              .empty()) {
@@ -586,11 +586,11 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
       std::string dpbdFile = this->CTest->GetBinaryDir() +
         "/Testing/Temporary/MemoryChecker.??.DPbd";
       this->BoundsCheckerDPBDFile = dpbdFile;
-      this->MemoryTesterDynamicOptions.push_back("/B");
+      this->MemoryTesterDynamicOptions.emplace_back("/B");
       this->MemoryTesterDynamicOptions.push_back(std::move(dpbdFile));
-      this->MemoryTesterDynamicOptions.push_back("/X");
+      this->MemoryTesterDynamicOptions.emplace_back("/X");
       this->MemoryTesterDynamicOptions.push_back(this->MemoryTesterOutputFile);
-      this->MemoryTesterOptions.push_back("/M");
+      this->MemoryTesterOptions.emplace_back("/M");
       break;
     }
     // these are almost the same but the env var used is different
@@ -604,8 +604,8 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
       // The MemoryTesterDynamicOptions is setup with the -E env
       // Then the MemoryTesterEnvironmentVariable gets the
       // TSAN_OPTIONS string with the log_path in it.
-      this->MemoryTesterDynamicOptions.push_back("-E");
-      this->MemoryTesterDynamicOptions.push_back("env");
+      this->MemoryTesterDynamicOptions.emplace_back("-E");
+      this->MemoryTesterDynamicOptions.emplace_back("env");
       std::string envVar;
       std::string extraOptions;
       std::string suppressionsOption;
diff --git a/Source/CTest/cmCTestP4.cxx b/Source/CTest/cmCTestP4.cxx
index 511dbd2..c0bdc17 100644
--- a/Source/CTest/cmCTestP4.cxx
+++ b/Source/CTest/cmCTestP4.cxx
@@ -307,20 +307,20 @@ void cmCTestP4::SetP4Options(std::vector<char const*>& CommandOptions)
 {
   if (P4Options.empty()) {
     const char* p4 = this->CommandLineTool.c_str();
-    P4Options.push_back(p4);
+    P4Options.emplace_back(p4);
 
     // The CTEST_P4_CLIENT variable sets the P4 client used when issuing
     // Perforce commands, if it's different from the default one.
     std::string client = this->CTest->GetCTestConfiguration("P4Client");
     if (!client.empty()) {
-      P4Options.push_back("-c");
+      P4Options.emplace_back("-c");
       P4Options.push_back(client);
     }
 
     // Set the message language to be English, in case the P4 admin
     // has localized them
-    P4Options.push_back("-L");
-    P4Options.push_back("en");
+    P4Options.emplace_back("-L");
+    P4Options.emplace_back("en");
 
     // The CTEST_P4_OPTIONS variable adds additional Perforce command line
     // options before the main command
diff --git a/Source/CTest/cmCTestSVN.cxx b/Source/CTest/cmCTestSVN.cxx
index 21f5e1c..afde61c 100644
--- a/Source/CTest/cmCTestSVN.cxx
+++ b/Source/CTest/cmCTestSVN.cxx
@@ -532,7 +532,7 @@ bool cmCTestSVN::LoadRepositories()
   }
 
   // Info for root repository
-  this->Repositories.emplace_back("");
+  this->Repositories.emplace_back();
   this->RootInfo = &(this->Repositories.back());
 
   // Run "svn status" to get the list of external repositories
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index aa37ff9..3eac903 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -135,7 +135,7 @@ cmCTestScriptHandler::~cmCTestScriptHandler()
 void cmCTestScriptHandler::AddConfigurationScript(const char* script,
                                                   bool pscope)
 {
-  this->ConfigurationScripts.push_back(script);
+  this->ConfigurationScripts.emplace_back(script);
   this->ScriptProcessScope.push_back(pscope);
 }
 
@@ -450,7 +450,7 @@ int cmCTestScriptHandler::ExtractVariables()
           updateVar, " specified without specifying CTEST_CVS_COMMAND.");
         return 12;
       }
-      this->ExtraUpdates.push_back(updateVal);
+      this->ExtraUpdates.emplace_back(updateVal);
     }
   }
 
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index 3042480..8ba3774 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -861,7 +861,7 @@ int cmCTestSubmitHandler::ProcessHandler()
 
   // Submit Done.xml last
   if (this->SubmitPart[cmCTest::PartDone]) {
-    files.push_back("Done.xml");
+    files.emplace_back("Done.xml");
   }
 
   if (ofs) {
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index acbe465..f86a4cd 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1524,7 +1524,7 @@ void cmCTestTestHandler::AddConfigurations(
   }
   tempPath = filepath + filename;
   attempted.push_back(tempPath);
-  attemptedConfigs.push_back("");
+  attemptedConfigs.emplace_back();
 
   if (!ctest->GetConfigType().empty()) {
     tempPath = filepath;
@@ -1547,32 +1547,32 @@ void cmCTestTestHandler::AddConfigurations(
     tempPath += "Release/";
     tempPath += filename;
     attempted.push_back(tempPath);
-    attemptedConfigs.push_back("Release");
+    attemptedConfigs.emplace_back("Release");
     tempPath = filepath;
     tempPath += "Debug/";
     tempPath += filename;
     attempted.push_back(tempPath);
-    attemptedConfigs.push_back("Debug");
+    attemptedConfigs.emplace_back("Debug");
     tempPath = filepath;
     tempPath += "MinSizeRel/";
     tempPath += filename;
     attempted.push_back(tempPath);
-    attemptedConfigs.push_back("MinSizeRel");
+    attemptedConfigs.emplace_back("MinSizeRel");
     tempPath = filepath;
     tempPath += "RelWithDebInfo/";
     tempPath += filename;
     attempted.push_back(tempPath);
-    attemptedConfigs.push_back("RelWithDebInfo");
+    attemptedConfigs.emplace_back("RelWithDebInfo");
     tempPath = filepath;
     tempPath += "Deployment/";
     tempPath += filename;
     attempted.push_back(tempPath);
-    attemptedConfigs.push_back("Deployment");
+    attemptedConfigs.emplace_back("Deployment");
     tempPath = filepath;
     tempPath += "Development/";
     tempPath += filename;
     attempted.push_back(tempPath);
-    attemptedConfigs.push_back("Deployment");
+    attemptedConfigs.emplace_back("Deployment");
   }
 }
 
diff --git a/Source/CTest/cmParseDelphiCoverage.cxx b/Source/CTest/cmParseDelphiCoverage.cxx
index cc81979..d99de06 100644
--- a/Source/CTest/cmParseDelphiCoverage.cxx
+++ b/Source/CTest/cmParseDelphiCoverage.cxx
@@ -44,7 +44,7 @@ public:
       // Check that the begin is the first non-space string on the line
       if ((beginPos == line.find_first_not_of(' ')) &&
           beginPos != std::string::npos) {
-        beginSet.push_back("begin");
+        beginSet.emplace_back("begin");
         coverageVector.push_back(-1);
         continue;
       }
diff --git a/Source/CursesDialog/ccmake.cxx b/Source/CursesDialog/ccmake.cxx
index 6dc692e..856723a 100644
--- a/Source/CursesDialog/ccmake.cxx
+++ b/Source/CursesDialog/ccmake.cxx
@@ -109,7 +109,7 @@ int main(int argc, char const* const* argv)
     if (strcmp(argv[j], "-debug") == 0) {
       debug = true;
     } else {
-      args.push_back(argv[j]);
+      args.emplace_back(argv[j]);
     }
   }
 
diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx
index a75d913..55ef375 100644
--- a/Source/CursesDialog/cmCursesMainForm.cxx
+++ b/Source/CursesDialog/cmCursesMainForm.cxx
@@ -37,10 +37,10 @@ cmCursesMainForm::cmCursesMainForm(std::vector<std::string> const& args,
   this->AdvancedMode = false;
   this->NumberOfVisibleEntries = 0;
   this->OkToGenerate = false;
-  this->HelpMessage.push_back(
+  this->HelpMessage.emplace_back(
     "Welcome to ccmake, curses based user interface for CMake.");
-  this->HelpMessage.push_back("");
-  this->HelpMessage.push_back(s_ConstHelpMessage);
+  this->HelpMessage.emplace_back();
+  this->HelpMessage.emplace_back(s_ConstHelpMessage);
   this->CMakeInstance = new cmake(cmake::RoleProject, cmState::Project);
   this->CMakeInstance->SetCMakeEditCommand(
     cmSystemTools::GetCMakeCursesCommand());
@@ -652,7 +652,7 @@ int cmCursesMainForm::Generate()
 
 void cmCursesMainForm::AddError(const char* message, const char* /*unused*/)
 {
-  this->Errors.push_back(message);
+  this->Errors.emplace_back(message);
 }
 
 void cmCursesMainForm::RemoveEntry(const char* value)
diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx
index 264c63c..8ed43f9 100644
--- a/Source/cmCPluginAPI.cxx
+++ b/Source/cmCPluginAPI.cxx
@@ -181,7 +181,7 @@ void CCONV cmAddExecutable(void* arg, const char* exename, int numSrcs,
   std::vector<std::string> srcs2;
   int i;
   for (i = 0; i < numSrcs; ++i) {
-    srcs2.push_back(srcs[i]);
+    srcs2.emplace_back(srcs[i]);
   }
   cmTarget* tg = mf->AddExecutable(exename, srcs2);
   if (win32) {
@@ -393,7 +393,7 @@ void CCONV cmAddLibrary(void* arg, const char* libname, int shared,
   std::vector<std::string> srcs2;
   int i;
   for (i = 0; i < numSrcs; ++i) {
-    srcs2.push_back(srcs[i]);
+    srcs2.emplace_back(srcs[i]);
   }
   mf->AddLibrary(
     libname,
@@ -419,8 +419,7 @@ int CCONV cmExecuteCommand(void* arg, const char* name, int numArgs,
   lff.Name = name;
   for (int i = 0; i < numArgs; ++i) {
     // Assume all arguments are quoted.
-    lff.Arguments.push_back(
-      cmListFileArgument(args[i], cmListFileArgument::Quoted, 0));
+    lff.Arguments.emplace_back(args[i], cmListFileArgument::Quoted, 0);
   }
   cmExecutionStatus status;
   return mf->ExecuteCommand(lff, status);
@@ -436,7 +435,7 @@ void CCONV cmExpandSourceListArguments(void* arg, int numArgs,
   std::vector<std::string> result;
   int i;
   for (i = 0; i < numArgs; ++i) {
-    result.push_back(args[i]);
+    result.emplace_back(args[i]);
   }
   int resargc = static_cast<int>(result.size());
   char** resargv = nullptr;
@@ -627,7 +626,7 @@ void CCONV cmSourceFileAddDepend(void* arg, const char* depend)
   if (cmSourceFile* rsf = sf->RealSourceFile) {
     rsf->AddDepend(depend);
   } else {
-    sf->Depends.push_back(depend);
+    sf->Depends.emplace_back(depend);
   }
 }
 
@@ -647,10 +646,10 @@ void CCONV cmSourceFileSetName(void* arg, const char* name, const char* dir,
   std::vector<std::string> headerExts;
   int i;
   for (i = 0; i < numSourceExtensions; ++i) {
-    sourceExts.push_back(sourceExtensions[i]);
+    sourceExts.emplace_back(sourceExtensions[i]);
   }
   for (i = 0; i < numHeaderExtensions; ++i) {
-    headerExts.push_back(headerExtensions[i]);
+    headerExts.emplace_back(headerExtensions[i]);
   }
 
   // Save the original name given.
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 1c0d9f6..aa24ace 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -1176,12 +1176,12 @@ int cmCTest::RunTest(std::vector<const char*> argv, std::string* output,
         if (strcmp(i, "--build-generator") == 0 &&
             timeout != cmCTest::MaxDuration() &&
             timeout > cmDuration::zero()) {
-          args.push_back("--test-timeout");
+          args.emplace_back("--test-timeout");
           std::ostringstream msg;
           msg << cmDurationTo<unsigned int>(timeout);
           args.push_back(msg.str());
         }
-        args.push_back(i);
+        args.emplace_back(i);
       }
     }
     if (log) {
@@ -2690,7 +2690,7 @@ void cmCTest::SetSpecificTrack(const char* track)
 
 void cmCTest::AddSubmitFile(Part part, const char* name)
 {
-  this->Parts[part].SubmitFiles.push_back(name);
+  this->Parts[part].SubmitFiles.emplace_back(name);
 }
 
 void cmCTest::AddCTestConfigurationOverwrite(const std::string& overStr)
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index 4274cb4..87bc150 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -884,12 +884,12 @@ void cmComputeLinkInformation::AddLinkExtension(const char* e, LinkType type)
 {
   if (e && *e) {
     if (type == LinkStatic) {
-      this->StaticLinkExtensions.push_back(e);
+      this->StaticLinkExtensions.emplace_back(e);
     }
     if (type == LinkShared) {
-      this->SharedLinkExtensions.push_back(e);
+      this->SharedLinkExtensions.emplace_back(e);
     }
-    this->LinkExtensions.push_back(e);
+    this->LinkExtensions.emplace_back(e);
   }
 }
 
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index a483fd1..c4e83df 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -1005,12 +1005,12 @@ void cmCoreTryCompile::FindOutputFile(const std::string& targetName,
     tmp += config;
     searchDirs.push_back(std::move(tmp));
   }
-  searchDirs.push_back("/Debug");
+  searchDirs.emplace_back("/Debug");
 #if defined(__APPLE__)
   std::string app = "/Debug/" + targetName + ".app";
   searchDirs.push_back(std::move(app));
 #endif
-  searchDirs.push_back("/Development");
+  searchDirs.emplace_back("/Development");
 
   for (std::string const& sdir : searchDirs) {
     std::string command = this->BinaryDirectory;
diff --git a/Source/cmDependsJavaParserHelper.cxx b/Source/cmDependsJavaParserHelper.cxx
index 02db119..792db48 100644
--- a/Source/cmDependsJavaParserHelper.cxx
+++ b/Source/cmDependsJavaParserHelper.cxx
@@ -68,7 +68,7 @@ void cmDependsJavaParserHelper::AddClassFound(const char* sclass)
       return;
     }
   }
-  this->ClassesFound.push_back(sclass);
+  this->ClassesFound.emplace_back(sclass);
 }
 
 void cmDependsJavaParserHelper::AddPackagesImport(const char* sclass)
@@ -78,7 +78,7 @@ void cmDependsJavaParserHelper::AddPackagesImport(const char* sclass)
       return;
     }
   }
-  this->PackagesImport.push_back(sclass);
+  this->PackagesImport.emplace_back(sclass);
 }
 
 void cmDependsJavaParserHelper::SafePrintMissing(const char* str, int line,
diff --git a/Source/cmExecuteProcessCommand.cxx b/Source/cmExecuteProcessCommand.cxx
index 679a648..8de012a 100644
--- a/Source/cmExecuteProcessCommand.cxx
+++ b/Source/cmExecuteProcessCommand.cxx
@@ -54,7 +54,7 @@ bool cmExecuteProcessCommand::InitialPass(std::vector<std::string> const& args,
     if (args[i] == "COMMAND") {
       doing_command = true;
       command_index = cmds.size();
-      cmds.push_back(std::vector<const char*>());
+      cmds.emplace_back();
     } else if (args[i] == "OUTPUT_VARIABLE") {
       doing_command = false;
       if (++i < args.size()) {
@@ -327,15 +327,15 @@ bool cmExecuteProcessCommand::InitialPass(std::vector<std::string> const& args,
                 cmsysProcess_GetExitValueByIndex(cp, static_cast<int>(i));
               char buf[16];
               sprintf(buf, "%d", exitCode);
-              res.push_back(buf);
+              res.emplace_back(buf);
             } break;
             case kwsysProcess_StateByIndex_Exception:
-              res.push_back(cmsysProcess_GetExceptionStringByIndex(
+              res.emplace_back(cmsysProcess_GetExceptionStringByIndex(
                 cp, static_cast<int>(i)));
               break;
             case kwsysProcess_StateByIndex_Error:
             default:
-              res.push_back("Error getting the child return code");
+              res.emplace_back("Error getting the child return code");
               break;
           }
         }
diff --git a/Source/cmFindCommon.cxx b/Source/cmFindCommon.cxx
index 009f0e3..39051b9 100644
--- a/Source/cmFindCommon.cxx
+++ b/Source/cmFindCommon.cxx
@@ -178,13 +178,13 @@ void cmFindCommon::RerootPaths(std::vector<std::string>& paths)
     cmSystemTools::ExpandListArgument(rootPath, roots);
   }
   if (sysrootCompile) {
-    roots.push_back(sysrootCompile);
+    roots.emplace_back(sysrootCompile);
   }
   if (sysrootLink) {
-    roots.push_back(sysrootLink);
+    roots.emplace_back(sysrootLink);
   }
   if (sysroot) {
-    roots.push_back(sysroot);
+    roots.emplace_back(sysroot);
   }
   for (std::string& r : roots) {
     cmSystemTools::ConvertToUnixSlashes(r);
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 8dc7ca2..26f8f87 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -1848,7 +1848,7 @@ private:
       }
       for (std::string const& n : this->Names) {
         if (cmsysString_strncasecmp(fname, n.c_str(), n.length()) == 0) {
-          matches.push_back(fname);
+          matches.emplace_back(fname);
         }
       }
     }
@@ -1907,7 +1907,7 @@ private:
       for (std::string name : this->Names) {
         name += this->Extension;
         if (cmsysString_strcasecmp(fname, name.c_str()) == 0) {
-          matches.push_back(fname);
+          matches.emplace_back(fname);
         }
       }
     }
@@ -2070,16 +2070,16 @@ bool cmFindPackageCommand::SearchPrefix(std::string const& prefix_in)
     common.push_back("lib/" + this->LibraryArchitecture);
   }
   if (this->UseLib32Paths) {
-    common.push_back("lib32");
+    common.emplace_back("lib32");
   }
   if (this->UseLib64Paths) {
-    common.push_back("lib64");
+    common.emplace_back("lib64");
   }
   if (this->UseLibx32Paths) {
-    common.push_back("libx32");
+    common.emplace_back("libx32");
   }
-  common.push_back("lib");
-  common.push_back("share");
+  common.emplace_back("lib");
+  common.emplace_back("share");
 
   //  PREFIX/(lib/ARCH|lib*|share)/cmake/(Foo|foo|FOO).*/
   {
diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx
index 3047167..e359def 100644
--- a/Source/cmForEachCommand.cxx
+++ b/Source/cmForEachCommand.cxx
@@ -164,7 +164,7 @@ bool cmForEachCommand::InitialPass(std::vector<std::string> const& args,
           break;
         }
         sprintf(buffer, "%d", cc);
-        range.push_back(buffer);
+        range.emplace_back(buffer);
         if (cc == stop) {
           break;
         }
diff --git a/Source/cmGeneratorExpressionLexer.cxx b/Source/cmGeneratorExpressionLexer.cxx
index 242915d..dd1e243 100644
--- a/Source/cmGeneratorExpressionLexer.cxx
+++ b/Source/cmGeneratorExpressionLexer.cxx
@@ -20,8 +20,8 @@ std::vector<cmGeneratorExpressionToken> cmGeneratorExpressionLexer::Tokenize(
   std::vector<cmGeneratorExpressionToken> result;
 
   if (input.find('$') == std::string::npos) {
-    result.push_back(cmGeneratorExpressionToken(
-      cmGeneratorExpressionToken::Text, input.c_str(), input.size()));
+    result.emplace_back(cmGeneratorExpressionToken::Text, input.c_str(),
+                        input.size());
     return result;
   }
 
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 6515dfa..e06d1f2 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -319,7 +319,7 @@ std::string cmGeneratorTarget::GetOutputName(
       props.push_back(configUpper + "_OUTPUT_NAME");
     }
     // OUTPUT_NAME
-    props.push_back("OUTPUT_NAME");
+    props.emplace_back("OUTPUT_NAME");
 
     std::string outName;
     for (std::string const& p : props) {
@@ -988,7 +988,7 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetSourceFilePaths(
             item.back() == '>') {
           continue;
         }
-        files.push_back(item);
+        files.emplace_back(item);
       }
     }
     return files;
@@ -3260,7 +3260,7 @@ void processLinkDirectories(
       // in case projects set the LINK_DIRECTORIES property directly.
       cmSystemTools::ConvertToUnixSlashes(entryDirectory);
       if (uniqueDirectories.insert(entryDirectory).second) {
-        directories.push_back(entryDirectory);
+        directories.emplace_back(entryDirectory);
         if (debugDirectories) {
           usedDirectories += " * " + entryDirectory + "\n";
         }
@@ -3838,7 +3838,7 @@ std::string cmGeneratorTarget::GetPDBName(const std::string& config) const
   }
 
   // PDB_NAME
-  props.push_back("PDB_NAME");
+  props.emplace_back("PDB_NAME");
 
   for (std::string const& p : props) {
     if (const char* outName = this->GetProperty(p)) {
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 85c2345..ccb3aa4 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1761,7 +1761,7 @@ void cmGlobalGenerator::GenerateBuildCommand(
   bool /*unused*/, int /*unused*/, bool /*unused*/,
   std::vector<std::string> const& /*unused*/)
 {
-  makeCommand.push_back(
+  makeCommand.emplace_back(
     "cmGlobalGenerator::GenerateBuildCommand not implemented");
 }
 
@@ -2313,12 +2313,12 @@ void cmGlobalGenerator::AddGlobalTarget_Package(
   singleLine.push_back("./CPackConfig.cmake");
   gti.CommandLines.push_back(std::move(singleLine));
   if (this->GetPreinstallTargetName()) {
-    gti.Depends.push_back(this->GetPreinstallTargetName());
+    gti.Depends.emplace_back(this->GetPreinstallTargetName());
   } else {
     const char* noPackageAll =
       mf->GetDefinition("CMAKE_SKIP_PACKAGE_ALL_DEPENDENCY");
     if (!noPackageAll || cmSystemTools::IsOff(noPackageAll)) {
-      gti.Depends.push_back(this->GetAllTargetName());
+      gti.Depends.emplace_back(this->GetAllTargetName());
     }
   }
   targets.push_back(std::move(gti));
@@ -2483,12 +2483,12 @@ void cmGlobalGenerator::AddGlobalTarget_Install(
     gti.UsesTerminal = true;
     cmCustomCommandLine singleLine;
     if (this->GetPreinstallTargetName()) {
-      gti.Depends.push_back(this->GetPreinstallTargetName());
+      gti.Depends.emplace_back(this->GetPreinstallTargetName());
     } else {
       const char* noall =
         mf->GetDefinition("CMAKE_SKIP_INSTALL_ALL_DEPENDENCY");
       if (!noall || cmSystemTools::IsOff(noall)) {
-        gti.Depends.push_back(this->GetAllTargetName());
+        gti.Depends.emplace_back(this->GetAllTargetName());
       }
     }
     if (mf->GetDefinition("CMake_BINARY_DIR") &&
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index e7b0981..23dbd76 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -550,7 +550,7 @@ bool cmGlobalNinjaGenerator::FindMakeProgram(cmMakefile* mf)
     this->NinjaCommand = ninjaCommand;
     std::vector<std::string> command;
     command.push_back(this->NinjaCommand);
-    command.push_back("--version");
+    command.emplace_back("--version");
     std::string version;
     std::string error;
     if (!cmSystemTools::RunSingleCommand(command, &version, &error, nullptr,
@@ -681,12 +681,12 @@ void cmGlobalNinjaGenerator::GenerateBuildCommand(
   makeCommand.push_back(this->SelectMakeProgram(makeProgram));
 
   if (verbose) {
-    makeCommand.push_back("-v");
+    makeCommand.emplace_back("-v");
   }
 
   if ((jobs != cmake::NO_BUILD_PARALLEL_LEVEL) &&
       (jobs != cmake::DEFAULT_BUILD_PARALLEL_LEVEL)) {
-    makeCommand.push_back("-j");
+    makeCommand.emplace_back("-j");
     makeCommand.push_back(std::to_string(jobs));
   }
 
@@ -694,8 +694,8 @@ void cmGlobalNinjaGenerator::GenerateBuildCommand(
                      makeOptions.end());
   if (!targetName.empty()) {
     if (targetName == "clean") {
-      makeCommand.push_back("-t");
-      makeCommand.push_back("clean");
+      makeCommand.emplace_back("-t");
+      makeCommand.emplace_back("clean");
     } else {
       makeCommand.push_back(targetName);
     }
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index ceee500..52bb046 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -216,7 +216,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainMakefile2()
   // Just depend on the all target to drive the build.
   std::vector<std::string> depends;
   std::vector<std::string> no_commands;
-  depends.push_back("all");
+  depends.emplace_back("all");
 
   // Write the rule.
   lg->WriteMakeRule(makefileStream,
@@ -513,7 +513,7 @@ void cmGlobalUnixMakefileGenerator3::GenerateBuildCommand(
   makeCommand.push_back(this->SelectMakeProgram(makeProgram));
 
   if (jobs != cmake::NO_BUILD_PARALLEL_LEVEL) {
-    makeCommand.push_back("-j");
+    makeCommand.emplace_back("-j");
     if (jobs != cmake::DEFAULT_BUILD_PARALLEL_LEVEL) {
       makeCommand.push_back(std::to_string(jobs));
     }
@@ -542,7 +542,7 @@ void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules(
 
   bool regenerate = !this->GlobalSettingIsOn("CMAKE_SUPPRESS_REGENERATION");
   if (regenerate) {
-    depends.push_back("cmake_check_build_system");
+    depends.emplace_back("cmake_check_build_system");
   }
 
   // write the target convenience rules
@@ -577,7 +577,7 @@ void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules(
         commands.push_back(lg->GetRecursiveMakeCall(tmp.c_str(), name));
         depends.clear();
         if (regenerate) {
-          depends.push_back("cmake_check_build_system");
+          depends.emplace_back("cmake_check_build_system");
         }
         lg->WriteMakeRule(ruleFileStream, "Build rule for target.", name,
                           depends, commands, true);
@@ -631,7 +631,7 @@ void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules2(
 
   bool regenerate = !this->GlobalSettingIsOn("CMAKE_SUPPRESS_REGENERATION");
   if (regenerate) {
-    depends.push_back("cmake_check_build_system");
+    depends.emplace_back("cmake_check_build_system");
   }
 
   // for each target Generate the rule files for each target.
@@ -740,7 +740,7 @@ void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules2(
       }
       depends.clear();
       if (regenerate) {
-        depends.push_back("cmake_check_build_system");
+        depends.emplace_back("cmake_check_build_system");
       }
       localName = lg->GetRelativeTargetDirectory(gtarget);
       localName += "/rule";
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 6618351..80ccd73 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -329,14 +329,14 @@ void cmGlobalXCodeGenerator::GenerateBuildCommand(
   int jobs, bool /*verbose*/, std::vector<std::string> const& makeOptions)
 {
   // now build the test
-  makeCommand.push_back(
+  makeCommand.emplace_back(
     this->SelectMakeProgram(makeProgram, this->GetXcodeBuildCommand()));
 
-  makeCommand.push_back("-project");
+  makeCommand.emplace_back("-project");
   std::string projectArg = projectName;
   projectArg += ".xcode";
   projectArg += "proj";
-  makeCommand.push_back(projectArg);
+  makeCommand.emplace_back(projectArg);
 
   bool clean = false;
   std::string realTarget = targetName;
@@ -345,23 +345,23 @@ void cmGlobalXCodeGenerator::GenerateBuildCommand(
     realTarget = "ALL_BUILD";
   }
   if (clean) {
-    makeCommand.push_back("clean");
+    makeCommand.emplace_back("clean");
   } else {
-    makeCommand.push_back("build");
+    makeCommand.emplace_back("build");
   }
-  makeCommand.push_back("-target");
+  makeCommand.emplace_back("-target");
   if (!realTarget.empty()) {
-    makeCommand.push_back(realTarget);
+    makeCommand.emplace_back(realTarget);
   } else {
-    makeCommand.push_back("ALL_BUILD");
+    makeCommand.emplace_back("ALL_BUILD");
   }
-  makeCommand.push_back("-configuration");
-  makeCommand.push_back(!config.empty() ? config : "Debug");
+  makeCommand.emplace_back("-configuration");
+  makeCommand.emplace_back(!config.empty() ? config : "Debug");
 
   if (jobs != cmake::NO_BUILD_PARALLEL_LEVEL) {
-    makeCommand.push_back("-jobs");
+    makeCommand.emplace_back("-jobs");
     if (jobs != cmake::DEFAULT_BUILD_PARALLEL_LEVEL) {
-      makeCommand.push_back(std::to_string(jobs));
+      makeCommand.emplace_back(std::to_string(jobs));
     }
   }
 
@@ -1051,7 +1051,7 @@ void cmGlobalXCodeGenerator::SetCurrentLocalGenerator(cmLocalGenerator* gen)
   this->CurrentConfigurationTypes.clear();
   this->CurrentMakefile->GetConfigurations(this->CurrentConfigurationTypes);
   if (this->CurrentConfigurationTypes.empty()) {
-    this->CurrentConfigurationTypes.push_back("");
+    this->CurrentConfigurationTypes.emplace_back();
   }
 }
 
diff --git a/Source/cmJsonObjects.cxx b/Source/cmJsonObjects.cxx
index bb56714..135fd25 100644
--- a/Source/cmJsonObjects.cxx
+++ b/Source/cmJsonObjects.cxx
@@ -49,7 +49,7 @@ std::vector<std::string> getConfigurations(const cmake* cm)
 
   makefiles[0]->GetConfigurations(configurations);
   if (configurations.empty()) {
-    configurations.push_back("");
+    configurations.emplace_back();
   }
   return configurations;
 }
@@ -292,10 +292,10 @@ static Json::Value DumpSourceFilesList(
         lg->AppendIncludeDirectories(includes, evaluatedIncludes, *file);
 
         for (const auto& include : includes) {
-          fileData.IncludePathList.push_back(
-            std::make_pair(include,
-                           target->IsSystemIncludeDirectory(
-                             include, config, fileData.Language)));
+          fileData.IncludePathList.emplace_back(
+            include,
+            target->IsSystemIncludeDirectory(include, config,
+                                             fileData.Language));
         }
       }
 
@@ -580,8 +580,8 @@ static Json::Value DumpTarget(cmGeneratorTarget* target,
     std::vector<std::string> includePathList;
     lg->GetIncludeDirectories(includePathList, target, lang, config, true);
     for (std::string const& i : includePathList) {
-      ld.IncludePathList.push_back(
-        std::make_pair(i, target->IsSystemIncludeDirectory(i, config, lang)));
+      ld.IncludePathList.emplace_back(
+        i, target->IsSystemIncludeDirectory(i, config, lang));
     }
   }
 
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 797add9..97e684b 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1684,19 +1684,19 @@ void cmLocalGenerator::AddCompilerRequirementFlag(
   static std::map<std::string, std::vector<std::string>> langStdMap;
   if (langStdMap.empty()) {
     // Maintain sorted order, most recent first.
-    langStdMap["CXX"].push_back("20");
-    langStdMap["CXX"].push_back("17");
-    langStdMap["CXX"].push_back("14");
-    langStdMap["CXX"].push_back("11");
-    langStdMap["CXX"].push_back("98");
-
-    langStdMap["C"].push_back("11");
-    langStdMap["C"].push_back("99");
-    langStdMap["C"].push_back("90");
-
-    langStdMap["CUDA"].push_back("14");
-    langStdMap["CUDA"].push_back("11");
-    langStdMap["CUDA"].push_back("98");
+    langStdMap["CXX"].emplace_back("20");
+    langStdMap["CXX"].emplace_back("17");
+    langStdMap["CXX"].emplace_back("14");
+    langStdMap["CXX"].emplace_back("11");
+    langStdMap["CXX"].emplace_back("98");
+
+    langStdMap["C"].emplace_back("11");
+    langStdMap["C"].emplace_back("99");
+    langStdMap["C"].emplace_back("90");
+
+    langStdMap["CUDA"].emplace_back("14");
+    langStdMap["CUDA"].emplace_back("11");
+    langStdMap["CUDA"].emplace_back("98");
   }
 
   std::string standard(standardProp);
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 707a1b5..9f42a92 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -318,7 +318,7 @@ void cmLocalUnixMakefileGenerator3::WriteObjectConvenienceRule(
 
     // Add a rule to drive the rule below.
     std::vector<std::string> depends;
-    depends.push_back(output);
+    depends.emplace_back(output);
     std::vector<std::string> no_commands;
     this->WriteMakeRule(ruleFileStream, nullptr, outNoExt, depends,
                         no_commands, true, true);
@@ -685,7 +685,7 @@ void cmLocalUnixMakefileGenerator3::WriteSpecialTargetsTop(
   }
   // Add a fake suffix to keep HP happy.  Must be max 32 chars for SGI make.
   std::vector<std::string> depends;
-  depends.push_back(".hpux_make_needs_suffix_list");
+  depends.emplace_back(".hpux_make_needs_suffix_list");
   this->WriteMakeRule(makefileStream, nullptr, ".SUFFIXES", depends,
                       no_commands, false);
   if (this->IsWatcomWMake()) {
@@ -852,7 +852,7 @@ void cmLocalUnixMakefileGenerator3::AppendRuleDepend(
   const char* nodep =
     this->Makefile->GetDefinition("CMAKE_SKIP_RULE_DEPENDENCY");
   if (!nodep || cmSystemTools::IsOff(nodep)) {
-    depends.push_back(ruleFileName);
+    depends.emplace_back(ruleFileName);
   }
 }
 
@@ -1507,7 +1507,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules(
     // Just depend on the all target to drive the build.
     std::vector<std::string> depends;
     std::vector<std::string> no_commands;
-    depends.push_back("all");
+    depends.emplace_back("all");
 
     // Write the rule.
     this->WriteMakeRule(ruleFileStream,
@@ -1571,7 +1571,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules(
           (targetName == "install/strip")) {
         // Provide a fast install target that does not depend on all
         // but has the same command.
-        depends.push_back("preinstall/fast");
+        depends.emplace_back("preinstall/fast");
       } else {
         // Just forward to the real target so at least it will work.
         depends.push_back(targetName);
@@ -1593,7 +1593,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules(
   bool regenerate =
     !this->GlobalGenerator->GlobalSettingIsOn("CMAKE_SUPPRESS_REGENERATION");
   if (regenerate) {
-    depends.push_back("cmake_check_build_system");
+    depends.emplace_back("cmake_check_build_system");
   }
 
   std::string progressDir = this->GetBinaryDirectory();
@@ -1643,7 +1643,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules(
                       depends, commands, true);
   commands.clear();
   depends.clear();
-  depends.push_back("clean");
+  depends.emplace_back("clean");
   this->WriteMakeRule(ruleFileStream, "The main clean target", "clean/fast",
                       depends, commands, true);
 
@@ -1656,10 +1656,10 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules(
     this->Makefile->GetDefinition("CMAKE_SKIP_INSTALL_ALL_DEPENDENCY");
   if (!noall || cmSystemTools::IsOff(noall)) {
     // Drive the build before installing.
-    depends.push_back("all");
+    depends.emplace_back("all");
   } else if (regenerate) {
     // At least make sure the build system is up to date.
-    depends.push_back("cmake_check_build_system");
+    depends.emplace_back("cmake_check_build_system");
   }
   commands.push_back(
     this->GetRecursiveMakeCall(mf2Dir.c_str(), recursiveTarget));
diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx
index 23d93a3..411c0c3 100644
--- a/Source/cmMacroCommand.cxx
+++ b/Source/cmMacroCommand.cxx
@@ -94,7 +94,7 @@ bool cmMacroHelperCommand::InvokeInitialPass(
   char argvName[60];
   for (unsigned int j = 0; j < expandedArgs.size(); ++j) {
     sprintf(argvName, "${ARGV%u}", j);
-    argVs.push_back(argvName);
+    argVs.emplace_back(argvName);
   }
   // Invoke all the functions that were collected in the block.
   cmListFileFunction newLFF;
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 3ff576e..9e9b6af 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2099,7 +2099,7 @@ void cmMakefile::AddSourceGroup(const std::vector<std::string>& name,
   if (i == -1) {
     // group does not exist nor belong to any existing group
     // add its first component
-    this->SourceGroups.push_back(cmSourceGroup(name[0], regex));
+    this->SourceGroups.emplace_back(name[0], regex);
     sg = this->GetSourceGroup(currentName);
     i = 0; // last component found
   }
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index d1dcd81..1207646 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -816,7 +816,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
     lang_has_assembly && this->LocalGenerator->GetCreateAssemblySourceRules();
   if (do_preprocess_rules || do_assembly_rules) {
     std::vector<std::string> force_depends;
-    force_depends.push_back("cmake_force");
+    force_depends.emplace_back("cmake_force");
     std::string::size_type dot_pos = relativeObj.rfind('.');
     std::string relativeObjBase = relativeObj.substr(0, dot_pos);
     dot_pos = obj.rfind('.');
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index b62da66..8f6a23a 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -377,7 +377,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile)
     cmEraseIf(linkCmds, cmNinjaRemoveNoOpCommands());
 
     linkCmds.insert(linkCmds.begin(), "$PRE_LINK");
-    linkCmds.push_back("$POST_BUILD");
+    linkCmds.emplace_back("$POST_BUILD");
     std::string linkCmd =
       this->GetLocalGenerator()->BuildCommandLine(linkCmds);
 
@@ -405,7 +405,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile)
       std::vector<std::string> commandLines;
       commandLines.push_back(cmakeCommand +
                              " -E cmake_symlink_executable $in $out");
-      commandLines.push_back("$POST_BUILD");
+      commandLines.emplace_back("$POST_BUILD");
 
       this->GetGlobalGenerator()->AddRule(
         "CMAKE_SYMLINK_EXECUTABLE",
@@ -423,7 +423,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile)
       std::vector<std::string> commandLines;
       commandLines.push_back(cmakeCommand +
                              " -E cmake_symlink_library $in $SONAME $out");
-      commandLines.push_back("$POST_BUILD");
+      commandLines.emplace_back("$POST_BUILD");
 
       this->GetGlobalGenerator()->AddRule(
         "CMAKE_SYMLINK_LIBRARY",
diff --git a/Source/cmParseArgumentsCommand.cxx b/Source/cmParseArgumentsCommand.cxx
index a2bf841..796974c 100644
--- a/Source/cmParseArgumentsCommand.cxx
+++ b/Source/cmParseArgumentsCommand.cxx
@@ -151,7 +151,7 @@ bool cmParseArgumentsCommand::InitialPass(std::vector<std::string> const& args,
         cmSystemTools::SetFatalErrorOccured();
         return true;
       }
-      list.push_back(arg);
+      list.emplace_back(arg);
     }
   }
 
diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx
index 14e92c6..2fe9fe8 100644
--- a/Source/cmProjectCommand.cxx
+++ b/Source/cmProjectCommand.cxx
@@ -198,7 +198,7 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
     return true;
   }
   if (haveLanguages && languages.empty()) {
-    languages.push_back("NONE");
+    languages.emplace_back("NONE");
   }
 
   cmPolicies::PolicyStatus cmp0048 =
@@ -264,22 +264,22 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
   } else if (cmp0048 != cmPolicies::OLD) {
     // Set project VERSION variables to empty
     std::vector<std::string> vv;
-    vv.push_back("PROJECT_VERSION");
-    vv.push_back("PROJECT_VERSION_MAJOR");
-    vv.push_back("PROJECT_VERSION_MINOR");
-    vv.push_back("PROJECT_VERSION_PATCH");
-    vv.push_back("PROJECT_VERSION_TWEAK");
+    vv.emplace_back("PROJECT_VERSION");
+    vv.emplace_back("PROJECT_VERSION_MAJOR");
+    vv.emplace_back("PROJECT_VERSION_MINOR");
+    vv.emplace_back("PROJECT_VERSION_PATCH");
+    vv.emplace_back("PROJECT_VERSION_TWEAK");
     vv.push_back(projectName + "_VERSION");
     vv.push_back(projectName + "_VERSION_MAJOR");
     vv.push_back(projectName + "_VERSION_MINOR");
     vv.push_back(projectName + "_VERSION_PATCH");
     vv.push_back(projectName + "_VERSION_TWEAK");
     if (this->Makefile->IsRootMakefile()) {
-      vv.push_back("CMAKE_PROJECT_VERSION");
-      vv.push_back("CMAKE_PROJECT_VERSION_MAJOR");
-      vv.push_back("CMAKE_PROJECT_VERSION_MINOR");
-      vv.push_back("CMAKE_PROJECT_VERSION_PATCH");
-      vv.push_back("CMAKE_PROJECT_VERSION_TWEAK");
+      vv.emplace_back("CMAKE_PROJECT_VERSION");
+      vv.emplace_back("CMAKE_PROJECT_VERSION_MAJOR");
+      vv.emplace_back("CMAKE_PROJECT_VERSION_MINOR");
+      vv.emplace_back("CMAKE_PROJECT_VERSION_PATCH");
+      vv.emplace_back("CMAKE_PROJECT_VERSION_TWEAK");
     }
     std::string vw;
     for (std::string const& i : vv) {
@@ -315,8 +315,8 @@ bool cmProjectCommand::InitialPass(std::vector<std::string> const& args,
 
   if (languages.empty()) {
     // if no language is specified do c and c++
-    languages.push_back("C");
-    languages.push_back("CXX");
+    languages.emplace_back("C");
+    languages.emplace_back("CXX");
   }
   this->Makefile->EnableLanguage(languages, false);
   std::string extraInclude = "CMAKE_PROJECT_" + projectName + "_INCLUDE";
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx
index 9fa8a89..1f61632 100644
--- a/Source/cmQtAutoGenInitializer.cxx
+++ b/Source/cmQtAutoGenInitializer.cxx
@@ -1482,7 +1482,7 @@ std::pair<bool, std::string> GetQtExecutable(
     if (cmSystemTools::FileExists(result, true)) {
       std::vector<std::string> command;
       command.push_back(result);
-      command.push_back("-h");
+      command.emplace_back("-h");
       std::string stdOut;
       std::string stdErr;
       int retVal = 0;
@@ -1546,9 +1546,9 @@ bool cmQtAutoGenInitializer::GetRccExecutable()
 
   if (this->QtVersion.Major == 5 || this->QtVersion.Major == 6) {
     if (stdOut.find("--list") != std::string::npos) {
-      this->Rcc.ListOptions.push_back("--list");
+      this->Rcc.ListOptions.emplace_back("--list");
     } else {
-      this->Rcc.ListOptions.push_back("-list");
+      this->Rcc.ListOptions.emplace_back("-list");
     }
   }
   return true;
diff --git a/Source/cmQtAutoGeneratorMocUic.cxx b/Source/cmQtAutoGeneratorMocUic.cxx
index 9658e97..56ce5b6 100644
--- a/Source/cmQtAutoGeneratorMocUic.cxx
+++ b/Source/cmQtAutoGeneratorMocUic.cxx
@@ -844,10 +844,10 @@ void cmQtAutoGeneratorMocUic::JobMocT::GenerateMoc(WorkerT& wrk)
                wrk.Moc().AllOptions.end());
     // Add predefs include
     if (!wrk.Moc().PredefsFileAbs.empty()) {
-      cmd.push_back("--include");
+      cmd.emplace_back("--include");
       cmd.push_back(wrk.Moc().PredefsFileAbs);
     }
-    cmd.push_back("-o");
+    cmd.emplace_back("-o");
     cmd.push_back(BuildFile);
     cmd.push_back(SourceFile);
 
@@ -963,7 +963,7 @@ void cmQtAutoGeneratorMocUic::JobUicT::GenerateUic(WorkerT& wrk)
       }
       cmd.insert(cmd.end(), allOpts.begin(), allOpts.end());
     }
-    cmd.push_back("-o");
+    cmd.emplace_back("-o");
     cmd.push_back(BuildFile);
     cmd.push_back(SourceFile);
 
@@ -1288,7 +1288,7 @@ bool cmQtAutoGeneratorMocUic::Init(cmMakefile* makefile)
                                std::string& error) {
         if (!key.empty()) {
           if (!exp.empty()) {
-            Moc_.DependFilters.push_back(KeyExpT());
+            Moc_.DependFilters.emplace_back();
             KeyExpT& filter(Moc_.DependFilters.back());
             if (filter.Exp.compile(exp)) {
               filter.Key = key;
@@ -1506,7 +1506,7 @@ bool cmQtAutoGeneratorMocUic::Init(cmMakefile* makefile)
       }
       // Append framework includes
       for (std::string const& path : frameworkPaths) {
-        Moc_.Includes.push_back("-F");
+        Moc_.Includes.emplace_back("-F");
         Moc_.Includes.push_back(path);
       }
     }
diff --git a/Source/cmQtAutoGeneratorRcc.cxx b/Source/cmQtAutoGeneratorRcc.cxx
index 29dc7a0..f7af99e 100644
--- a/Source/cmQtAutoGeneratorRcc.cxx
+++ b/Source/cmQtAutoGeneratorRcc.cxx
@@ -603,7 +603,7 @@ bool cmQtAutoGeneratorRcc::GenerateRcc()
     std::vector<std::string> cmd;
     cmd.push_back(RccExecutable_);
     cmd.insert(cmd.end(), Options_.begin(), Options_.end());
-    cmd.push_back("-o");
+    cmd.emplace_back("-o");
     cmd.push_back(RccFileOutput_);
     cmd.push_back(QrcFile_);
     // We're done here if the process fails to start
diff --git a/Source/cmRST.cxx b/Source/cmRST.cxx
index f0f92aa..2866a39 100644
--- a/Source/cmRST.cxx
+++ b/Source/cmRST.cxx
@@ -178,7 +178,7 @@ void cmRST::ProcessLine(std::string const& line)
       // Record the literal lines to output after whole block.
       // Ignore the language spec and record the opening line as blank.
       this->Directive = DirectiveCodeBlock;
-      this->MarkupLines.push_back("");
+      this->MarkupLines.emplace_back();
     } else if (this->ReplaceDirective.find(line)) {
       // Record the replace directive content.
       this->Directive = DirectiveReplace;
@@ -221,7 +221,7 @@ void cmRST::ProcessLine(std::string const& line)
     // Record the literal lines to output after whole block.
     this->Markup = MarkupNormal;
     this->Directive = DirectiveLiteralBlock;
-    this->MarkupLines.push_back("");
+    this->MarkupLines.emplace_back();
     this->OutputLine("", false);
   }
   // Print non-markup lines.
diff --git a/Source/cmSetSourceFilesPropertiesCommand.cxx b/Source/cmSetSourceFilesPropertiesCommand.cxx
index 8445b02..9388e7c 100644
--- a/Source/cmSetSourceFilesPropertiesCommand.cxx
+++ b/Source/cmSetSourceFilesPropertiesCommand.cxx
@@ -53,17 +53,17 @@ bool cmSetSourceFilesPropertiesCommand::RunCommand(
   for (j = propbeg; j != propend; ++j) {
     // old style allows for specifier before PROPERTIES keyword
     if (*j == "ABSTRACT") {
-      propertyPairs.push_back("ABSTRACT");
-      propertyPairs.push_back("1");
+      propertyPairs.emplace_back("ABSTRACT");
+      propertyPairs.emplace_back("1");
     } else if (*j == "WRAP_EXCLUDE") {
-      propertyPairs.push_back("WRAP_EXCLUDE");
-      propertyPairs.push_back("1");
+      propertyPairs.emplace_back("WRAP_EXCLUDE");
+      propertyPairs.emplace_back("1");
     } else if (*j == "GENERATED") {
       generated = true;
-      propertyPairs.push_back("GENERATED");
-      propertyPairs.push_back("1");
+      propertyPairs.emplace_back("GENERATED");
+      propertyPairs.emplace_back("1");
     } else if (*j == "COMPILE_FLAGS") {
-      propertyPairs.push_back("COMPILE_FLAGS");
+      propertyPairs.emplace_back("COMPILE_FLAGS");
       ++j;
       if (j == propend) {
         errors = "called with incorrect number of arguments "
@@ -72,7 +72,7 @@ bool cmSetSourceFilesPropertiesCommand::RunCommand(
       }
       propertyPairs.push_back(*j);
     } else if (*j == "OBJECT_DEPENDS") {
-      propertyPairs.push_back("OBJECT_DEPENDS");
+      propertyPairs.emplace_back("OBJECT_DEPENDS");
       ++j;
       if (j == propend) {
         errors = "called with incorrect number of arguments "
diff --git a/Source/cmSiteNameCommand.cxx b/Source/cmSiteNameCommand.cxx
index 7f33b7a..01758ee 100644
--- a/Source/cmSiteNameCommand.cxx
+++ b/Source/cmSiteNameCommand.cxx
@@ -19,12 +19,12 @@ bool cmSiteNameCommand::InitialPass(std::vector<std::string> const& args,
     return false;
   }
   std::vector<std::string> paths;
-  paths.push_back("/usr/bsd");
-  paths.push_back("/usr/sbin");
-  paths.push_back("/usr/bin");
-  paths.push_back("/bin");
-  paths.push_back("/sbin");
-  paths.push_back("/usr/local/bin");
+  paths.emplace_back("/usr/bsd");
+  paths.emplace_back("/usr/sbin");
+  paths.emplace_back("/usr/bin");
+  paths.emplace_back("/bin");
+  paths.emplace_back("/sbin");
+  paths.emplace_back("/usr/local/bin");
 
   const char* cacheValue = this->Makefile->GetDefinition(args[0]);
   if (cacheValue) {
diff --git a/Source/cmSourceGroupCommand.cxx b/Source/cmSourceGroupCommand.cxx
index 08f4d1a..34ded38 100644
--- a/Source/cmSourceGroupCommand.cxx
+++ b/Source/cmSourceGroupCommand.cxx
@@ -105,7 +105,7 @@ bool addFilesToItsSourceGroups(const std::string& root,
       tokenizedPath.pop_back();
 
       if (tokenizedPath.empty()) {
-        tokenizedPath.push_back("");
+        tokenizedPath.emplace_back();
       }
 
       sg = makefile.GetOrCreateSourceGroup(tokenizedPath);
diff --git a/Source/cmStringReplaceHelper.cxx b/Source/cmStringReplaceHelper.cxx
index 69b7ced..f50cf58 100644
--- a/Source/cmStringReplaceHelper.cxx
+++ b/Source/cmStringReplaceHelper.cxx
@@ -85,10 +85,12 @@ void cmStringReplaceHelper::ParseReplaceExpression()
     auto r = this->ReplaceExpression.find('\\', l);
     if (r == std::string::npos) {
       r = this->ReplaceExpression.length();
-      this->Replacements.push_back(this->ReplaceExpression.substr(l, r - l));
+      this->Replacements.emplace_back(
+        this->ReplaceExpression.substr(l, r - l));
     } else {
       if (r - l > 0) {
-        this->Replacements.push_back(this->ReplaceExpression.substr(l, r - l));
+        this->Replacements.emplace_back(
+          this->ReplaceExpression.substr(l, r - l));
       }
       if (r == (this->ReplaceExpression.length() - 1)) {
         this->ValidReplaceExpression = false;
@@ -97,11 +99,11 @@ void cmStringReplaceHelper::ParseReplaceExpression()
       }
       if ((this->ReplaceExpression[r + 1] >= '0') &&
           (this->ReplaceExpression[r + 1] <= '9')) {
-        this->Replacements.push_back(this->ReplaceExpression[r + 1] - '0');
+        this->Replacements.emplace_back(this->ReplaceExpression[r + 1] - '0');
       } else if (this->ReplaceExpression[r + 1] == 'n') {
-        this->Replacements.push_back("\n");
+        this->Replacements.emplace_back("\n");
       } else if (this->ReplaceExpression[r + 1] == '\\') {
-        this->Replacements.push_back("\\");
+        this->Replacements.emplace_back("\\");
       } else {
         this->ValidReplaceExpression = false;
         std::ostringstream error;
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index be65853..aa85c4a 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -534,7 +534,7 @@ public:
   void Store(std::vector<std::string>& args) const
   {
     for (char** arg = this->ArgV; arg && *arg; ++arg) {
-      args.push_back(*arg);
+      args.emplace_back(*arg);
     }
   }
 };
@@ -1586,7 +1586,7 @@ std::vector<std::string> cmSystemTools::GetEnvironmentVariables()
   std::vector<std::string> env;
   int cc;
   for (cc = 0; environ[cc]; ++cc) {
-    env.push_back(environ[cc]);
+    env.emplace_back(environ[cc]);
   }
   return env;
 }
@@ -3063,7 +3063,7 @@ std::vector<std::string> cmSystemTools::tokenize(const std::string& str,
   } while (tokend != std::string::npos);
 
   if (tokens.empty()) {
-    tokens.push_back("");
+    tokens.emplace_back();
   }
   return tokens;
 }
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index a94cf6a..7c3827c 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -731,7 +731,7 @@ bool cmTarget::PushTLLCommandTrace(TLLSignature signature,
     }
   }
   if (this->TLLCommands.empty() || this->TLLCommands.back().second != lfc) {
-    this->TLLCommands.push_back(std::make_pair(signature, lfc));
+    this->TLLCommands.emplace_back(signature, lfc);
   }
   return ret;
 }
@@ -975,7 +975,7 @@ void cmTarget::SetProperty(const std::string& prop, const char* value)
     this->Internal->IncludeDirectoriesEntries.clear();
     this->Internal->IncludeDirectoriesBacktraces.clear();
     if (value) {
-      this->Internal->IncludeDirectoriesEntries.push_back(value);
+      this->Internal->IncludeDirectoriesEntries.emplace_back(value);
       cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
       this->Internal->IncludeDirectoriesBacktraces.push_back(lfbt);
     }
@@ -983,7 +983,7 @@ void cmTarget::SetProperty(const std::string& prop, const char* value)
     this->Internal->CompileOptionsEntries.clear();
     this->Internal->CompileOptionsBacktraces.clear();
     if (value) {
-      this->Internal->CompileOptionsEntries.push_back(value);
+      this->Internal->CompileOptionsEntries.emplace_back(value);
       cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
       this->Internal->CompileOptionsBacktraces.push_back(lfbt);
     }
@@ -991,7 +991,7 @@ void cmTarget::SetProperty(const std::string& prop, const char* value)
     this->Internal->CompileFeaturesEntries.clear();
     this->Internal->CompileFeaturesBacktraces.clear();
     if (value) {
-      this->Internal->CompileFeaturesEntries.push_back(value);
+      this->Internal->CompileFeaturesEntries.emplace_back(value);
       cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
       this->Internal->CompileFeaturesBacktraces.push_back(lfbt);
     }
@@ -999,7 +999,7 @@ void cmTarget::SetProperty(const std::string& prop, const char* value)
     this->Internal->CompileDefinitionsEntries.clear();
     this->Internal->CompileDefinitionsBacktraces.clear();
     if (value) {
-      this->Internal->CompileDefinitionsEntries.push_back(value);
+      this->Internal->CompileDefinitionsEntries.emplace_back(value);
       cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
       this->Internal->CompileDefinitionsBacktraces.push_back(lfbt);
     }
@@ -1007,7 +1007,7 @@ void cmTarget::SetProperty(const std::string& prop, const char* value)
     this->Internal->LinkOptionsEntries.clear();
     this->Internal->LinkOptionsBacktraces.clear();
     if (value) {
-      this->Internal->LinkOptionsEntries.push_back(value);
+      this->Internal->LinkOptionsEntries.emplace_back(value);
       cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
       this->Internal->LinkOptionsBacktraces.push_back(lfbt);
     }
@@ -1015,7 +1015,7 @@ void cmTarget::SetProperty(const std::string& prop, const char* value)
     this->Internal->LinkDirectoriesEntries.clear();
     this->Internal->LinkDirectoriesBacktraces.clear();
     if (value) {
-      this->Internal->LinkDirectoriesEntries.push_back(value);
+      this->Internal->LinkDirectoriesEntries.emplace_back(value);
       cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
       this->Internal->LinkDirectoriesBacktraces.push_back(lfbt);
     }
@@ -1024,7 +1024,7 @@ void cmTarget::SetProperty(const std::string& prop, const char* value)
     this->Internal->LinkImplementationPropertyBacktraces.clear();
     if (value) {
       cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
-      this->Internal->LinkImplementationPropertyEntries.push_back(value);
+      this->Internal->LinkImplementationPropertyEntries.emplace_back(value);
       this->Internal->LinkImplementationPropertyBacktraces.push_back(lfbt);
     }
   } else if (prop == propSOURCES) {
@@ -1032,7 +1032,7 @@ void cmTarget::SetProperty(const std::string& prop, const char* value)
     this->Internal->SourceBacktraces.clear();
     if (value) {
       cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
-      this->Internal->SourceEntries.push_back(value);
+      this->Internal->SourceEntries.emplace_back(value);
       this->Internal->SourceBacktraces.push_back(lfbt);
     }
   } else if (prop == propIMPORTED_GLOBAL) {
@@ -1102,49 +1102,49 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value,
   }
   if (prop == "INCLUDE_DIRECTORIES") {
     if (value && *value) {
-      this->Internal->IncludeDirectoriesEntries.push_back(value);
+      this->Internal->IncludeDirectoriesEntries.emplace_back(value);
       cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
       this->Internal->IncludeDirectoriesBacktraces.push_back(lfbt);
     }
   } else if (prop == "COMPILE_OPTIONS") {
     if (value && *value) {
-      this->Internal->CompileOptionsEntries.push_back(value);
+      this->Internal->CompileOptionsEntries.emplace_back(value);
       cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
       this->Internal->CompileOptionsBacktraces.push_back(lfbt);
     }
   } else if (prop == "COMPILE_FEATURES") {
     if (value && *value) {
-      this->Internal->CompileFeaturesEntries.push_back(value);
+      this->Internal->CompileFeaturesEntries.emplace_back(value);
       cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
       this->Internal->CompileFeaturesBacktraces.push_back(lfbt);
     }
   } else if (prop == "COMPILE_DEFINITIONS") {
     if (value && *value) {
-      this->Internal->CompileDefinitionsEntries.push_back(value);
+      this->Internal->CompileDefinitionsEntries.emplace_back(value);
       cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
       this->Internal->CompileDefinitionsBacktraces.push_back(lfbt);
     }
   } else if (prop == "LINK_OPTIONS") {
     if (value && *value) {
-      this->Internal->LinkOptionsEntries.push_back(value);
+      this->Internal->LinkOptionsEntries.emplace_back(value);
       cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
       this->Internal->LinkOptionsBacktraces.push_back(lfbt);
     }
   } else if (prop == "LINK_DIRECTORIES") {
     if (value && *value) {
-      this->Internal->LinkDirectoriesEntries.push_back(value);
+      this->Internal->LinkDirectoriesEntries.emplace_back(value);
       cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
       this->Internal->LinkDirectoriesBacktraces.push_back(lfbt);
     }
   } else if (prop == "LINK_LIBRARIES") {
     if (value && *value) {
       cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
-      this->Internal->LinkImplementationPropertyEntries.push_back(value);
+      this->Internal->LinkImplementationPropertyEntries.emplace_back(value);
       this->Internal->LinkImplementationPropertyBacktraces.push_back(lfbt);
     }
   } else if (prop == "SOURCES") {
     cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
-    this->Internal->SourceEntries.push_back(value);
+    this->Internal->SourceEntries.emplace_back(value);
     this->Internal->SourceBacktraces.push_back(lfbt);
   } else if (cmHasLiteralPrefix(prop, "IMPORTED_LIBNAME")) {
     this->Makefile->IssueMessage(MessageType::FATAL_ERROR,
diff --git a/Source/cmTryRunCommand.cxx b/Source/cmTryRunCommand.cxx
index e224a27..10a6d9a 100644
--- a/Source/cmTryRunCommand.cxx
+++ b/Source/cmTryRunCommand.cxx
@@ -101,11 +101,11 @@ bool cmTryRunCommand::InitialPass(std::vector<std::string> const& argv,
   bool captureRunOutput = false;
   if (!this->OutputVariable.empty()) {
     captureRunOutput = true;
-    tryCompile.push_back("OUTPUT_VARIABLE");
+    tryCompile.emplace_back("OUTPUT_VARIABLE");
     tryCompile.push_back(this->OutputVariable);
   }
   if (!this->CompileOutputVariable.empty()) {
-    tryCompile.push_back("OUTPUT_VARIABLE");
+    tryCompile.emplace_back("OUTPUT_VARIABLE");
     tryCompile.push_back(this->CompileOutputVariable);
   }
   if (!this->RunOutputVariable.empty()) {
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 9fcfbde..06edeba 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -179,31 +179,31 @@ cmake::cmake(Role role, cmState::Mode mode)
   // these are used to find files when the extension
   // is not given
   // The "c" extension MUST precede the "C" extension.
-  this->SourceFileExtensions.push_back("c");
-  this->SourceFileExtensions.push_back("C");
-
-  this->SourceFileExtensions.push_back("c++");
-  this->SourceFileExtensions.push_back("cc");
-  this->SourceFileExtensions.push_back("cpp");
-  this->SourceFileExtensions.push_back("cxx");
-  this->SourceFileExtensions.push_back("cu");
-  this->SourceFileExtensions.push_back("m");
-  this->SourceFileExtensions.push_back("M");
-  this->SourceFileExtensions.push_back("mm");
+  this->SourceFileExtensions.emplace_back("c");
+  this->SourceFileExtensions.emplace_back("C");
+
+  this->SourceFileExtensions.emplace_back("c++");
+  this->SourceFileExtensions.emplace_back("cc");
+  this->SourceFileExtensions.emplace_back("cpp");
+  this->SourceFileExtensions.emplace_back("cxx");
+  this->SourceFileExtensions.emplace_back("cu");
+  this->SourceFileExtensions.emplace_back("m");
+  this->SourceFileExtensions.emplace_back("M");
+  this->SourceFileExtensions.emplace_back("mm");
 
   std::copy(this->SourceFileExtensions.begin(),
             this->SourceFileExtensions.end(),
             std::inserter(this->SourceFileExtensionsSet,
                           this->SourceFileExtensionsSet.end()));
 
-  this->HeaderFileExtensions.push_back("h");
-  this->HeaderFileExtensions.push_back("hh");
-  this->HeaderFileExtensions.push_back("h++");
-  this->HeaderFileExtensions.push_back("hm");
-  this->HeaderFileExtensions.push_back("hpp");
-  this->HeaderFileExtensions.push_back("hxx");
-  this->HeaderFileExtensions.push_back("in");
-  this->HeaderFileExtensions.push_back("txx");
+  this->HeaderFileExtensions.emplace_back("h");
+  this->HeaderFileExtensions.emplace_back("hh");
+  this->HeaderFileExtensions.emplace_back("h++");
+  this->HeaderFileExtensions.emplace_back("hm");
+  this->HeaderFileExtensions.emplace_back("hpp");
+  this->HeaderFileExtensions.emplace_back("hxx");
+  this->HeaderFileExtensions.emplace_back("in");
+  this->HeaderFileExtensions.emplace_back("txx");
 
   std::copy(this->HeaderFileExtensions.begin(),
             this->HeaderFileExtensions.end(),
@@ -2485,7 +2485,7 @@ std::vector<std::string> cmake::GetDebugConfigs()
   }
   // If no configurations were specified, use a default list.
   if (configs.empty()) {
-    configs.push_back("DEBUG");
+    configs.emplace_back("DEBUG");
   }
   return configs;
 }
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index 84d1414..5a04eab 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -106,7 +106,7 @@ static int do_command(int ac, char const* const* av)
 {
   std::vector<std::string> args;
   args.reserve(ac - 1);
-  args.push_back(av[0]);
+  args.emplace_back(av[0]);
   args.insert(args.end(), av + 2, av + ac);
   return cmcmd::ExecuteCMakeCommand(args);
 }
@@ -288,14 +288,14 @@ int do_cmake(int ac, char const* const* av)
         return 1;
       }
       workingMode = cmake::SCRIPT_MODE;
-      args.push_back(av[i]);
+      args.emplace_back(av[i]);
       i++;
-      args.push_back(av[i]);
+      args.emplace_back(av[i]);
     } else if (cmHasLiteralPrefix(av[i], "--find-package")) {
       workingMode = cmake::FIND_PACKAGE_MODE;
-      args.push_back(av[i]);
+      args.emplace_back(av[i]);
     } else {
-      args.push_back(av[i]);
+      args.emplace_back(av[i]);
     }
   }
   if (sysinfo) {
@@ -386,7 +386,7 @@ static int do_build(int ac, char const* const* av)
   Doing doing = DoingDir;
   for (int i = 2; i < ac; ++i) {
     if (doing == DoingNative) {
-      nativeOptions.push_back(av[i]);
+      nativeOptions.emplace_back(av[i]);
     } else if ((strcmp(av[i], "-j") == 0) ||
                (strcmp(av[i], "--parallel") == 0)) {
       jobs = cmake::DEFAULT_BUILD_PARALLEL_LEVEL;
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index ee8df35..26f7509 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -201,7 +201,7 @@ static int HandleTidy(const std::string& runCmd, const std::string& sourceFile,
   std::vector<std::string> tidy_cmd;
   cmSystemTools::ExpandListArgument(runCmd, tidy_cmd, true);
   tidy_cmd.push_back(sourceFile);
-  tidy_cmd.push_back("--");
+  tidy_cmd.emplace_back("--");
   tidy_cmd.insert(tidy_cmd.end(), orig_cmd.begin(), orig_cmd.end());
 
   // Run the tidy command line.  Capture its stdout and hide its stderr.
@@ -228,9 +228,9 @@ static int HandleLWYU(const std::string& runCmd,
   // Construct the ldd -r -u (link what you use lwyu) command line
   // ldd -u -r lwuy target
   std::vector<std::string> lwyu_cmd;
-  lwyu_cmd.push_back("ldd");
-  lwyu_cmd.push_back("-u");
-  lwyu_cmd.push_back("-r");
+  lwyu_cmd.emplace_back("ldd");
+  lwyu_cmd.emplace_back("-u");
+  lwyu_cmd.emplace_back("-r");
   lwyu_cmd.push_back(runCmd);
 
   // Run the ldd -u -r command line.
@@ -1733,7 +1733,7 @@ bool cmVSLink::Parse(std::vector<std::string>::const_iterator argBeg,
   }
 
   if (this->LinkGeneratesManifest) {
-    this->LinkCommand.push_back("/MANIFEST");
+    this->LinkCommand.emplace_back("/MANIFEST");
     this->LinkCommand.push_back("/MANIFESTFILE:" + this->LinkerManifestFile);
   }
 
@@ -1881,8 +1881,8 @@ int cmVSLink::RunMT(std::string const& out, bool notify)
 {
   std::vector<std::string> mtCommand;
   mtCommand.push_back(this->MtPath.empty() ? "mt" : this->MtPath);
-  mtCommand.push_back("/nologo");
-  mtCommand.push_back("/manifest");
+  mtCommand.emplace_back("/nologo");
+  mtCommand.emplace_back("/manifest");
   if (this->LinkGeneratesManifest) {
     mtCommand.push_back(this->LinkerManifestFile);
   }
@@ -1892,7 +1892,7 @@ int cmVSLink::RunMT(std::string const& out, bool notify)
   if (notify) {
     // Add an undocumented option that enables a special return
     // code to notify us when the manifest is modified.
-    mtCommand.push_back("/notify_update");
+    mtCommand.emplace_back("/notify_update");
   }
   int mtRet = 0;
   if (!RunCommand("MT", mtCommand, this->Verbose, FORMAT_HEX, &mtRet,
diff --git a/Source/ctest.cxx b/Source/ctest.cxx
index 8ba126f..4a2531a 100644
--- a/Source/ctest.cxx
+++ b/Source/ctest.cxx
@@ -208,7 +208,7 @@ int main(int argc, char const* const* argv)
   std::vector<std::string> args;
   args.reserve(argc);
   for (int i = 0; i < argc; ++i) {
-    args.push_back(argv[i]);
+    args.emplace_back(argv[i]);
   }
   // run ctest
   std::string output;

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cae9d2a61afea3948c8dfaf1f7dbc39ebaa71055
commit cae9d2a61afea3948c8dfaf1f7dbc39ebaa71055
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Jan 16 14:32:29 2019 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Jan 17 12:01:07 2019 -0500

    CTest: Teach --show-only= to reject unknown values

diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 65c0d91..ccd74c0 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -1944,6 +1944,9 @@ bool cmCTest::HandleCommandLineArguments(size_t& i,
       this->Quiet = true;
       this->OutputAsJson = true;
       this->OutputAsJsonVersion = 1;
+    } else if (format != "human") {
+      errormsg = "'--show-only=' given unknown value '" + format + "'";
+      return false;
     }
   }
 
diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
index 82bd963..d524f41 100644
--- a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
@@ -203,6 +203,8 @@ function(run_ShowOnly)
     set_tests_properties(ShowOnly PROPERTIES WILL_FAIL true _BACKTRACE_TRIPLES \"file1;1;add_test;file0;;\")
     add_test(ShowOnlyNotAvailable NOT_AVAILABLE)
 ")
+  run_cmake_command(show-only_human ${CMAKE_CTEST_COMMAND} --show-only=human)
+  run_cmake_command(show-only_bad ${CMAKE_CTEST_COMMAND} --show-only=bad)
   run_cmake_command(show-only_json-v1 ${CMAKE_CTEST_COMMAND} --show-only=json-v1)
 endfunction()
 run_ShowOnly()
diff --git a/Tests/RunCMake/CTestCommandLine/show-only_bad-result.txt b/Tests/RunCMake/CTestCommandLine/show-only_bad-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/show-only_bad-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CTestCommandLine/show-only_bad-stderr.txt b/Tests/RunCMake/CTestCommandLine/show-only_bad-stderr.txt
new file mode 100644
index 0000000..cc55ab3
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/show-only_bad-stderr.txt
@@ -0,0 +1 @@
+^CMake Error: '--show-only=' given unknown value 'bad'$
diff --git a/Tests/RunCMake/CTestCommandLine/show-only_human-stdout.txt b/Tests/RunCMake/CTestCommandLine/show-only_human-stdout.txt
new file mode 100644
index 0000000..1332149
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/show-only_human-stdout.txt
@@ -0,0 +1 @@
+Test #1: ShowOnly

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7370b02c36b45bcd92b6c5bb7cc65ecff75b9b2b
commit 7370b02c36b45bcd92b6c5bb7cc65ecff75b9b2b
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Jan 16 14:18:42 2019 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Jan 17 12:01:07 2019 -0500

    CTest: Teach --show-only=json-v1 to filter out not-available tests
    
    Avoid exposing the internal special value that we use to track tests not
    available in the tested configuration.  This also prevents clients from
    having to do the filtering themselves.

diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index 8867323..320647a 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -1039,6 +1039,11 @@ void cmCTestMultiProcessHandler::PrintOutputAsJson()
     testRun.SetTestProperties(&p);
     testRun.ComputeArguments();
 
+    // Skip tests not available in this configuration.
+    if (p.Args.size() >= 2 && p.Args[1] == "NOT_AVAILABLE") {
+      continue;
+    }
+
     Json::Value testInfo = DumpCTestInfo(testRun, p, backtraceGraph);
     tests.append(testInfo);
   }
diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
index 52002ce..82bd963 100644
--- a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
@@ -201,6 +201,7 @@ function(run_ShowOnly)
   file(WRITE "${RunCMake_TEST_BINARY_DIR}/CTestTestfile.cmake" "
     add_test(ShowOnly \"${CMAKE_COMMAND}\" -E echo)
     set_tests_properties(ShowOnly PROPERTIES WILL_FAIL true _BACKTRACE_TRIPLES \"file1;1;add_test;file0;;\")
+    add_test(ShowOnlyNotAvailable NOT_AVAILABLE)
 ")
   run_cmake_command(show-only_json-v1 ${CMAKE_CTEST_COMMAND} --show-only=json-v1)
 endfunction()

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=62fec84ad7b44b7c54130e9eb3686f4fbc22672e
commit 62fec84ad7b44b7c54130e9eb3686f4fbc22672e
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Jan 17 11:59:20 2019 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Jan 17 12:01:07 2019 -0500

    Tests: Fix RunCMake.CTestCommandLine case when no python is found
    
    Do not try to run the python checks if the python executable is
    not available.

diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
index c8ea3fc..52002ce 100644
--- a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
@@ -175,6 +175,9 @@ endfunction()
 run_TestStdin()
 
 function(show_only_json_check_python v)
+  if(RunCMake_TEST_FAILED OR NOT PYTHON_EXECUTABLE)
+    return()
+  endif()
   set(json_file "${RunCMake_TEST_BINARY_DIR}/ctest.json")
   file(WRITE "${json_file}" "${actual_stdout}")
   set(actual_stdout "" PARENT_SCOPE)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2e5307a2a45d456b7fb52e4d3fab1416dc9a1bd8
commit 2e5307a2a45d456b7fb52e4d3fab1416dc9a1bd8
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Jan 16 13:26:47 2019 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Jan 17 11:43:56 2019 -0500

    CTestSVN: Accept std::string in SVNInfo constructor

diff --git a/Source/CTest/cmCTestSVN.cxx b/Source/CTest/cmCTestSVN.cxx
index 6c439e9..21f5e1c 100644
--- a/Source/CTest/cmCTestSVN.cxx
+++ b/Source/CTest/cmCTestSVN.cxx
@@ -521,7 +521,7 @@ private:
     } else {
       local_path = path;
     }
-    this->SVN->Repositories.emplace_back(local_path.c_str());
+    this->SVN->Repositories.emplace_back(local_path);
   }
 };
 
diff --git a/Source/CTest/cmCTestSVN.h b/Source/CTest/cmCTestSVN.h
index a467ede..5c8505d 100644
--- a/Source/CTest/cmCTestSVN.h
+++ b/Source/CTest/cmCTestSVN.h
@@ -41,7 +41,7 @@ private:
   struct SVNInfo
   {
 
-    SVNInfo(const char* path)
+    SVNInfo(std::string const& path = std::string())
       : LocalPath(path)
     {
     }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=75a7a237465e37215525831f942a3904d20d1380
commit 75a7a237465e37215525831f942a3904d20d1380
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Jan 17 10:57:15 2019 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Jan 17 10:57:51 2019 -0500

    Tests: Rename RunCMake.CTestCommandLine show-only test cases
    
    The current name was chosen from an earlier design iteration of the
    command-line option name.  Rename the case to match the final name.

diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
index cae14b1..c8ea3fc 100644
--- a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
@@ -174,12 +174,12 @@ function(run_TestStdin)
 endfunction()
 run_TestStdin()
 
-function(ShowAsJson_check_python v)
+function(show_only_json_check_python v)
   set(json_file "${RunCMake_TEST_BINARY_DIR}/ctest.json")
   file(WRITE "${json_file}" "${actual_stdout}")
   set(actual_stdout "" PARENT_SCOPE)
   execute_process(
-    COMMAND ${PYTHON_EXECUTABLE} "${RunCMake_SOURCE_DIR}/ShowAsJson${v}-check.py" "${json_file}"
+    COMMAND ${PYTHON_EXECUTABLE} "${RunCMake_SOURCE_DIR}/show-only_json-v${v}_check.py" "${json_file}"
     RESULT_VARIABLE result
     OUTPUT_VARIABLE output
     ERROR_VARIABLE output
@@ -190,15 +190,15 @@ function(ShowAsJson_check_python v)
   endif()
 endfunction()
 
-function(run_ShowAsJson)
-  set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/ShowAsJson)
+function(run_ShowOnly)
+  set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/ShowOnly)
   set(RunCMake_TEST_NO_CLEAN 1)
   file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
   file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
   file(WRITE "${RunCMake_TEST_BINARY_DIR}/CTestTestfile.cmake" "
-    add_test(ShowAsJson \"${CMAKE_COMMAND}\" -E echo)
-    set_tests_properties(ShowAsJson PROPERTIES WILL_FAIL true _BACKTRACE_TRIPLES \"file1;1;add_test;file0;;\")
+    add_test(ShowOnly \"${CMAKE_COMMAND}\" -E echo)
+    set_tests_properties(ShowOnly PROPERTIES WILL_FAIL true _BACKTRACE_TRIPLES \"file1;1;add_test;file0;;\")
 ")
-  run_cmake_command(ShowAsJsonVersionOne ${CMAKE_CTEST_COMMAND} --show-only=json-v1)
+  run_cmake_command(show-only_json-v1 ${CMAKE_CTEST_COMMAND} --show-only=json-v1)
 endfunction()
-run_ShowAsJson()
+run_ShowOnly()
diff --git a/Tests/RunCMake/CTestCommandLine/ShowAsJsonVersionOne-check.cmake b/Tests/RunCMake/CTestCommandLine/ShowAsJsonVersionOne-check.cmake
deleted file mode 100644
index f8bcd2c..0000000
--- a/Tests/RunCMake/CTestCommandLine/ShowAsJsonVersionOne-check.cmake
+++ /dev/null
@@ -1 +0,0 @@
-ShowAsJson_check_python(1)
diff --git a/Tests/RunCMake/CTestCommandLine/show-only_json-v1-check.cmake b/Tests/RunCMake/CTestCommandLine/show-only_json-v1-check.cmake
new file mode 100644
index 0000000..f9234f8
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/show-only_json-v1-check.cmake
@@ -0,0 +1 @@
+show_only_json_check_python(1)
diff --git a/Tests/RunCMake/CTestCommandLine/ShowAsJson1-check.py b/Tests/RunCMake/CTestCommandLine/show-only_json-v1_check.py
similarity index 97%
rename from Tests/RunCMake/CTestCommandLine/ShowAsJson1-check.py
rename to Tests/RunCMake/CTestCommandLine/show-only_json-v1_check.py
index d794e7d..4dff90c 100644
--- a/Tests/RunCMake/CTestCommandLine/ShowAsJson1-check.py
+++ b/Tests/RunCMake/CTestCommandLine/show-only_json-v1_check.py
@@ -1,4 +1,4 @@
-from ShowAsJson_check import *
+from show_only_json_check import *
 
 def check_kind(k):
     assert is_string(k)
@@ -77,7 +77,7 @@ def check_workingdir_property(p):
     assert is_string(p["name"])
     assert is_string(p["value"])
     assert p["name"] == "WORKING_DIRECTORY"
-    assert p["value"].endswith("Tests/RunCMake/CTestCommandLine/ShowAsJson")
+    assert p["value"].endswith("Tests/RunCMake/CTestCommandLine/ShowOnly")
 
 def check_properties(p):
     assert is_list(p)
@@ -95,7 +95,7 @@ def check_tests(t):
     assert test["backtrace"] == 1
     check_command(test["command"])
     assert is_string(test["name"])
-    assert test["name"] == "ShowAsJson"
+    assert test["name"] == "ShowOnly"
     check_properties(test["properties"])
 
 assert is_dict(ctest_json)
diff --git a/Tests/RunCMake/CTestCommandLine/ShowAsJson_check.py b/Tests/RunCMake/CTestCommandLine/show_only_json_check.py
similarity index 100%
rename from Tests/RunCMake/CTestCommandLine/ShowAsJson_check.py
rename to Tests/RunCMake/CTestCommandLine/show_only_json_check.py

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fecbc87608f4b1429721292d3414bde9eb9f073f
commit fecbc87608f4b1429721292d3414bde9eb9f073f
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Jan 16 14:08:50 2019 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jan 16 14:10:15 2019 -0500

    Tests: Fix RunCMake.CTestCommandLine to actually check json-v1
    
    Add a file missing from commit 67209a9291 (Tests: Add cases for ctest
    --show-only=json-v1, 2018-11-01) to actually hook up the content check.

diff --git a/Tests/RunCMake/CTestCommandLine/ShowAsJsonVersionOne-check.cmake b/Tests/RunCMake/CTestCommandLine/ShowAsJsonVersionOne-check.cmake
new file mode 100644
index 0000000..f8bcd2c
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/ShowAsJsonVersionOne-check.cmake
@@ -0,0 +1 @@
+ShowAsJson_check_python(1)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2915a75615bab216753c902fa716b11f9fc5de83
commit 2915a75615bab216753c902fa716b11f9fc5de83
Author:     Regina Pfeifer <regina at mailbox.org>
AuthorDate: Fri Jan 11 14:18:12 2019 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jan 16 10:34:08 2019 -0500

    CTest: Add documentation and release notes for SubmitURL

diff --git a/Help/command/ctest_submit.rst b/Help/command/ctest_submit.rst
index 426475c..fba03fd 100644
--- a/Help/command/ctest_submit.rst
+++ b/Help/command/ctest_submit.rst
@@ -6,6 +6,7 @@ Perform the :ref:`CTest Submit Step` as a :ref:`Dashboard Client`.
 ::
 
   ctest_submit([PARTS <part>...] [FILES <file>...]
+               [SUBMIT_URL <url>]
                [HTTPHEADER <header>]
                [RETRY_COUNT <count>]
                [RETRY_DELAY <delay>]
@@ -39,6 +40,10 @@ The options are:
   Specify an explicit list of specific files to be submitted.
   Each individual file must exist at the time of the call.
 
+``SUBMIT_URL <url>``
+  The ``http`` or ``https`` URL of the dashboard server to send the submission
+  to.  If not given, the :variable:`CTEST_SUBMIT_URL` variable is used.
+
 ``HTTPHEADER <HTTP-header>``
   Specify HTTP header to be included in the request to CDash during submission.
   This suboption can be repeated several times.
@@ -68,6 +73,7 @@ Submit to CDash Upload API
 ::
 
   ctest_submit(CDASH_UPLOAD <file> [CDASH_UPLOAD_TYPE <type>]
+               [SUBMIT_URL <url>]
                [HTTPHEADER <header>]
                [RETRY_COUNT <count>]
                [RETRY_DELAY <delay>]
@@ -80,5 +86,5 @@ with a content hash of the file. If CDash does not already have the file,
 then it is uploaded. Along with the file, a CDash type string is specified
 to tell CDash which handler to use to process the data.
 
-This signature accepts the ``HTTPHEADER``, ``RETRY_COUNT``, ``RETRY_DELAY``,
-``RETURN_VALUE`` and ``QUIET`` options as described above.
+This signature accepts the ``SUBMIT_URL``, ``HTTPHEADER``, ``RETRY_COUNT``,
+``RETRY_DELAY``, ``RETURN_VALUE`` and ``QUIET`` options as described above.
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index e464b0c..e09ace5 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -574,6 +574,7 @@ Variables for CTest
    /variable/CTEST_RUN_CURRENT_SCRIPT
    /variable/CTEST_SCP_COMMAND
    /variable/CTEST_SITE
+   /variable/CTEST_SUBMIT_URL
    /variable/CTEST_SOURCE_DIRECTORY
    /variable/CTEST_SVN_COMMAND
    /variable/CTEST_SVN_OPTIONS
diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst
index 8490e3d..bcf75ac 100644
--- a/Help/manual/ctest.1.rst
+++ b/Help/manual/ctest.1.rst
@@ -1109,38 +1109,45 @@ Configuration settings include:
   * :module:`CTest` module variable: ``CTEST_CURL_OPTIONS``
 
 ``DropLocation``
-  The path on the dashboard server to send the submission.
+  Legacy option.  When ``SubmitURL`` is not set, it is constructed from
+  ``DropMethod``, ``DropSiteUser``, ``DropSitePassword``, ``DropSite``, and
+  ``DropLocation``.
 
   * `CTest Script`_ variable: :variable:`CTEST_DROP_LOCATION`
   * :module:`CTest` module variable: ``DROP_LOCATION`` if set,
     else ``CTEST_DROP_LOCATION``
 
 ``DropMethod``
-  Specify the method by which results should be submitted to the
-  dashboard server.  The value may be ``http`` or ``https``.
+  Legacy option.  When ``SubmitURL`` is not set, it is constructed from
+  ``DropMethod``, ``DropSiteUser``, ``DropSitePassword``, ``DropSite``, and
+  ``DropLocation``.
 
   * `CTest Script`_ variable: :variable:`CTEST_DROP_METHOD`
   * :module:`CTest` module variable: ``DROP_METHOD`` if set,
     else ``CTEST_DROP_METHOD``
 
 ``DropSite``
-  The dashboard server name.
+  Legacy option.  When ``SubmitURL`` is not set, it is constructed from
+  ``DropMethod``, ``DropSiteUser``, ``DropSitePassword``, ``DropSite``, and
+  ``DropLocation``.
 
   * `CTest Script`_ variable: :variable:`CTEST_DROP_SITE`
   * :module:`CTest` module variable: ``DROP_SITE`` if set,
     else ``CTEST_DROP_SITE``
 
 ``DropSitePassword``
-  The dashboard server login password, if any
-  (for ``ftp``, ``http``, and ``https``).
+  Legacy option.  When ``SubmitURL`` is not set, it is constructed from
+  ``DropMethod``, ``DropSiteUser``, ``DropSitePassword``, ``DropSite``, and
+  ``DropLocation``.
 
   * `CTest Script`_ variable: :variable:`CTEST_DROP_SITE_PASSWORD`
   * :module:`CTest` module variable: ``DROP_SITE_PASSWORD`` if set,
     else ``CTEST_DROP_SITE_PASWORD``
 
 ``DropSiteUser``
-  The dashboard server login user name, if any
-  (for ``ftp``, ``http``, and ``https``).
+  Legacy option.  When ``SubmitURL`` is not set, it is constructed from
+  ``DropMethod``, ``DropSiteUser``, ``DropSitePassword``, ``DropSite``, and
+  ``DropLocation``.
 
   * `CTest Script`_ variable: :variable:`CTEST_DROP_SITE_USER`
   * :module:`CTest` module variable: ``DROP_SITE_USER`` if set,
@@ -1166,6 +1173,14 @@ Configuration settings include:
   * :module:`CTest` module variable: ``SITE``,
     initialized by the :command:`site_name` command
 
+``SubmitURL``
+  The ``http`` or ``https`` URL of the dashboard server to send the submission
+  to.
+
+  * `CTest Script`_ variable: :variable:`CTEST_SUBMIT_URL`
+  * :module:`CTest` module variable: ``SUBMIT_URL`` if set,
+    else ``CTEST_SUBMIT_URL``
+
 ``TriggerSite``
   Legacy option.  Not used.
 
diff --git a/Help/release/dev/ctest-submit-url.rst b/Help/release/dev/ctest-submit-url.rst
new file mode 100644
index 0000000..f848877
--- /dev/null
+++ b/Help/release/dev/ctest-submit-url.rst
@@ -0,0 +1,7 @@
+ctest-submit-url
+----------------
+
+* CTest learned to accept the dashboard server submission URL from a single
+  variable.  See the ``SubmitURL`` setting in :manual:`ctest(1)`,
+  the :variable:`CTEST_SUBMIT_URL` variable, and the ``SUBMIT_URL``
+  argument of the :command:`ctest_submit` command.
diff --git a/Help/variable/CTEST_SUBMIT_URL.rst b/Help/variable/CTEST_SUBMIT_URL.rst
new file mode 100644
index 0000000..7d84da4
--- /dev/null
+++ b/Help/variable/CTEST_SUBMIT_URL.rst
@@ -0,0 +1,5 @@
+CTEST_SUBMIT_URL
+----------------
+
+Specify the CTest ``SubmitURL`` setting
+in a :manual:`ctest(1)` dashboard client script.
diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake
index 648e473..d100704 100644
--- a/Modules/CTest.cmake
+++ b/Modules/CTest.cmake
@@ -28,10 +28,7 @@ To enable submissions to a CDash server, create a ``CTestConfig.cmake``
 file at the top of the project with content such as::
 
   set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")
-  set(CTEST_DROP_METHOD "http")
-  set(CTEST_DROP_SITE "my.cdash.org")
-  set(CTEST_DROP_LOCATION "/submit.php?project=MyProject")
-  set(CTEST_DROP_SITE_CDASH TRUE)
+  set(CTEST_SUBMIT_URL "http://my.cdash.org/submit.php?project=MyProject")
 
 (the CDash server can provide the file to a project administrator who
 configures ``MyProject``).  Settings in the config file are shared by

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d6475daa79810e332c3d2d1659e3d73250717219
commit d6475daa79810e332c3d2d1659e3d73250717219
Author:     Regina Pfeifer <regina at mailbox.org>
AuthorDate: Sat Dec 8 00:01:20 2018 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jan 16 10:34:08 2019 -0500

    Modules/CTest: Set SubmitURL

diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake
index 8848bdd..648e473 100644
--- a/Modules/CTest.cmake
+++ b/Modules/CTest.cmake
@@ -89,6 +89,7 @@ if(BUILD_TESTING)
   if(EXISTS "${PROJECT_SOURCE_DIR}/CTestConfig.cmake")
     include("${PROJECT_SOURCE_DIR}/CTestConfig.cmake")
     SET_IF_SET_AND_NOT_SET(NIGHTLY_START_TIME "${CTEST_NIGHTLY_START_TIME}")
+    SET_IF_SET_AND_NOT_SET(SUBMIT_URL "${CTEST_SUBMIT_URL}")
     SET_IF_SET_AND_NOT_SET(DROP_METHOD "${CTEST_DROP_METHOD}")
     SET_IF_SET_AND_NOT_SET(DROP_SITE "${CTEST_DROP_SITE}")
     SET_IF_SET_AND_NOT_SET(DROP_SITE_USER "${CTEST_DROP_SITE_USER}")
@@ -111,6 +112,18 @@ if(BUILD_TESTING)
   endif()
   SET_IF_NOT_SET (NIGHTLY_START_TIME "00:00:00 EDT")
 
+  if(NOT SUBMIT_URL)
+    set(SUBMIT_URL "${DROP_METHOD}://")
+    if(DROP_SITE_USER)
+      string(APPEND SUBMIT_URL "${DROP_SITE_USER}")
+      if(DROP_SITE_PASSWORD)
+        string(APPEND SUBMIT_URL ":${DROP_SITE_PASSWORD}")
+      endif()
+      string(APPEND SUBMIT_URL "@")
+    endif()
+    string(APPEND SUBMIT_URL "${DROP_SITE}${DROP_SITE_LOCATION}")
+  endif()
+
   find_program(CVSCOMMAND cvs )
   set(CVS_UPDATE_OPTIONS "-d -A -P" CACHE STRING
     "Options passed to the cvs update command.")
diff --git a/Modules/DartConfiguration.tcl.in b/Modules/DartConfiguration.tcl.in
index 24e7b55..e4513b3 100644
--- a/Modules/DartConfiguration.tcl.in
+++ b/Modules/DartConfiguration.tcl.in
@@ -20,12 +20,7 @@ BuildName: @BUILDNAME@
 LabelsForSubprojects: @CTEST_LABELS_FOR_SUBPROJECTS@
 
 # Submission information
-DropSite: @DROP_SITE@
-DropLocation: @DROP_LOCATION@
-DropSiteUser: @DROP_SITE_USER@
-DropSitePassword: @DROP_SITE_PASSWORD@
-DropSiteMode: @DROP_SITE_MODE@
-DropMethod: @DROP_METHOD@
+SubmitURL: @SUBMIT_URL@
 
 # Dashboard start time
 NightlyStartTime: @NIGHTLY_START_TIME@

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=938f06fda69a0f4ef04b2ed43a945a3c901b9750
commit 938f06fda69a0f4ef04b2ed43a945a3c901b9750
Author:     Regina Pfeifer <regina at mailbox.org>
AuthorDate: Wed Nov 28 22:31:25 2018 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jan 16 10:34:08 2019 -0500

    ctest_submit: Add parameter SUBMIT_URL

diff --git a/Source/CTest/cmCTestSubmitCommand.cxx b/Source/CTest/cmCTestSubmitCommand.cxx
index e1fe765..00c0610 100644
--- a/Source/CTest/cmCTestSubmitCommand.cxx
+++ b/Source/CTest/cmCTestSubmitCommand.cxx
@@ -15,7 +15,9 @@ class cmExecutionStatus;
 
 cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler()
 {
-  const char* submitURL = this->Makefile->GetDefinition("CTEST_SUBMIT_URL");
+  const char* submitURL = !this->SubmitURL.empty()
+    ? this->SubmitURL.c_str()
+    : this->Makefile->GetDefinition("CTEST_SUBMIT_URL");
 
   if (submitURL) {
     this->CTest->SetCTestConfiguration("SubmitURL", submitURL, this->Quiet);
@@ -174,6 +176,11 @@ bool cmCTestSubmitCommand::CheckArgumentKeyword(std::string const& arg)
     return true;
   }
 
+  if (arg == "SUBMIT_URL") {
+    this->ArgumentDoing = ArgumentDoingSubmitURL;
+    return true;
+  }
+
   if (arg == "INTERNAL_TEST_CHECKSUM") {
     this->InternalTest = true;
     return true;
@@ -239,6 +246,12 @@ bool cmCTestSubmitCommand::CheckArgumentValue(std::string const& arg)
     return true;
   }
 
+  if (this->ArgumentDoing == ArgumentDoingSubmitURL) {
+    this->ArgumentDoing = ArgumentDoingNone;
+    this->SubmitURL = arg;
+    return true;
+  }
+
   // Look for other arguments.
   return this->Superclass::CheckArgumentValue(arg);
 }
diff --git a/Source/CTest/cmCTestSubmitCommand.h b/Source/CTest/cmCTestSubmitCommand.h
index c4b84ce..0caccd6 100644
--- a/Source/CTest/cmCTestSubmitCommand.h
+++ b/Source/CTest/cmCTestSubmitCommand.h
@@ -71,6 +71,7 @@ protected:
     ArgumentDoingCDashUpload,
     ArgumentDoingCDashUploadType,
     ArgumentDoingHttpHeader,
+    ArgumentDoingSubmitURL,
     ArgumentDoingLast2
   };
 
@@ -85,6 +86,7 @@ protected:
   std::string CDashUploadFile;
   std::string CDashUploadType;
   std::vector<std::string> HttpHeaders;
+  std::string SubmitURL;
 };
 
 #endif

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=65e725c95756a4e2348e9fb52b3d5aca7ee21115
commit 65e725c95756a4e2348e9fb52b3d5aca7ee21115
Author:     Regina Pfeifer <regina at mailbox.org>
AuthorDate: Wed Nov 28 22:29:02 2018 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jan 16 10:34:08 2019 -0500

    CTest: Add option SubmitURL
    
    Fixes: #18610

diff --git a/Source/CTest/cmCTestSubmitCommand.cxx b/Source/CTest/cmCTestSubmitCommand.cxx
index 76a1830..e1fe765 100644
--- a/Source/CTest/cmCTestSubmitCommand.cxx
+++ b/Source/CTest/cmCTestSubmitCommand.cxx
@@ -15,36 +15,26 @@ class cmExecutionStatus;
 
 cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler()
 {
-  const char* ctestDropMethod =
-    this->Makefile->GetDefinition("CTEST_DROP_METHOD");
-  const char* ctestDropSite = this->Makefile->GetDefinition("CTEST_DROP_SITE");
-  const char* ctestDropLocation =
-    this->Makefile->GetDefinition("CTEST_DROP_LOCATION");
-  if (!ctestDropMethod) {
-    ctestDropMethod = "http";
-  }
+  const char* submitURL = this->Makefile->GetDefinition("CTEST_SUBMIT_URL");
 
-  if (!ctestDropSite) {
-    // error: CDash requires CTEST_DROP_SITE definition
-    // in CTestConfig.cmake
-  }
-  if (!ctestDropLocation) {
-    // error: CDash requires CTEST_DROP_LOCATION definition
-    // in CTestConfig.cmake
+  if (submitURL) {
+    this->CTest->SetCTestConfiguration("SubmitURL", submitURL, this->Quiet);
+  } else {
+    this->CTest->SetCTestConfigurationFromCMakeVariable(
+      this->Makefile, "DropMethod", "CTEST_DROP_METHOD", this->Quiet);
+    this->CTest->SetCTestConfigurationFromCMakeVariable(
+      this->Makefile, "DropSiteUser", "CTEST_DROP_SITE_USER", this->Quiet);
+    this->CTest->SetCTestConfigurationFromCMakeVariable(
+      this->Makefile, "DropSitePassword", "CTEST_DROP_SITE_PASSWORD",
+      this->Quiet);
+    this->CTest->SetCTestConfigurationFromCMakeVariable(
+      this->Makefile, "DropSite", "CTEST_DROP_SITE", this->Quiet);
+    this->CTest->SetCTestConfigurationFromCMakeVariable(
+      this->Makefile, "DropLocation", "CTEST_DROP_LOCATION", this->Quiet);
   }
-  this->CTest->SetCTestConfiguration("DropMethod", ctestDropMethod,
-                                     this->Quiet);
-  this->CTest->SetCTestConfiguration("DropSite", ctestDropSite, this->Quiet);
-  this->CTest->SetCTestConfiguration("DropLocation", ctestDropLocation,
-                                     this->Quiet);
 
   this->CTest->SetCTestConfigurationFromCMakeVariable(
     this->Makefile, "CurlOptions", "CTEST_CURL_OPTIONS", this->Quiet);
-  this->CTest->SetCTestConfigurationFromCMakeVariable(
-    this->Makefile, "DropSiteUser", "CTEST_DROP_SITE_USER", this->Quiet);
-  this->CTest->SetCTestConfigurationFromCMakeVariable(
-    this->Makefile, "DropSitePassword", "CTEST_DROP_SITE_PASSWORD",
-    this->Quiet);
 
   const char* notesFilesVariable =
     this->Makefile->GetDefinition("CTEST_NOTES_FILES");
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 881da48..219ad14 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -2628,8 +2628,8 @@ void cmCTest::SetCTestConfiguration(const char* name, const char* value,
 
 std::string cmCTest::GetSubmitURL()
 {
-  std::string url;
-  {
+  std::string url = this->GetCTestConfiguration("SubmitURL");
+  if (url.empty()) {
     std::string method = this->GetCTestConfiguration("DropMethod");
     std::string user = this->GetCTestConfiguration("DropSiteUser");
     std::string password = this->GetCTestConfiguration("DropSitePassword");

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=65f1fc9d6329feb2d48ee986d4243166a66049af
commit 65f1fc9d6329feb2d48ee986d4243166a66049af
Author:     Regina Pfeifer <regina at mailbox.org>
AuthorDate: Wed Nov 28 22:11:14 2018 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jan 16 10:34:08 2019 -0500

    CTest: Add function GetSubmitURL

diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index 7b51059..600194a 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -494,23 +494,6 @@ void cmCTestSubmitHandler::ParseResponse(
   }
 }
 
-void cmCTestSubmitHandler::ConstructCDashURL(std::string& dropMethod,
-                                             std::string& url)
-{
-  dropMethod = this->CTest->GetCTestConfiguration("DropMethod");
-  url = dropMethod;
-  url += "://";
-  if (!this->CTest->GetCTestConfiguration("DropSiteUser").empty()) {
-    url += this->CTest->GetCTestConfiguration("DropSiteUser");
-    if (!this->CTest->GetCTestConfiguration("DropSitePassword").empty()) {
-      url += ":" + this->CTest->GetCTestConfiguration("DropSitePassword");
-    }
-    url += "@";
-  }
-  url += this->CTest->GetCTestConfiguration("DropSite") +
-    this->CTest->GetCTestConfiguration("DropLocation");
-}
-
 int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
                                                 std::string const& typeString)
 {
@@ -531,9 +514,7 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
   curl.SetCurlOptions(args);
   curl.SetTimeOutSeconds(SUBMIT_TIMEOUT_IN_SECONDS_DEFAULT);
   curl.SetHttpHeaders(this->HttpHeaders);
-  std::string dropMethod;
-  std::string url;
-  this->ConstructCDashURL(dropMethod, url);
+  std::string url = this->CTest->GetSubmitURL();
   std::string fields;
   std::string::size_type pos = url.find('?');
   if (pos != std::string::npos) {
@@ -878,23 +859,7 @@ int cmCTestSubmitHandler::ProcessHandler()
   }
   this->SetLogFile(&ofs);
 
-  std::string dropMethod(this->CTest->GetCTestConfiguration("DropMethod"));
-
-  if (dropMethod.empty()) {
-    dropMethod = "http";
-  }
-
-  std::string url = dropMethod;
-  url += "://";
-  if (!this->CTest->GetCTestConfiguration("DropSiteUser").empty()) {
-    url += this->CTest->GetCTestConfiguration("DropSiteUser");
-    if (!this->CTest->GetCTestConfiguration("DropSitePassword").empty()) {
-      url += ":" + this->CTest->GetCTestConfiguration("DropSitePassword");
-    }
-    url += "@";
-  }
-  url += this->CTest->GetCTestConfiguration("DropSite") +
-    this->CTest->GetCTestConfiguration("DropLocation");
+  std::string url = this->CTest->GetSubmitURL();
   cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
                      "   SubmitURL: " << url << '\n', this->Quiet);
   if (!this->SubmitUsingHTTP(buildDirectory + "/Testing/" +
diff --git a/Source/CTest/cmCTestSubmitHandler.h b/Source/CTest/cmCTestSubmitHandler.h
index 393e826..58f4f97 100644
--- a/Source/CTest/cmCTestSubmitHandler.h
+++ b/Source/CTest/cmCTestSubmitHandler.h
@@ -48,8 +48,6 @@ public:
     this->HttpHeaders = v;
   }
 
-  void ConstructCDashURL(std::string& dropMethod, std::string& url);
-
 private:
   void SetLogFile(std::ostream* ost) { this->LogFile = ost; }
 
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 65c0d91..881da48 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -2626,6 +2626,32 @@ void cmCTest::SetCTestConfiguration(const char* name, const char* value,
   this->CTestConfiguration[name] = value;
 }
 
+std::string cmCTest::GetSubmitURL()
+{
+  std::string url;
+  {
+    std::string method = this->GetCTestConfiguration("DropMethod");
+    std::string user = this->GetCTestConfiguration("DropSiteUser");
+    std::string password = this->GetCTestConfiguration("DropSitePassword");
+    std::string site = this->GetCTestConfiguration("DropSite");
+    std::string location = this->GetCTestConfiguration("DropLocation");
+
+    url = method.empty() ? "http" : method;
+    url += "://";
+    if (!user.empty()) {
+      url += user;
+      if (!password.empty()) {
+        url += ':';
+        url += password;
+      }
+      url += '@';
+    }
+    url += site;
+    url += location;
+  }
+  return url;
+}
+
 std::string cmCTest::GetCurrentTag()
 {
   return this->CurrentTag;
diff --git a/Source/cmCTest.h b/Source/cmCTest.h
index 2b40ca3..a82f400 100644
--- a/Source/cmCTest.h
+++ b/Source/cmCTest.h
@@ -176,6 +176,8 @@ public:
                              bool suppress = false);
   void EmptyCTestConfiguration();
 
+  std::string GetSubmitURL();
+
   /**
    * constructor and destructor
    */

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2bedd5fb7c02987ad209f96889e2578a16806e01
commit 2bedd5fb7c02987ad209f96889e2578a16806e01
Author:     Regina Pfeifer <regina at mailbox.org>
AuthorDate: Mon Dec 10 10:10:14 2018 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jan 16 10:34:08 2019 -0500

    ctest_submit: Remove submit method from log output

diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index 3042480..7b51059 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -162,7 +162,6 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(
 
   /* In windows, this will init the winsock stuff */
   ::curl_global_init(CURL_GLOBAL_ALL);
-  std::string dropMethod(this->CTest->GetCTestConfiguration("DropMethod"));
   std::string curlopt(this->CTest->GetCTestConfiguration("CurlOptions"));
   std::vector<std::string> args;
   cmSystemTools::ExpandListArgument(curlopt, args);
@@ -503,12 +502,8 @@ void cmCTestSubmitHandler::ConstructCDashURL(std::string& dropMethod,
   url += "://";
   if (!this->CTest->GetCTestConfiguration("DropSiteUser").empty()) {
     url += this->CTest->GetCTestConfiguration("DropSiteUser");
-    cmCTestOptionalLog(
-      this->CTest, HANDLER_OUTPUT,
-      this->CTest->GetCTestConfiguration("DropSiteUser").c_str(), this->Quiet);
     if (!this->CTest->GetCTestConfiguration("DropSitePassword").empty()) {
       url += ":" + this->CTest->GetCTestConfiguration("DropSitePassword");
-      cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, ":******", this->Quiet);
     }
     url += "@";
   }
@@ -545,7 +540,8 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
     fields = url.substr(pos + 1);
     url = url.substr(0, pos);
   }
-  if (!(dropMethod == "http" || dropMethod == "https")) {
+  if (!cmHasLiteralPrefix(url, "http://") &&
+      !cmHasLiteralPrefix(url, "https://")) {
     cmCTestLog(this->CTest, ERROR_MESSAGE,
                "Only http and https are supported for CDASH_UPLOAD\n");
     return -1;
@@ -872,10 +868,7 @@ int cmCTestSubmitHandler::ProcessHandler()
       cnt++;
     }
   }
-  cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
-                     "Submit files (using "
-                       << this->CTest->GetCTestConfiguration("DropMethod")
-                       << ")" << std::endl,
+  cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "Submit files\n",
                      this->Quiet);
   const char* specificTrack = this->CTest->GetSpecificTrack();
   if (specificTrack) {
@@ -891,66 +884,42 @@ int cmCTestSubmitHandler::ProcessHandler()
     dropMethod = "http";
   }
 
-  if (dropMethod == "http" || dropMethod == "https") {
-    std::string url = dropMethod;
-    url += "://";
-    ofs << "Using drop method: " << dropMethod << std::endl;
-    cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
-                       "   Using HTTP submit method" << std::endl
-                                                     << "   Drop site:" << url,
-                       this->Quiet);
-    if (!this->CTest->GetCTestConfiguration("DropSiteUser").empty()) {
-      url += this->CTest->GetCTestConfiguration("DropSiteUser");
-      cmCTestOptionalLog(
-        this->CTest, HANDLER_OUTPUT,
-        this->CTest->GetCTestConfiguration("DropSiteUser").c_str(),
-        this->Quiet);
-      if (!this->CTest->GetCTestConfiguration("DropSitePassword").empty()) {
-        url += ":" + this->CTest->GetCTestConfiguration("DropSitePassword");
-        cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, ":******",
-                           this->Quiet);
-      }
-      url += "@";
-      cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "@", this->Quiet);
+  std::string url = dropMethod;
+  url += "://";
+  if (!this->CTest->GetCTestConfiguration("DropSiteUser").empty()) {
+    url += this->CTest->GetCTestConfiguration("DropSiteUser");
+    if (!this->CTest->GetCTestConfiguration("DropSitePassword").empty()) {
+      url += ":" + this->CTest->GetCTestConfiguration("DropSitePassword");
     }
-    url += this->CTest->GetCTestConfiguration("DropSite") +
-      this->CTest->GetCTestConfiguration("DropLocation");
+    url += "@";
+  }
+  url += this->CTest->GetCTestConfiguration("DropSite") +
+    this->CTest->GetCTestConfiguration("DropLocation");
+  cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
+                     "   SubmitURL: " << url << '\n', this->Quiet);
+  if (!this->SubmitUsingHTTP(buildDirectory + "/Testing/" +
+                               this->CTest->GetCurrentTag(),
+                             files, prefix, url)) {
+    cmCTestLog(this->CTest, ERROR_MESSAGE,
+               "   Problems when submitting via HTTP\n");
+    ofs << "   Problems when submitting via HTTP\n";
+    return -1;
+  }
+  if (this->HasErrors) {
+    cmCTestLog(this->CTest, HANDLER_OUTPUT,
+               "   Errors occurred during submission.\n");
+    ofs << "   Errors occurred during submission.\n";
+  } else {
     cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
-                       this->CTest->GetCTestConfiguration("DropSite")
-                         << this->CTest->GetCTestConfiguration("DropLocation")
+                       "   Submission successful"
+                         << (this->HasWarnings ? ", with warnings." : "")
                          << std::endl,
                        this->Quiet);
-    if (!this->SubmitUsingHTTP(buildDirectory + "/Testing/" +
-                                 this->CTest->GetCurrentTag(),
-                               files, prefix, url)) {
-      cmCTestLog(this->CTest, ERROR_MESSAGE,
-                 "   Problems when submitting via HTTP" << std::endl);
-      ofs << "   Problems when submitting via HTTP" << std::endl;
-      return -1;
-    }
-    if (this->HasErrors) {
-      cmCTestLog(this->CTest, HANDLER_OUTPUT,
-                 "   Errors occurred during "
-                 "submission."
-                   << std::endl);
-      ofs << "   Errors occurred during submission. " << std::endl;
-    } else {
-      cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
-                         "   Submission successful"
-                           << (this->HasWarnings ? ", with warnings." : "")
-                           << std::endl,
-                         this->Quiet);
-      ofs << "   Submission successful"
-          << (this->HasWarnings ? ", with warnings." : "") << std::endl;
-    }
-
-    return 0;
+    ofs << "   Submission successful"
+        << (this->HasWarnings ? ", with warnings." : "") << std::endl;
   }
 
-  cmCTestLog(this->CTest, ERROR_MESSAGE,
-             "   Unknown submission method: \"" << dropMethod << "\""
-                                                << std::endl);
-  return -1;
+  return 0;
 }
 
 std::string cmCTestSubmitHandler::GetSubmitResultsPrefix()
diff --git a/Tests/RunCMake/ctest_submit/FailDrop-http-stdout.txt b/Tests/RunCMake/ctest_submit/FailDrop-http-stdout.txt
index c7f35c5..c9111b0 100644
--- a/Tests/RunCMake/ctest_submit/FailDrop-http-stdout.txt
+++ b/Tests/RunCMake/ctest_submit/FailDrop-http-stdout.txt
@@ -1,3 +1,2 @@
-Submit files \(using http\)
-   Using HTTP submit method
-   Drop site:http://
+Submit files
+   SubmitURL: http://-no-site-
diff --git a/Tests/RunCMake/ctest_submit/FailDrop-https-stdout.txt b/Tests/RunCMake/ctest_submit/FailDrop-https-stdout.txt
index 19f8234..2c67eb9 100644
--- a/Tests/RunCMake/ctest_submit/FailDrop-https-stdout.txt
+++ b/Tests/RunCMake/ctest_submit/FailDrop-https-stdout.txt
@@ -1,3 +1,2 @@
-Submit files \(using https\)
-   Using HTTP submit method
-   Drop site:https://
+Submit files
+   SubmitURL: https://-no-site-

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0f08ed89362d207e18b06e806f127cd683b79141
commit 0f08ed89362d207e18b06e806f127cd683b79141
Author:     Tushar Maheshwari <tushar27192 at gmail.com>
AuthorDate: Tue Jan 15 20:34:46 2019 +0530
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jan 16 10:03:35 2019 -0500

    cmSystemTools: Silence CreateLink and CreateSymlink errors
    
    If provided, report errors to a std::string.
    This allows "silent" fallback to another flow, like COPY_ON_ERROR.

diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 2cdf827..999af54 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -3760,34 +3760,32 @@ bool cmFileCommand::HandleCreateLinkCommand(
 
   // Check if the command requires a symbolic link.
   if (symbolicArg.IsEnabled()) {
-    completed = cmSystemTools::CreateSymlink(fileName, newFileName);
+    completed = cmSystemTools::CreateSymlink(fileName, newFileName, &result);
   } else {
-    completed = cmSystemTools::CreateLink(fileName, newFileName);
+    completed = cmSystemTools::CreateLink(fileName, newFileName, &result);
   }
 
-  if (!completed) {
-    // The link method did not succeed. Get the error message.
-    result = "Link failed: " + cmSystemTools::GetLastSystemError();
-
-    // Check if copy-on-error is enabled in the arguments.
-    if (copyOnErrorArg.IsEnabled()) {
-      completed =
-        cmSystemTools::cmCopyFile(fileName.c_str(), newFileName.c_str());
-      if (!completed) {
-        result = "Copy failed: " + cmSystemTools::GetLastSystemError();
-      }
+  // Check if copy-on-error is enabled in the arguments.
+  if (!completed && copyOnErrorArg.IsEnabled()) {
+    completed =
+      cmSystemTools::cmCopyFile(fileName.c_str(), newFileName.c_str());
+    if (!completed) {
+      result = "Copy failed: " + cmSystemTools::GetLastSystemError();
     }
   }
 
   // Check if the operation was successful.
   if (completed) {
     result = "0";
+  } else if (resultVar.empty()) {
+    // The operation failed and the result is not reported in a variable.
+    this->SetError(result);
+    return false;
   }
 
   if (!resultVar.empty()) {
     this->Makefile->AddDefinition(resultVar, result.c_str());
-    return true;
   }
 
-  return completed;
+  return true;
 }
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index a1c8c03..52957c1 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -3114,7 +3114,8 @@ std::string cmSystemTools::EncodeURL(std::string const& in, bool escapeSlashes)
 }
 
 bool cmSystemTools::CreateSymlink(const std::string& origName,
-                                  const std::string& newName)
+                                  const std::string& newName,
+                                  std::string* errorMessage)
 {
   uv_fs_t req;
   int flags = 0;
@@ -3128,7 +3129,11 @@ bool cmSystemTools::CreateSymlink(const std::string& origName,
   if (err) {
     std::string e =
       "failed to create symbolic link '" + newName + "': " + uv_strerror(err);
-    cmSystemTools::Error(e.c_str());
+    if (errorMessage) {
+      *errorMessage = std::move(e);
+    } else {
+      cmSystemTools::Error(e.c_str());
+    }
     return false;
   }
 
@@ -3136,7 +3141,8 @@ bool cmSystemTools::CreateSymlink(const std::string& origName,
 }
 
 bool cmSystemTools::CreateLink(const std::string& origName,
-                               const std::string& newName)
+                               const std::string& newName,
+                               std::string* errorMessage)
 {
   uv_fs_t req;
   int err =
@@ -3144,7 +3150,11 @@ bool cmSystemTools::CreateLink(const std::string& origName,
   if (err) {
     std::string e =
       "failed to create link '" + newName + "': " + uv_strerror(err);
-    cmSystemTools::Error(e.c_str());
+    if (errorMessage) {
+      *errorMessage = std::move(e);
+    } else {
+      cmSystemTools::Error(e.c_str());
+    }
     return false;
   }
 
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index 15f27e5..489811d 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -528,12 +528,14 @@ public:
   /** Create a symbolic link if the platform supports it.  Returns whether
       creation succeeded. */
   static bool CreateSymlink(const std::string& origName,
-                            const std::string& newName);
+                            const std::string& newName,
+                            std::string* errorMessage = nullptr);
 
   /** Create a hard link if the platform supports it.  Returns whether
       creation succeeded. */
   static bool CreateLink(const std::string& origName,
-                         const std::string& newName);
+                         const std::string& newName,
+                         std::string* errorMessage = nullptr);
 
 private:
   static bool s_ForceUnixPaths;

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=593d986470ce1938436da312e0c93e3c9c07017e
commit 593d986470ce1938436da312e0c93e3c9c07017e
Author:     Tushar Maheshwari <tushar27192 at gmail.com>
AuthorDate: Sun Jan 13 21:05:58 2019 +0530
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jan 16 10:03:35 2019 -0500

    Tests: Avoid cross-device links in CREATE_LINK test
    
    Add a test for COPY_ON_ERROR to cover that scenario.

diff --git a/Tests/RunCMake/file/CREATE_LINK-COPY_ON_ERROR.cmake b/Tests/RunCMake/file/CREATE_LINK-COPY_ON_ERROR.cmake
new file mode 100644
index 0000000..777ef4e
--- /dev/null
+++ b/Tests/RunCMake/file/CREATE_LINK-COPY_ON_ERROR.cmake
@@ -0,0 +1,11 @@
+# Use COPY_ON_ERROR to handle the case where the source and destination
+# directory are on different devices. Cross-device links are not permitted
+# and the following command falls back to copying the file if link fails.
+file(CREATE_LINK
+  ${CMAKE_CURRENT_LIST_FILE} TestCreateLink.cmake
+  RESULT result
+  COPY_ON_ERROR
+  )
+if(NOT result STREQUAL "0")
+  message(SEND_ERROR "COPY_ON_ERROR failed: '${result}'")
+endif()
diff --git a/Tests/RunCMake/file/CREATE_LINK.cmake b/Tests/RunCMake/file/CREATE_LINK.cmake
index b7c090e..ca61646 100644
--- a/Tests/RunCMake/file/CREATE_LINK.cmake
+++ b/Tests/RunCMake/file/CREATE_LINK.cmake
@@ -1,4 +1,11 @@
-file(CREATE_LINK ${CMAKE_CURRENT_LIST_FILE} TestLink.cmake RESULT result)
+# start with a file in the same directory to avoid cross-device links
+set(test_file ${CMAKE_CURRENT_BINARY_DIR}/CreateLinkTest.txt)
+file(TOUCH ${test_file})
+
+file(CREATE_LINK
+  ${test_file} ${CMAKE_CURRENT_BINARY_DIR}/TestCreateLink.txt
+  RESULT result
+  )
 if(NOT result STREQUAL "0")
   message(SEND_ERROR "Hard link result='${result}'")
 endif()
diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake
index bbabddd..128e8f3 100644
--- a/Tests/RunCMake/file/RunCMakeTest.cmake
+++ b/Tests/RunCMake/file/RunCMakeTest.cmake
@@ -1,6 +1,7 @@
 include(RunCMake)
 
 run_cmake(CREATE_LINK)
+run_cmake(CREATE_LINK-COPY_ON_ERROR)
 run_cmake(CREATE_LINK-noarg)
 run_cmake(CREATE_LINK-noexist)
 run_cmake(DOWNLOAD-hash-mismatch)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9a3d85cfc501fe3c1655e4a6ae9fd08fd9a1fbb7
commit 9a3d85cfc501fe3c1655e4a6ae9fd08fd9a1fbb7
Author:     Tushar Maheshwari <tushar27192 at gmail.com>
AuthorDate: Fri Jan 11 18:37:05 2019 +0530
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jan 16 10:03:35 2019 -0500

    Tests: Skip symlink tests on Windows

diff --git a/Tests/RunCMake/file/CREATE_LINK-noexist.cmake b/Tests/RunCMake/file/CREATE_LINK-SYMBOLIC-noexist.cmake
similarity index 53%
copy from Tests/RunCMake/file/CREATE_LINK-noexist.cmake
copy to Tests/RunCMake/file/CREATE_LINK-SYMBOLIC-noexist.cmake
index 1c4dc12..61aaf38 100644
--- a/Tests/RunCMake/file/CREATE_LINK-noexist.cmake
+++ b/Tests/RunCMake/file/CREATE_LINK-SYMBOLIC-noexist.cmake
@@ -1,8 +1,3 @@
-file(CREATE_LINK does_not_exist.txt TestLink.txt RESULT result)
-if(NOT result STREQUAL "0")
-  message("Hard link error: ${result}")
-endif()
-
 file(CREATE_LINK does_not_exist.txt TestSymLink.txt RESULT sym_result SYMBOLIC)
 if(NOT sym_result STREQUAL "0")
   message("Symlink fail: ${sym_result}")
diff --git a/Tests/RunCMake/file/CREATE_LINK.cmake b/Tests/RunCMake/file/CREATE_LINK-SYMBOLIC.cmake
similarity index 53%
copy from Tests/RunCMake/file/CREATE_LINK.cmake
copy to Tests/RunCMake/file/CREATE_LINK-SYMBOLIC.cmake
index 1d65b69..77b899c 100644
--- a/Tests/RunCMake/file/CREATE_LINK.cmake
+++ b/Tests/RunCMake/file/CREATE_LINK-SYMBOLIC.cmake
@@ -1,8 +1,3 @@
-file(CREATE_LINK ${CMAKE_CURRENT_LIST_FILE} TestLink.cmake RESULT result)
-if(NOT result STREQUAL "0")
-  message(SEND_ERROR "Hard link result='${result}'")
-endif()
-
 file(CREATE_LINK ${CMAKE_CURRENT_LIST_FILE} TestSymLink.cmake RESULT sym_result SYMBOLIC)
 if(NOT sym_result STREQUAL "0")
   message(SEND_ERROR "Symlink result='${sym_result}'")
diff --git a/Tests/RunCMake/file/CREATE_LINK-noexist.cmake b/Tests/RunCMake/file/CREATE_LINK-noexist.cmake
index 1c4dc12..5ee2580 100644
--- a/Tests/RunCMake/file/CREATE_LINK-noexist.cmake
+++ b/Tests/RunCMake/file/CREATE_LINK-noexist.cmake
@@ -2,8 +2,3 @@ file(CREATE_LINK does_not_exist.txt TestLink.txt RESULT result)
 if(NOT result STREQUAL "0")
   message("Hard link error: ${result}")
 endif()
-
-file(CREATE_LINK does_not_exist.txt TestSymLink.txt RESULT sym_result SYMBOLIC)
-if(NOT sym_result STREQUAL "0")
-  message("Symlink fail: ${sym_result}")
-endif()
diff --git a/Tests/RunCMake/file/CREATE_LINK.cmake b/Tests/RunCMake/file/CREATE_LINK.cmake
index 1d65b69..b7c090e 100644
--- a/Tests/RunCMake/file/CREATE_LINK.cmake
+++ b/Tests/RunCMake/file/CREATE_LINK.cmake
@@ -2,8 +2,3 @@ file(CREATE_LINK ${CMAKE_CURRENT_LIST_FILE} TestLink.cmake RESULT result)
 if(NOT result STREQUAL "0")
   message(SEND_ERROR "Hard link result='${result}'")
 endif()
-
-file(CREATE_LINK ${CMAKE_CURRENT_LIST_FILE} TestSymLink.cmake RESULT sym_result SYMBOLIC)
-if(NOT sym_result STREQUAL "0")
-  message(SEND_ERROR "Symlink result='${sym_result}'")
-endif()
diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake
index 4259680..bbabddd 100644
--- a/Tests/RunCMake/file/RunCMakeTest.cmake
+++ b/Tests/RunCMake/file/RunCMakeTest.cmake
@@ -56,6 +56,8 @@ run_cmake_command(GLOB-error-CONFIGURE_DEPENDS-SCRIPT_MODE ${CMAKE_COMMAND} -P
   ${RunCMake_SOURCE_DIR}/GLOB-error-CONFIGURE_DEPENDS-SCRIPT_MODE.cmake)
 
 if(NOT WIN32 OR CYGWIN)
+  run_cmake(CREATE_LINK-SYMBOLIC)
+  run_cmake(CREATE_LINK-SYMBOLIC-noexist)
   run_cmake(GLOB_RECURSE-cyclic-recursion)
   run_cmake(INSTALL-SYMLINK)
   run_cmake(READ_SYMLINK)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e68ea269d72773e53db0c6c6848f6f69f3fd7329
commit e68ea269d72773e53db0c6c6848f6f69f3fd7329
Author:     Tushar Maheshwari <tushar27192 at gmail.com>
AuthorDate: Thu Dec 27 22:05:32 2018 +0530
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jan 16 10:03:35 2019 -0500

    Tests: CREATE_LINK subcommand negative test case

diff --git a/Tests/RunCMake/file/CREATE_LINK-noarg-result.txt b/Tests/RunCMake/file/CREATE_LINK-noarg-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/file/CREATE_LINK-noarg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file/CREATE_LINK-noarg-stderr.txt b/Tests/RunCMake/file/CREATE_LINK-noarg-stderr.txt
new file mode 100644
index 0000000..12494f8
--- /dev/null
+++ b/Tests/RunCMake/file/CREATE_LINK-noarg-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at CREATE_LINK-noarg\.cmake:[0-9]+ \(file\):
+  file CREATE_LINK must be called with at least two additional arguments
+Call Stack \(most recent call first\):
+  CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/file/CREATE_LINK-noarg.cmake b/Tests/RunCMake/file/CREATE_LINK-noarg.cmake
new file mode 100644
index 0000000..65002fa
--- /dev/null
+++ b/Tests/RunCMake/file/CREATE_LINK-noarg.cmake
@@ -0,0 +1 @@
+file(CREATE_LINK ${CMAKE_CURRENT_LIST_FILE})
diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake
index 0962c17..4259680 100644
--- a/Tests/RunCMake/file/RunCMakeTest.cmake
+++ b/Tests/RunCMake/file/RunCMakeTest.cmake
@@ -1,6 +1,7 @@
 include(RunCMake)
 
 run_cmake(CREATE_LINK)
+run_cmake(CREATE_LINK-noarg)
 run_cmake(CREATE_LINK-noexist)
 run_cmake(DOWNLOAD-hash-mismatch)
 run_cmake(DOWNLOAD-unused-argument)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=45aa9c65a13105ff505e18f5029ef794b7aef9ab
commit 45aa9c65a13105ff505e18f5029ef794b7aef9ab
Author:     Tushar Maheshwari <tushar27192 at gmail.com>
AuthorDate: Thu Dec 27 21:36:31 2018 +0530
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jan 16 10:03:35 2019 -0500

    Tests: file CREATE_LINK subcommand test cases

diff --git a/Tests/RunCMake/file/CREATE_LINK-noexist-stderr.txt b/Tests/RunCMake/file/CREATE_LINK-noexist-stderr.txt
new file mode 100644
index 0000000..97eee4f
--- /dev/null
+++ b/Tests/RunCMake/file/CREATE_LINK-noexist-stderr.txt
@@ -0,0 +1 @@
+Hard link error: Cannot hard link 'does_not_exist.txt' as it does not exist.
diff --git a/Tests/RunCMake/file/CREATE_LINK-noexist.cmake b/Tests/RunCMake/file/CREATE_LINK-noexist.cmake
new file mode 100644
index 0000000..1c4dc12
--- /dev/null
+++ b/Tests/RunCMake/file/CREATE_LINK-noexist.cmake
@@ -0,0 +1,9 @@
+file(CREATE_LINK does_not_exist.txt TestLink.txt RESULT result)
+if(NOT result STREQUAL "0")
+  message("Hard link error: ${result}")
+endif()
+
+file(CREATE_LINK does_not_exist.txt TestSymLink.txt RESULT sym_result SYMBOLIC)
+if(NOT sym_result STREQUAL "0")
+  message("Symlink fail: ${sym_result}")
+endif()
diff --git a/Tests/RunCMake/file/CREATE_LINK.cmake b/Tests/RunCMake/file/CREATE_LINK.cmake
new file mode 100644
index 0000000..1d65b69
--- /dev/null
+++ b/Tests/RunCMake/file/CREATE_LINK.cmake
@@ -0,0 +1,9 @@
+file(CREATE_LINK ${CMAKE_CURRENT_LIST_FILE} TestLink.cmake RESULT result)
+if(NOT result STREQUAL "0")
+  message(SEND_ERROR "Hard link result='${result}'")
+endif()
+
+file(CREATE_LINK ${CMAKE_CURRENT_LIST_FILE} TestSymLink.cmake RESULT sym_result SYMBOLIC)
+if(NOT sym_result STREQUAL "0")
+  message(SEND_ERROR "Symlink result='${sym_result}'")
+endif()
diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake
index b872824..0962c17 100644
--- a/Tests/RunCMake/file/RunCMakeTest.cmake
+++ b/Tests/RunCMake/file/RunCMakeTest.cmake
@@ -1,5 +1,7 @@
 include(RunCMake)
 
+run_cmake(CREATE_LINK)
+run_cmake(CREATE_LINK-noexist)
 run_cmake(DOWNLOAD-hash-mismatch)
 run_cmake(DOWNLOAD-unused-argument)
 run_cmake(DOWNLOAD-httpheader-not-set)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8bb7562f1a4e75fa5cd00f4ebd868d1494b63e7a
commit 8bb7562f1a4e75fa5cd00f4ebd868d1494b63e7a
Author:     Tushar Maheshwari <tushar27192 at gmail.com>
AuthorDate: Thu Dec 27 20:59:51 2018 +0530
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jan 16 10:03:35 2019 -0500

    Help: Add documentation for file(CREATE_LINK) subcommand

diff --git a/Help/command/file.rst b/Help/command/file.rst
index 6e2a6dd..db4d6fc 100644
--- a/Help/command/file.rst
+++ b/Help/command/file.rst
@@ -27,6 +27,7 @@ Synopsis
     file({`COPY`_ | `INSTALL`_} <file>... DESTINATION <dir> [...])
     file(`SIZE`_ <filename> <out-var>)
     file(`READ_SYMLINK`_ <filename> <out-var>)
+    file(`CREATE_LINK`_ <file> <new-file> [...])
 
   `Path Conversion`_
     file(`RELATIVE_PATH`_ <out-var> <directory> <file>)
@@ -368,6 +369,28 @@ could do something like this:
     set(result "${dir}/${result}")
   endif()
 
+.. _CREATE_LINK:
+
+.. code-block:: cmake
+
+  file(CREATE_LINK <file> <new-file>
+       [RESULT <result>] [COPY_ON_ERROR] [SYMBOLIC])
+
+Create a link to ``<file>`` at ``<new-file>``.
+
+It is a hard link by default. This can be changed to symbolic links by
+using ``SYMBOLIC``.  The original file needs to exist for hard links.
+
+The ``<result>`` variable, if specified, gets the status of the operation.
+It is set to ``0`` in case of success. Otherwise, it contains the error
+generated. In case of failures, if ``RESULT`` is not specified, a fatal error
+is emitted.
+
+Specifying ``COPY_ON_ERROR`` enables copying the file as a fallback if
+creating the link fails.
+
+Overwrites the ``<new-file>`` if it exists.
+
 Path Conversion
 ^^^^^^^^^^^^^^^
 

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=81650e488c734702384ef903630838015a3f81b1
commit 81650e488c734702384ef903630838015a3f81b1
Author:     Tushar Maheshwari <tushar27192 at gmail.com>
AuthorDate: Thu Dec 27 17:28:30 2018 +0530
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jan 16 10:03:35 2019 -0500

    cmFileCommand: Add CREATE_LINK subcommand
    
    This brings the functionality of `cmake -E create_symlink` and more to scripts.
    
    The default behavior is to create hard links.
    The `SYMBOLIC` argument can be used to create symlinks instead.
    
    The `COPY_ON_ERROR` argument enables a fallback to copying the file in case the link fails.
    
    The `RESULT <var>` retrieves the error message generated by the system.
    It is set to "0" on success.
    
    Fixes: #16926

diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index db2fde8..2cdf827 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -185,6 +185,9 @@ bool cmFileCommand::InitialPass(std::vector<std::string> const& args,
   if (subCommand == "READ_SYMLINK") {
     return this->HandleReadSymlinkCommand(args);
   }
+  if (subCommand == "CREATE_LINK") {
+    return this->HandleCreateLinkCommand(args);
+  }
 
   std::string e = "does not recognize sub-command " + subCommand;
   this->SetError(e);
@@ -3670,3 +3673,121 @@ bool cmFileCommand::HandleReadSymlinkCommand(
 
   return true;
 }
+
+bool cmFileCommand::HandleCreateLinkCommand(
+  std::vector<std::string> const& args)
+{
+  if (args.size() < 3) {
+    this->SetError("CREATE_LINK must be called with at least two additional "
+                   "arguments");
+    return false;
+  }
+
+  cmCommandArgumentsHelper argHelper;
+  cmCommandArgumentGroup group;
+
+  cmCAString linkArg(&argHelper, "CREATE_LINK");
+  cmCAString fileArg(&argHelper, nullptr);
+  cmCAString newFileArg(&argHelper, nullptr);
+
+  cmCAString resultArg(&argHelper, "RESULT", &group);
+  cmCAEnabler copyOnErrorArg(&argHelper, "COPY_ON_ERROR", &group);
+  cmCAEnabler symbolicArg(&argHelper, "SYMBOLIC", &group);
+
+  linkArg.Follows(nullptr);
+  fileArg.Follows(&linkArg);
+  newFileArg.Follows(&fileArg);
+  group.Follows(&newFileArg);
+
+  std::vector<std::string> unconsumedArgs;
+  argHelper.Parse(&args, &unconsumedArgs);
+
+  if (!unconsumedArgs.empty()) {
+    this->SetError("unknown argument: \"" + unconsumedArgs.front() + '\"');
+    return false;
+  }
+
+  std::string fileName = fileArg.GetString();
+  std::string newFileName = newFileArg.GetString();
+
+  // Output variable for storing the result.
+  const std::string& resultVar = resultArg.GetString();
+
+  // The system error message generated in the operation.
+  std::string result;
+
+  // Check if the paths are distinct.
+  if (fileName == newFileName) {
+    result = "CREATE_LINK cannot use same file and newfile";
+    if (!resultVar.empty()) {
+      this->Makefile->AddDefinition(resultVar, result.c_str());
+      return true;
+    }
+    this->SetError(result);
+    return false;
+  }
+
+  // Hard link requires original file to exist.
+  if (!symbolicArg.IsEnabled() && !cmSystemTools::FileExists(fileName)) {
+    result = "Cannot hard link \'" + fileName + "\' as it does not exist.";
+    if (!resultVar.empty()) {
+      this->Makefile->AddDefinition(resultVar, result.c_str());
+      return true;
+    }
+    this->SetError(result);
+    return false;
+  }
+
+  // Check if the new file already exists and remove it.
+  if ((cmSystemTools::FileExists(newFileName) ||
+       cmSystemTools::FileIsSymlink(newFileName)) &&
+      !cmSystemTools::RemoveFile(newFileName)) {
+    std::ostringstream e;
+    e << "Failed to create link '" << newFileName
+      << "' because existing path cannot be removed: "
+      << cmSystemTools::GetLastSystemError() << "\n";
+
+    if (!resultVar.empty()) {
+      this->Makefile->AddDefinition(resultVar, e.str().c_str());
+      return true;
+    }
+    this->SetError(e.str());
+    return false;
+  }
+
+  // Whether the operation completed successfully.
+  bool completed = false;
+
+  // Check if the command requires a symbolic link.
+  if (symbolicArg.IsEnabled()) {
+    completed = cmSystemTools::CreateSymlink(fileName, newFileName);
+  } else {
+    completed = cmSystemTools::CreateLink(fileName, newFileName);
+  }
+
+  if (!completed) {
+    // The link method did not succeed. Get the error message.
+    result = "Link failed: " + cmSystemTools::GetLastSystemError();
+
+    // Check if copy-on-error is enabled in the arguments.
+    if (copyOnErrorArg.IsEnabled()) {
+      completed =
+        cmSystemTools::cmCopyFile(fileName.c_str(), newFileName.c_str());
+      if (!completed) {
+        result = "Copy failed: " + cmSystemTools::GetLastSystemError();
+      }
+    }
+  }
+
+  // Check if the operation was successful.
+  if (completed) {
+    result = "0";
+  }
+
+  if (!resultVar.empty()) {
+    this->Makefile->AddDefinition(resultVar, result.c_str());
+    return true;
+  }
+
+  return completed;
+}
diff --git a/Source/cmFileCommand.h b/Source/cmFileCommand.h
index fe05c98..12c5115 100644
--- a/Source/cmFileCommand.h
+++ b/Source/cmFileCommand.h
@@ -61,6 +61,7 @@ protected:
   bool HandleLockCommand(std::vector<std::string> const& args);
   bool HandleSizeCommand(std::vector<std::string> const& args);
   bool HandleReadSymlinkCommand(std::vector<std::string> const& args);
+  bool HandleCreateLinkCommand(std::vector<std::string> const& args);
 
 private:
   void AddEvaluationFile(const std::string& inputName,
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index be65853..a1c8c03 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -3134,3 +3134,19 @@ bool cmSystemTools::CreateSymlink(const std::string& origName,
 
   return true;
 }
+
+bool cmSystemTools::CreateLink(const std::string& origName,
+                               const std::string& newName)
+{
+  uv_fs_t req;
+  int err =
+    uv_fs_link(nullptr, &req, origName.c_str(), newName.c_str(), nullptr);
+  if (err) {
+    std::string e =
+      "failed to create link '" + newName + "': " + uv_strerror(err);
+    cmSystemTools::Error(e.c_str());
+    return false;
+  }
+
+  return true;
+}
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index c0999e7..15f27e5 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -530,6 +530,11 @@ public:
   static bool CreateSymlink(const std::string& origName,
                             const std::string& newName);
 
+  /** Create a hard link if the platform supports it.  Returns whether
+      creation succeeded. */
+  static bool CreateLink(const std::string& origName,
+                         const std::string& newName);
+
 private:
   static bool s_ForceUnixPaths;
   static bool s_RunCommandHideConsole;

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b773e58099b2fc8ebdf8319172fb018d0139396d
commit b773e58099b2fc8ebdf8319172fb018d0139396d
Author:     David Aguilar <davvid at gmail.com>
AuthorDate: Tue Jan 15 12:12:32 2019 -0800
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jan 16 09:59:46 2019 -0500

    find_package: add test coverage for CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS

diff --git a/Tests/FindPackageTest/CMakeLists.txt b/Tests/FindPackageTest/CMakeLists.txt
index 6a80df5..f8b36c5 100644
--- a/Tests/FindPackageTest/CMakeLists.txt
+++ b/Tests/FindPackageTest/CMakeLists.txt
@@ -188,6 +188,37 @@ find_package(ArchC 3.1 EXACT NAMES zot)
 find_package(ArchD 4.0 EXACT NAMES zot)
 unset(CMAKE_LIBRARY_ARCHITECTURE)
 
+# Test find_package() with CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS enabled
+if(UNIX)
+  # Create ./symlink pointing back here.
+  execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
+      . "${CMAKE_CURRENT_SOURCE_DIR}/symlink")
+  # Make find_package search through the symlink
+  set(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/symlink")
+
+  # First, test the default behavior where symlinks are preserved.
+  set(SetFoundResolved_DIR "")
+  find_package(SetFoundResolved)
+  # The result must preserve the /symlink/ path.
+  set(SetFoundResolved_EXPECTED "${CMAKE_CURRENT_SOURCE_DIR}/symlink/cmake")
+  if(NOT "${SetFoundResolved_DIR}" STREQUAL "${SetFoundResolved_EXPECTED}")
+    message(SEND_ERROR "SetFoundResolved_DIR set by find_package() is set to \"${SetFoundResolved_DIR}\" (expected \"${SetFoundResolved_EXPECTED}\")")
+  endif()
+
+  # Resolve symlinks when finding the package.
+  set(CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS TRUE)
+  set(SetFoundResolved_DIR "")
+  find_package(SetFoundResolved)
+  # ./symlink points back here so it should be gone when resolved.
+  set(SetFoundResolved_EXPECTED "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
+  if(NOT "${SetFoundResolved_DIR}" STREQUAL "${SetFoundResolved_EXPECTED}")
+    message(SEND_ERROR "SetFoundResolved_DIR set by find_package() is set to \"${SetFoundResolved_DIR}\" (expected \"${SetFoundResolved_EXPECTED}\")")
+  endif()
+  # Cleanup.
+  unset(CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS)
+  file(REMOVE "${CMAKE_CURRENT_SOURCE_DIR}/symlink")
+endif()
+
 # Test <PackageName>_DIR environment variable.
 # We erase the main prefix path to ensure the env var is used.
 set(CMAKE_PREFIX_PATH)
diff --git a/Tests/FindPackageTest/cmake/SetFoundResolvedConfig.cmake b/Tests/FindPackageTest/cmake/SetFoundResolvedConfig.cmake
new file mode 100644
index 0000000..b2cf87c
--- /dev/null
+++ b/Tests/FindPackageTest/cmake/SetFoundResolvedConfig.cmake
@@ -0,0 +1 @@
+set(SetFoundResolved_DIR "${CMAKE_CURRENT_LIST_DIR}")
diff --git a/Tests/RunCMake/find_package/PackageRoot/ResolvedConfig.cmake b/Tests/RunCMake/find_package/PackageRoot/ResolvedConfig.cmake
new file mode 100644
index 0000000..4496a05
--- /dev/null
+++ b/Tests/RunCMake/find_package/PackageRoot/ResolvedConfig.cmake
@@ -0,0 +1 @@
+set(Resolved_DIR "${CMAKE_CURRENT_LIST_DIR}")
diff --git a/Tests/RunCMake/find_package/RunCMakeTest.cmake b/Tests/RunCMake/find_package/RunCMakeTest.cmake
index e9f3558..066523e 100644
--- a/Tests/RunCMake/find_package/RunCMakeTest.cmake
+++ b/Tests/RunCMake/find_package/RunCMakeTest.cmake
@@ -26,3 +26,6 @@ run_cmake(WrongVersionConfig)
 run_cmake(CMP0084-OLD)
 run_cmake(CMP0084-WARN)
 run_cmake(CMP0084-NEW)
+if(UNIX)
+  run_cmake(SetFoundResolved)
+endif()
diff --git a/Tests/RunCMake/find_package/SetFoundResolved-stderr.txt b/Tests/RunCMake/find_package/SetFoundResolved-stderr.txt
new file mode 100644
index 0000000..ea94be5
--- /dev/null
+++ b/Tests/RunCMake/find_package/SetFoundResolved-stderr.txt
@@ -0,0 +1,10 @@
+CMake Warning at SetFoundResolved.cmake:10 \(message\):
+  .*/Tests/RunCMake/find_package/symlink
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)
+
+
+CMake Warning at SetFoundResolved.cmake:15 \(message\):
+  .*/Tests/RunCMake/find_package/PackageRoot
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/find_package/SetFoundResolved.cmake b/Tests/RunCMake/find_package/SetFoundResolved.cmake
new file mode 100644
index 0000000..8d56513
--- /dev/null
+++ b/Tests/RunCMake/find_package/SetFoundResolved.cmake
@@ -0,0 +1,17 @@
+# Create ./symlink pointing back here.
+execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
+  PackageRoot "${CMAKE_CURRENT_SOURCE_DIR}/symlink")
+
+# Make find_package search through the symlink.
+set(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/symlink")
+
+# Test preservation of symlinks.
+find_package(Resolved)
+message(WARNING "${Resolved_DIR}")
+
+# Test resolving symlinks.
+set(CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS ON)
+find_package(Resolved)
+message(WARNING "${Resolved_DIR}")
+
+file(REMOVE "${CMAKE_CURRENT_SOURCE_DIR}/symlink")

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a5e948a36f5d1c1cf6a0ea34b04bbc4b6058e7d9
commit a5e948a36f5d1c1cf6a0ea34b04bbc4b6058e7d9
Author:     David Aguilar <davvid at gmail.com>
AuthorDate: Thu Dec 20 16:41:04 2018 -0800
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jan 16 09:59:46 2019 -0500

    find_package: optionally resolve symlinks when discovering packages
    
    Teach find_package() to resolve symlinks when constructing
    relocatable prefix paths from discovered cmake config files.
    The `CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS` variable enables
    this behavior when set to `TRUE`.
    
    Fixes: #18704

diff --git a/Help/command/find_package.rst b/Help/command/find_package.rst
index cafef8c..54d5f68 100644
--- a/Help/command/find_package.rst
+++ b/Help/command/find_package.rst
@@ -354,6 +354,11 @@ enabled.
 .. include:: FIND_XXX_ROOT.txt
 .. include:: FIND_XXX_ORDER.txt
 
+By default the value stored in the result variable will be the path at
+which the file is found.  The :variable:`CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS`
+variable may be set to ``TRUE`` before calling ``find_package`` in order
+to resolve symbolic links and store the real path to the file.
+
 Every non-REQUIRED ``find_package`` call can be disabled by setting the
 :variable:`CMAKE_DISABLE_FIND_PACKAGE_<PackageName>` variable to ``TRUE``.
 
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index e464b0c..0bbe914 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -170,6 +170,7 @@ Variables that Change Behavior
    /variable/CMAKE_FIND_NO_INSTALL_PREFIX
    /variable/CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY
    /variable/CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY
+   /variable/CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS
    /variable/CMAKE_FIND_PACKAGE_WARN_NO_MODULE
    /variable/CMAKE_FIND_ROOT_PATH
    /variable/CMAKE_FIND_ROOT_PATH_MODE_INCLUDE
diff --git a/Help/release/dev/find-package-resolve-symlinks.rst b/Help/release/dev/find-package-resolve-symlinks.rst
new file mode 100644
index 0000000..7adb9fe
--- /dev/null
+++ b/Help/release/dev/find-package-resolve-symlinks.rst
@@ -0,0 +1,6 @@
+find-package-resolve-symlinks
+-----------------------------
+
+* The :command:`find_package` command learned to optionally resolve
+  symbolic links in the paths to package configuration files.
+  See the :variable:`CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS` variable.
diff --git a/Help/variable/CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS.rst b/Help/variable/CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS.rst
new file mode 100644
index 0000000..dfbde20
--- /dev/null
+++ b/Help/variable/CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS.rst
@@ -0,0 +1,10 @@
+CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS
+-----------------------------------
+
+Set to ``TRUE`` to tell :command:`find_package` calls to resolve symbolic
+links in the value of ``<PackageName>_DIR``.
+
+This is helpful in use cases where the package search path points at a
+proxy directory in which symlinks to the real package locations appear.
+This is not enabled by default because there are also common use cases
+in which the symlinks should be preserved.
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 8dc7ca2..2567b7a 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -95,6 +95,7 @@ cmFindPackageCommand::cmFindPackageCommand()
   this->UseLib32Paths = false;
   this->UseLib64Paths = false;
   this->UseLibx32Paths = false;
+  this->UseRealPath = false;
   this->PolicyScope = true;
   this->VersionMajor = 0;
   this->VersionMinor = 0;
@@ -195,6 +196,11 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args,
     this->NoSystemRegistry = true;
   }
 
+  // Check whether we should resolve symlinks when finding packages
+  if (this->Makefile->IsOn("CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS")) {
+    this->UseRealPath = true;
+  }
+
   // Check if Sorting should be enabled
   if (const char* so =
         this->Makefile->GetDefinition("CMAKE_FIND_PACKAGE_SORT_ORDER")) {
@@ -1502,6 +1508,10 @@ bool cmFindPackageCommand::FindConfigFile(std::string const& dir,
       fprintf(stderr, "Checking file [%s]\n", file.c_str());
     }
     if (cmSystemTools::FileExists(file, true) && this->CheckVersion(file)) {
+      // Allow resolving symlinks when the config file is found through a link
+      if (this->UseRealPath) {
+        file = cmSystemTools::GetRealPath(file);
+      }
       return true;
     }
   }
diff --git a/Source/cmFindPackageCommand.h b/Source/cmFindPackageCommand.h
index 05bad49..83d8431 100644
--- a/Source/cmFindPackageCommand.h
+++ b/Source/cmFindPackageCommand.h
@@ -178,6 +178,7 @@ private:
   bool UseLib32Paths;
   bool UseLib64Paths;
   bool UseLibx32Paths;
+  bool UseRealPath;
   bool PolicyScope;
   std::string LibraryArchitecture;
   std::vector<std::string> Names;

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

Summary of changes:
 .clang-tidy                                        |   1 -
 Help/command/ctest_submit.rst                      |  10 +-
 Help/command/file.rst                              |  23 ++++
 Help/command/find_package.rst                      |   5 +
 Help/manual/cmake-variables.7.rst                  |   2 +
 Help/manual/ctest.1.rst                            |  31 ++++--
 Help/release/dev/ctest-submit-url.rst              |   7 ++
 Help/release/dev/find-package-resolve-symlinks.rst |   6 ++
 .../CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS.rst        |  10 ++
 Help/variable/CTEST_SUBMIT_URL.rst                 |   5 +
 Modules/CTest.cmake                                |  18 +++-
 Modules/DartConfiguration.tcl.in                   |   7 +-
 Modules/FindCURL.cmake                             |   4 +-
 Source/CPack/cmCPackDragNDropGenerator.cxx         |   4 +-
 Source/CPack/cmCPackGenerator.cxx                  |   3 +-
 Source/CPack/cmCPackNSISGenerator.cxx              |   2 +-
 Source/CPack/cmCPackPackageMakerGenerator.cxx      |  20 ++--
 Source/CTest/cmCTestBuildAndTestHandler.cxx        |   2 +-
 Source/CTest/cmCTestBuildHandler.cxx               |  12 +--
 Source/CTest/cmCTestCoverageHandler.cxx            |   9 +-
 Source/CTest/cmCTestLaunch.cxx                     |   8 +-
 Source/CTest/cmCTestMemCheckHandler.cxx            |  24 ++---
 Source/CTest/cmCTestMultiProcessHandler.cxx        |   5 +
 Source/CTest/cmCTestP4.cxx                         |   8 +-
 Source/CTest/cmCTestSVN.cxx                        |   4 +-
 Source/CTest/cmCTestSVN.h                          |   2 +-
 Source/CTest/cmCTestScriptHandler.cxx              |   4 +-
 Source/CTest/cmCTestSubmitCommand.cxx              |  53 ++++-----
 Source/CTest/cmCTestSubmitCommand.h                |   2 +
 Source/CTest/cmCTestSubmitHandler.cxx              | 116 +++++---------------
 Source/CTest/cmCTestSubmitHandler.h                |   2 -
 Source/CTest/cmCTestTestHandler.cxx                |  14 +--
 Source/CTest/cmParseDelphiCoverage.cxx             |   2 +-
 Source/CursesDialog/ccmake.cxx                     |   2 +-
 Source/CursesDialog/cmCursesMainForm.cxx           |   8 +-
 Source/cmCPluginAPI.cxx                            |  15 ++-
 Source/cmCTest.cxx                                 |  35 +++++-
 Source/cmCTest.h                                   |   2 +
 Source/cmComputeLinkInformation.cxx                |   6 +-
 Source/cmCoreTryCompile.cxx                        |   4 +-
 Source/cmDependsJavaParserHelper.cxx               |   4 +-
 Source/cmExecuteProcessCommand.cxx                 |   8 +-
 Source/cmFileCommand.cxx                           | 119 +++++++++++++++++++++
 Source/cmFileCommand.h                             |   1 +
 Source/cmFindCommon.cxx                            |   6 +-
 Source/cmFindPackageCommand.cxx                    |  24 +++--
 Source/cmFindPackageCommand.h                      |   1 +
 Source/cmForEachCommand.cxx                        |   2 +-
 Source/cmGeneratorExpressionLexer.cxx              |   4 +-
 Source/cmGeneratorTarget.cxx                       |   8 +-
 Source/cmGlobalGenerator.cxx                       |  10 +-
 Source/cmGlobalNinjaGenerator.cxx                  |  10 +-
 Source/cmGlobalUnixMakefileGenerator3.cxx          |  12 +--
 Source/cmGlobalXCodeGenerator.cxx                  |  26 ++---
 Source/cmJsonObjects.cxx                           |  14 +--
 Source/cmLocalGenerator.cxx                        |  26 ++---
 Source/cmLocalUnixMakefileGenerator3.cxx           |  18 ++--
 Source/cmMacroCommand.cxx                          |   2 +-
 Source/cmMakefile.cxx                              |   2 +-
 Source/cmMakefileTargetGenerator.cxx               |   2 +-
 Source/cmNinjaNormalTargetGenerator.cxx            |   6 +-
 Source/cmNinjaTargetGenerator.cxx                  |   7 +-
 Source/cmParseArgumentsCommand.cxx                 |   2 +-
 Source/cmProjectCommand.cxx                        |  26 ++---
 Source/cmQtAutoGenInitializer.cxx                  |   6 +-
 Source/cmQtAutoGeneratorMocUic.cxx                 |  10 +-
 Source/cmQtAutoGeneratorRcc.cxx                    |   2 +-
 Source/cmRST.cxx                                   |   4 +-
 Source/cmRulePlaceholderExpander.cxx               |   5 +
 Source/cmRulePlaceholderExpander.h                 |   1 +
 Source/cmSetSourceFilesPropertiesCommand.cxx       |  16 +--
 Source/cmSiteNameCommand.cxx                       |  12 +--
 Source/cmSourceGroupCommand.cxx                    |   2 +-
 Source/cmStringReplaceHelper.cxx                   |  12 ++-
 Source/cmSystemTools.cxx                           |  36 ++++++-
 Source/cmSystemTools.h                             |   9 +-
 Source/cmTarget.cxx                                |  34 +++---
 Source/cmTryRunCommand.cxx                         |   4 +-
 Source/cmake.cxx                                   |  40 +++----
 Source/cmakemain.cxx                               |  12 +--
 Source/cmcmd.cxx                                   |  16 +--
 Source/ctest.cxx                                   |   2 +-
 Tests/FindPackageTest/CMakeLists.txt               |  31 ++++++
 .../cmake/SetFoundResolvedConfig.cmake             |   1 +
 Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake |  22 ++--
 .../show-only_bad-result.txt}                      |   0
 .../CTestCommandLine/show-only_bad-stderr.txt      |   1 +
 .../CTestCommandLine/show-only_human-stdout.txt    |   1 +
 .../CTestCommandLine/show-only_json-v1-check.cmake |   1 +
 ...AsJson1-check.py => show-only_json-v1_check.py} |   6 +-
 ...ShowAsJson_check.py => show_only_json_check.py} |   0
 .../RunCMake/ctest_submit/FailDrop-http-stdout.txt |   5 +-
 .../ctest_submit/FailDrop-https-stdout.txt         |   5 +-
 .../RunCMake/file/CREATE_LINK-COPY_ON_ERROR.cmake  |  11 ++
 .../file/CREATE_LINK-SYMBOLIC-noexist.cmake        |   4 +
 Tests/RunCMake/file/CREATE_LINK-SYMBOLIC.cmake     |   4 +
 .../CREATE_LINK-noarg-result.txt}                  |   0
 Tests/RunCMake/file/CREATE_LINK-noarg-stderr.txt   |   4 +
 Tests/RunCMake/file/CREATE_LINK-noarg.cmake        |   1 +
 Tests/RunCMake/file/CREATE_LINK-noexist-stderr.txt |   1 +
 Tests/RunCMake/file/CREATE_LINK-noexist.cmake      |   4 +
 Tests/RunCMake/file/CREATE_LINK.cmake              |  11 ++
 Tests/RunCMake/file/RunCMakeTest.cmake             |   6 ++
 .../find_package/PackageRoot/ResolvedConfig.cmake  |   1 +
 Tests/RunCMake/find_package/RunCMakeTest.cmake     |   3 +
 .../find_package/SetFoundResolved-stderr.txt       |  10 ++
 Tests/RunCMake/find_package/SetFoundResolved.cmake |  17 +++
 107 files changed, 778 insertions(+), 432 deletions(-)
 create mode 100644 Help/release/dev/ctest-submit-url.rst
 create mode 100644 Help/release/dev/find-package-resolve-symlinks.rst
 create mode 100644 Help/variable/CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS.rst
 create mode 100644 Help/variable/CTEST_SUBMIT_URL.rst
 create mode 100644 Tests/FindPackageTest/cmake/SetFoundResolvedConfig.cmake
 copy Tests/RunCMake/{while/MissingArgument-result.txt => CTestCommandLine/show-only_bad-result.txt} (100%)
 create mode 100644 Tests/RunCMake/CTestCommandLine/show-only_bad-stderr.txt
 create mode 100644 Tests/RunCMake/CTestCommandLine/show-only_human-stdout.txt
 create mode 100644 Tests/RunCMake/CTestCommandLine/show-only_json-v1-check.cmake
 rename Tests/RunCMake/CTestCommandLine/{ShowAsJson1-check.py => show-only_json-v1_check.py} (97%)
 rename Tests/RunCMake/CTestCommandLine/{ShowAsJson_check.py => show_only_json_check.py} (100%)
 create mode 100644 Tests/RunCMake/file/CREATE_LINK-COPY_ON_ERROR.cmake
 create mode 100644 Tests/RunCMake/file/CREATE_LINK-SYMBOLIC-noexist.cmake
 create mode 100644 Tests/RunCMake/file/CREATE_LINK-SYMBOLIC.cmake
 copy Tests/RunCMake/{while/MissingArgument-result.txt => file/CREATE_LINK-noarg-result.txt} (100%)
 create mode 100644 Tests/RunCMake/file/CREATE_LINK-noarg-stderr.txt
 create mode 100644 Tests/RunCMake/file/CREATE_LINK-noarg.cmake
 create mode 100644 Tests/RunCMake/file/CREATE_LINK-noexist-stderr.txt
 create mode 100644 Tests/RunCMake/file/CREATE_LINK-noexist.cmake
 create mode 100644 Tests/RunCMake/file/CREATE_LINK.cmake
 create mode 100644 Tests/RunCMake/find_package/PackageRoot/ResolvedConfig.cmake
 create mode 100644 Tests/RunCMake/find_package/SetFoundResolved-stderr.txt
 create mode 100644 Tests/RunCMake/find_package/SetFoundResolved.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list