Merge topic 'vs-lang-flags'

a33a4ec68b Merge branch 'backport-vs-lang-flags' into vs-lang-flags
c4109a1bc8 VS: Restore toleration of target-wide -TP flag with MSVC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5051
diff --git a/Help/command/file.rst b/Help/command/file.rst
index e7bc8d2..693c059 100644
--- a/Help/command/file.rst
+++ b/Help/command/file.rst
@@ -250,8 +250,8 @@
   List of post-exclude regexes through which to filter the names of resolved
   dependencies.
 
-These arguments can be used to blacklist unwanted system libraries when
-resolving the dependencies, or to whitelist libraries from a specific
+These arguments can be used to exclude unwanted system libraries when
+resolving the dependencies, or to include libraries from a specific
 directory. The filtering works as follows:
 
 1. If the not-yet-resolved dependency matches any of the
diff --git a/Help/guide/tutorial/index.rst b/Help/guide/tutorial/index.rst
index ac5e46b..665d123 100644
--- a/Help/guide/tutorial/index.rst
+++ b/Help/guide/tutorial/index.rst
@@ -552,6 +552,7 @@
 directories so that ``Table.h`` can be found and included by ``mysqrt.cxx``.
 
 .. literalinclude:: Step7/MathFunctions/CMakeLists.txt
+  :language: cmake
   :start-after: # state that we depend on our bin
   :end-before: # install rules
 
diff --git a/Help/release/dev/EXCLUDE_FROM_ALL-genex.rst b/Help/release/dev/EXCLUDE_FROM_ALL-genex.rst
new file mode 100644
index 0000000..4d5a83c
--- /dev/null
+++ b/Help/release/dev/EXCLUDE_FROM_ALL-genex.rst
@@ -0,0 +1,5 @@
+EXCLUDE_FROM_ALL-genex
+----------------------
+
+* The :prop_tgt:`EXCLUDE_FROM_ALL` target property gained support for
+  :manual:`generator expressions <cmake-generator-expressions(7)>`.
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 871da4f..0465c93 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 18)
-set(CMake_VERSION_PATCH 20200723)
+set(CMake_VERSION_PATCH 20200727)
 #set(CMake_VERSION_RC 0)
 set(CMake_VERSION_IS_DIRTY 0)
 
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 5c07e31..17c7e99 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2189,7 +2189,7 @@
     // configurations.
     if (trueCount && falseCount) {
       std::ostringstream e;
-      e << "The EXCLUDED_FROM_ALL property of target \"" << target->GetName()
+      e << "The EXCLUDE_FROM_ALL property of target \"" << target->GetName()
         << "\" varies by configuration. This is not supported by the \""
         << root->GetGlobalGenerator()->GetName() << "\" generator.";
       mf->IssueMessage(MessageType::FATAL_ERROR, e.str());
diff --git a/Tests/RunCMake/ExcludeFromAll/RunCMakeTest.cmake b/Tests/RunCMake/ExcludeFromAll/RunCMakeTest.cmake
index 25201e4..2b4fc89 100644
--- a/Tests/RunCMake/ExcludeFromAll/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ExcludeFromAll/RunCMakeTest.cmake
@@ -9,7 +9,7 @@
         -DCMAKE_BUILD_TYPE=${config}
         -DTOOL_EXCLUDE_FROM_ALL=${exclude_from_all_value})
     set(RunCMake_TEST_NO_CLEAN 1)
-    include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+    include(${RunCMake_TEST_BINARY_DIR}/target_files_${config}.cmake)
     run_cmake_command(${case}-build ${CMAKE_COMMAND} --build . --config ${config})
 endfunction()
 
diff --git a/Tests/RunCMake/ExcludeFromAll/error-on-mixed-config-stderr.txt b/Tests/RunCMake/ExcludeFromAll/error-on-mixed-config-stderr.txt
index eee5278..6dc785f 100644
--- a/Tests/RunCMake/ExcludeFromAll/error-on-mixed-config-stderr.txt
+++ b/Tests/RunCMake/ExcludeFromAll/error-on-mixed-config-stderr.txt
@@ -1,3 +1,3 @@
 CMake Error in CMakeLists.txt:
-  The EXCLUDED_FROM_ALL property of target "release_only_tool" varies by
+  The EXCLUDE_FROM_ALL property of target "release_only_tool" varies by
   configuration.  This is not supported by the "[^"]+"
diff --git a/Tests/RunCMake/ExcludeFromAll/main.c b/Tests/RunCMake/ExcludeFromAll/main.c
index 5047a34..f8b643a 100644
--- a/Tests/RunCMake/ExcludeFromAll/main.c
+++ b/Tests/RunCMake/ExcludeFromAll/main.c
@@ -1,3 +1,4 @@
 int main()
 {
+  return 0;
 }
diff --git a/Tests/RunCMake/ExcludeFromAll/single-config.cmake b/Tests/RunCMake/ExcludeFromAll/single-config.cmake
index 71a9f06..aa49c21 100644
--- a/Tests/RunCMake/ExcludeFromAll/single-config.cmake
+++ b/Tests/RunCMake/ExcludeFromAll/single-config.cmake
@@ -2,10 +2,6 @@
 add_executable(tool main.c)
 set_property(TARGET tool PROPERTY EXCLUDE_FROM_ALL "${TOOL_EXCLUDE_FROM_ALL}")
 
-include(../NinjaMultiConfig/Common.cmake)
-set(orig_CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES})
-if("${CMAKE_CONFIGURATION_TYPES}" STREQUAL "")
-    set(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE})
-endif()
-generate_output_files(tool)
-set(CMAKE_CONFIGURATION_TYPES ${orig_CMAKE_CONFIGURATION_TYPES})
+file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/target_files_$<CONFIG>.cmake" CONTENT [[
+set(TARGET_FILE_tool_$<CONFIG> [==[$<TARGET_FILE:tool>]==])
+]])
diff --git a/Utilities/std/cm/bits/fs_path.cxx b/Utilities/std/cm/bits/fs_path.cxx
index b8c5631..8089998 100644
--- a/Utilities/std/cm/bits/fs_path.cxx
+++ b/Utilities/std/cm/bits/fs_path.cxx
@@ -331,7 +331,7 @@
     while (ptr != end &&
            (*ptr == '/'
 #  if defined(_WIN32)
-            || *ptr == ' \\'
+            || *ptr == '\\'
 #  endif
             )) {
       ptr += step;