Merge topic 'Xcode-add_custom_command-DEPFILE'
253aff6c94 Xcode: Add support of DEPFILE for add_custom_command, part 2
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6015
diff --git a/Help/command/file.rst b/Help/command/file.rst
index 2b445c5..62642cf 100644
--- a/Help/command/file.rst
+++ b/Help/command/file.rst
@@ -958,7 +958,8 @@
to a cmake-style list separated by ``;`` characters.
The ``TO_NATIVE_PATH`` mode converts a cmake-style ``<path>`` into a native
-path with platform-specific slashes (``\`` on Windows and ``/`` elsewhere).
+path with platform-specific slashes (``\`` on Windows hosts and ``/``
+elsewhere).
Always use double quotes around the ``<path>`` to be sure it is treated
as a single argument to this command.
diff --git a/Help/command/if.rst b/Help/command/if.rst
index f327ca9..fbf3e36 100644
--- a/Help/command/if.rst
+++ b/Help/command/if.rst
@@ -153,7 +153,16 @@
only for full paths.
``if(IS_ABSOLUTE path)``
- True if the given path is an absolute path.
+ True if the given path is an absolute path. Note the following special
+ cases:
+
+ * An empty ``path`` evaluates to false.
+ * On Windows hosts, any ``path`` that begins with a drive letter and colon
+ (e.g. ``C:``), a forward slash or a backslash will evaluate to true.
+ This means a path like ``C:no\base\dir`` will evaluate to true, even
+ though the non-drive part of the path is relative.
+ * On non-Windows hosts, any ``path`` that begins with a tilde (``~``)
+ evaluates to true.
Comparisons
"""""""""""
diff --git a/Help/variable/CMAKE_TOOLCHAIN_FILE.rst b/Help/variable/CMAKE_TOOLCHAIN_FILE.rst
index 423da9c..e462c5e 100644
--- a/Help/variable/CMAKE_TOOLCHAIN_FILE.rst
+++ b/Help/variable/CMAKE_TOOLCHAIN_FILE.rst
@@ -9,4 +9,4 @@
platform and compiler related information.
Relative paths are allowed and are interpreted first as relative to the
-build directory, and if not found, relative to the soruce directory.
+build directory, and if not found, relative to the source directory.
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index fd07a5c..3d1a7bb 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -161,7 +161,7 @@
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU|Clang|QCC")
get_filename_component(COMPILER_BASENAME "${CMAKE_CXX_COMPILER}" NAME)
- if (COMPILER_BASENAME MATCHES "^(.+-)?(clang\\+\\+|g\\+\\+|clang-cl)(-[0-9]+(\\.[0-9]+)*)?(-[^.]+)?(\\.exe)?$")
+ if (COMPILER_BASENAME MATCHES "^(.+-)?(clang\\+\\+|[gc]\\+\\+|clang-cl)(-[0-9]+(\\.[0-9]+)*)?(-[^.]+)?(\\.exe)?$")
set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
set(_CMAKE_TOOLCHAIN_SUFFIX ${CMAKE_MATCH_3})
set(_CMAKE_COMPILER_SUFFIX ${CMAKE_MATCH_5})
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 49e9326..3ba0698 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 20)
-set(CMake_VERSION_PATCH 20210417)
+set(CMake_VERSION_PATCH 20210420)
#set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0)
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 3b8b70e..af3a504 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -3271,8 +3271,8 @@
}
auto gen = this->CreateGlobalGenerator(*cachedGenerator);
if (!gen) {
- std::cerr << "Error: could create CMAKE_GENERATOR \"" << *cachedGenerator
- << "\"\n";
+ std::cerr << "Error: could not create CMAKE_GENERATOR \""
+ << *cachedGenerator << "\"\n";
return 1;
}
this->SetGlobalGenerator(std::move(gen));
@@ -3411,7 +3411,7 @@
std::unique_ptr<cmGlobalGenerator> gen =
this->CreateGlobalGenerator(fullName);
if (!gen) {
- std::cerr << "Error: could create CMAKE_GENERATOR \"" << fullName
+ std::cerr << "Error: could not create CMAKE_GENERATOR \"" << fullName
<< "\"\n";
return false;
}
diff --git a/Tests/CompileFeatures/cxx_contextual_conversions.cpp b/Tests/CompileFeatures/cxx_contextual_conversions.cpp
index 247f13f..fe8d5c0 100644
--- a/Tests/CompileFeatures/cxx_contextual_conversions.cpp
+++ b/Tests/CompileFeatures/cxx_contextual_conversions.cpp
@@ -1,4 +1,3 @@
-
#define assert(E) \
if (!(E)) \
return 1;
@@ -38,6 +37,7 @@
}
int* vp = new int[i];
+ delete[] vp;
return 0;
}
diff --git a/Tests/RunCMake/CommandLine/build-bad-generator-stderr.txt b/Tests/RunCMake/CommandLine/build-bad-generator-stderr.txt
index 1103407..9390d77 100644
--- a/Tests/RunCMake/CommandLine/build-bad-generator-stderr.txt
+++ b/Tests/RunCMake/CommandLine/build-bad-generator-stderr.txt
@@ -1 +1 @@
-^Error: could create CMAKE_GENERATOR "Bad Generator"$
+^Error: could not create CMAKE_GENERATOR "Bad Generator"$