Merge topic 'autogen_cmStrCat'

ca2923110c Autogen: Modernize to use cmStrCat for string concatenation
d02a99d9d3 Autogen: Modernize code to use cm::string_view for the info writer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3663
diff --git a/Help/release/3.15.rst b/Help/release/3.15.rst
index 4f53466..b0365ba 100644
--- a/Help/release/3.15.rst
+++ b/Help/release/3.15.rst
@@ -362,3 +362,10 @@
   always runs in a mode aware of C++14.
 
 * Preliminary Swift support added in 3.15.0 has been updated.
+
+3.15.2
+------
+
+* In CMake 3.15.0 and 3.15.1 the :variable:`CMAKE_FIND_PACKAGE_PREFER_CONFIG`
+  variable caused the :command:`find_package` command to fail on a missing
+  package even without the ``REQUIRED`` option.  This has been fixed.
diff --git a/Modules/CMakeSwiftInformation.cmake b/Modules/CMakeSwiftInformation.cmake
index 58b0813..54e441c 100644
--- a/Modules/CMakeSwiftInformation.cmake
+++ b/Modules/CMakeSwiftInformation.cmake
@@ -18,7 +18,9 @@
 endif()
 
 set(CMAKE_INCLUDE_FLAG_Swift "-I ")
-if(NOT CMAKE_SYSTEM_NAME STREQUAL Windows AND NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
+if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
+  set(CMAKE_SHARED_LIBRARY_SONAME_Swift_FLAG "-Xlinker -install_name -Xlinker ")
+elseif(NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
   set(CMAKE_SHARED_LIBRARY_SONAME_Swift_FLAG "-Xlinker -soname -Xlinker ")
 endif()
 
diff --git a/Modules/FindPackageHandleStandardArgs.cmake b/Modules/FindPackageHandleStandardArgs.cmake
index 1722d6a..a2999fc 100644
--- a/Modules/FindPackageHandleStandardArgs.cmake
+++ b/Modules/FindPackageHandleStandardArgs.cmake
@@ -264,14 +264,14 @@
       if(${_NAME}_${comp}_FOUND)
 
         if(NOT DEFINED FOUND_COMPONENTS_MSG)
-          set(FOUND_COMPONENTS_MSG "found components: ")
+          set(FOUND_COMPONENTS_MSG "found components:")
         endif()
         string(APPEND FOUND_COMPONENTS_MSG " ${comp}")
 
       else()
 
         if(NOT DEFINED MISSING_COMPONENTS_MSG)
-          set(MISSING_COMPONENTS_MSG "missing components: ")
+          set(MISSING_COMPONENTS_MSG "missing components:")
         endif()
         string(APPEND MISSING_COMPONENTS_MSG " ${comp}")
 
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 96e5ee5..1a93578 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,7 +1,7 @@
 # CMake version number components.
 set(CMake_VERSION_MAJOR 3)
 set(CMake_VERSION_MINOR 15)
-set(CMake_VERSION_PATCH 20190807)
+set(CMake_VERSION_PATCH 20190809)
 #set(CMake_VERSION_RC 0)
 set(CMake_VERSION_IS_DIRTY 0)
 
diff --git a/Source/cmExecutionStatus.h b/Source/cmExecutionStatus.h
index bcacc2f..654922c 100644
--- a/Source/cmExecutionStatus.h
+++ b/Source/cmExecutionStatus.h
@@ -22,15 +22,6 @@
   {
   }
 
-  void Clear()
-  {
-    this->Error = "unknown error.";
-    this->ReturnInvoked = false;
-    this->BreakInvoked = false;
-    this->ContinueInvoked = false;
-    this->NestedError = false;
-  }
-
   cmMakefile& GetMakefile() { return this->Makefile; }
 
   void SetError(std::string const& e) { this->Error = e; }
diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx
index 1d961be..a565786 100644
--- a/Source/cmForEachCommand.cxx
+++ b/Source/cmForEachCommand.cxx
@@ -74,9 +74,8 @@
     // set the variable to the loop value
     mf.AddDefinition(this->Args[0], arg);
     // Invoke all the functions that were collected in the block.
-    cmExecutionStatus status(mf);
     for (cmListFileFunction const& func : functions) {
-      status.Clear();
+      cmExecutionStatus status(mf);
       mf.ExecuteCommand(func, status);
       if (status.GetReturnInvoked()) {
         inStatus.SetReturnInvoked();
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx
index c5cfd8c..7b49ae7 100644
--- a/Source/cmIfCommand.cxx
+++ b/Source/cmIfCommand.cxx
@@ -61,7 +61,6 @@
 {
   cmMakefile& mf = inStatus.GetMakefile();
   // execute the functions for the true parts of the if statement
-  cmExecutionStatus status(mf);
   int scopeDepth = 0;
   for (cmListFileFunction const& func : functions) {
     // keep track of scope depth
@@ -147,7 +146,7 @@
 
     // should we execute?
     else if (!this->IsBlocking) {
-      status.Clear();
+      cmExecutionStatus status(mf);
       mf.ExecuteCommand(func, status);
       if (status.GetReturnInvoked()) {
         inStatus.SetReturnInvoked();
diff --git a/Tests/RunCMake/FindBoost/CMakePackage-stdout.txt b/Tests/RunCMake/FindBoost/CMakePackage-stdout.txt
index 0a67488..ebd7232 100644
--- a/Tests/RunCMake/FindBoost/CMakePackage-stdout.txt
+++ b/Tests/RunCMake/FindBoost/CMakePackage-stdout.txt
@@ -1,2 +1,2 @@
 -- Found Boost: [^
-]* \(found suitable version "1\.12345", minimum required is "1\.12345"\) found components:  date_time
+]* \(found suitable version "1\.12345", minimum required is "1\.12345"\) found components: date_time
diff --git a/Tests/RunCMake/FindBoost/LegacyVars-LowercaseTargetPrefix-stdout.txt b/Tests/RunCMake/FindBoost/LegacyVars-LowercaseTargetPrefix-stdout.txt
index a781dce..1175425 100644
--- a/Tests/RunCMake/FindBoost/LegacyVars-LowercaseTargetPrefix-stdout.txt
+++ b/Tests/RunCMake/FindBoost/LegacyVars-LowercaseTargetPrefix-stdout.txt
@@ -1,5 +1,5 @@
 -- Found Boost: [^
-]* \(found suitable version "1\.70\.42", minimum required is "1\.70"\) found components:  date_time python37 mpi_python2 *
+]* \(found suitable version "1\.70\.42", minimum required is "1\.70"\) found components: date_time python37 mpi_python2 *
 -- Boost_FOUND: TRUE
 -- Boost_INCLUDE_DIRS: [^
 ]*/Tests/RunCMake/FindBoost/CMakePackage[^/]*/include
diff --git a/Tests/RunCMake/FindBoost/LegacyVars-TargetsDefined-stdout.txt b/Tests/RunCMake/FindBoost/LegacyVars-TargetsDefined-stdout.txt
index a4e9c6a..101d60e 100644
--- a/Tests/RunCMake/FindBoost/LegacyVars-TargetsDefined-stdout.txt
+++ b/Tests/RunCMake/FindBoost/LegacyVars-TargetsDefined-stdout.txt
@@ -1,5 +1,5 @@
 -- Found Boost: [^
-]* \(found suitable version "1\.70\.42", minimum required is "1\.70"\) found components:  date_time python37 mpi_python2 *
+]* \(found suitable version "1\.70\.42", minimum required is "1\.70"\) found components: date_time python37 mpi_python2 *
 -- Boost_FOUND: TRUE
 -- Boost_INCLUDE_DIRS: [^
 ]*/Tests/RunCMake/FindBoost/CMakePackage[^/]*/include
diff --git a/Tests/RunCMake/FindBoost/MissingTarget-stdout.txt b/Tests/RunCMake/FindBoost/MissingTarget-stdout.txt
index 8e9d684..9853c01 100644
--- a/Tests/RunCMake/FindBoost/MissingTarget-stdout.txt
+++ b/Tests/RunCMake/FindBoost/MissingTarget-stdout.txt
@@ -1,5 +1,5 @@
 -- Found Boost: [^
-]* \(found suitable version "1\.70\.42", minimum required is "1\.70"\) found components:  date_time *
+]* \(found suitable version "1\.70\.42", minimum required is "1\.70"\) found components: date_time *
 -- Boost_FOUND: TRUE
 -- Boost_INCLUDE_DIRS: [^
 ]*/Tests/RunCMake/FindBoost/CMakePackage_MissingTarget/include