Imported Upstream version 3.11.4 upstream/3.11.4
authorDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 8 Oct 2021 00:13:22 +0000 (09:13 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 8 Oct 2021 00:13:22 +0000 (09:13 +0900)
Modules/ExternalProject.cmake
Source/CMakeVersion.cmake
Source/cmSystemTools.cxx
Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS-check.cmake
Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS.cmake
Tests/RunCMake/ExternalProject/CMAKE_CACHE_DEFAULT_ARGS-check.cmake
Tests/RunCMake/ExternalProject/CMAKE_CACHE_DEFAULT_ARGS.cmake

index db19691..0c5b33f 100644 (file)
@@ -133,9 +133,9 @@ External Project Definition
         is determined by inspecting the actual content rather than using logic
         based on the file extension.
 
-      ``URL_HASH ALGO=<value>``
-        Hash of the archive file to be downloaded. The ``<value>`` should be of
-        the form ``algo=hashValue`` where ``algo`` can be any of the hashing
+      ``URL_HASH <algo>=<hashValue>``
+        Hash of the archive file to be downloaded. The argument should be of
+        the form ``<algo>=<hashValue>`` where ``algo`` can be any of the hashing
         algorithms supported by the :command:`file()` command. Specifying this
         option is strongly recommended for URL downloads, as it ensures the
         integrity of the downloaded content. It is also used as a check for a
@@ -1686,7 +1686,7 @@ function(_ep_command_line_to_initial_cache var args force)
   foreach(line ${args})
     if("${line}" MATCHES "^-D(.*)")
       set(line "${CMAKE_MATCH_1}")
-      if(setArg)
+      if(NOT "${setArg}" STREQUAL "")
         # This is required to build up lists in variables, or complete an entry
         string(APPEND setArg "${accumulator}\" CACHE ${type} \"Initial cache\" ${forceArg})")
         string(APPEND script_initial_cache "\n${setArg}")
index 354d0b5..d8059bf 100644 (file)
@@ -1,5 +1,5 @@
 # CMake version number components.
 set(CMake_VERSION_MAJOR 3)
 set(CMake_VERSION_MINOR 11)
-set(CMake_VERSION_PATCH 3)
+set(CMake_VERSION_PATCH 4)
 #set(CMake_VERSION_RC 0)
index 6f326de..9575c05 100644 (file)
@@ -2117,7 +2117,8 @@ void cmSystemTools::FindCMakeResources(const char* argv0)
   wchar_t modulepath[_MAX_PATH];
   ::GetModuleFileNameW(NULL, modulepath, sizeof(modulepath));
   std::string path = cmsys::Encoding::ToNarrow(modulepath);
-  std::string realPath = cmSystemTools::GetRealPath(path, NULL);
+  std::string realPath =
+    cmSystemTools::GetRealPathResolvingWindowsSubst(path, NULL);
   if (realPath.empty()) {
     realPath = path;
   }
index cc5521e..c501856 100644 (file)
@@ -33,3 +33,12 @@ if(NOT "${CMAKE_MATCH_0}" MATCHES FORCE)
   set(RunCMake_TEST_FAILED "Expected forced TEST_OPTIONAL argument")
   return()
 endif()
+
+if(NOT "${_cache}" MATCHES "set\\(TEST_OPTIONAL_LAST \"TEST_OPTIONAL_LAST-NOTFOUND\".+\\)")
+  set(RunCMake_TEST_FAILED "Cannot find TEST_OPTIONAL_LAST argument in cache")
+  return()
+endif()
+if(NOT "${CMAKE_MATCH_0}" MATCHES FORCE)
+  set(RunCMake_TEST_FAILED "Expected forced TEST_OPTIONAL_LAST argument")
+  return()
+endif()
index a583e31..4f7e020 100644 (file)
@@ -9,4 +9,5 @@ ExternalProject_Add(FOO TMP_DIR "${CMAKE_CURRENT_BINARY_DIR}/tmp"
                         CMAKE_CACHE_ARGS
                             "-DFOO:STRING=$<1:BAR>$<0:BAD>"
                             "-DTEST_LIST:STRING=A;B;C"
-                            "-DTEST_OPTIONAL:FILEPATH=TEST_OPTIONAL-NOTFOUND")
+                            "-DTEST_OPTIONAL:FILEPATH=TEST_OPTIONAL-NOTFOUND"
+                            "-DTEST_OPTIONAL_LAST:FILEPATH=TEST_OPTIONAL_LAST-NOTFOUND")
index 2bef56e..059f6d3 100644 (file)
@@ -33,3 +33,12 @@ if("${CMAKE_MATCH_0}" MATCHES FORCE)
   set(RunCMake_TEST_FAILED "Expected not forced TEST_OPTIONAL argument")
   return()
 endif()
+
+if(NOT "${_cache}" MATCHES "set\\(TEST_OPTIONAL_LAST \"TEST_OPTIONAL_LAST-NOTFOUND\".+\\)")
+  set(RunCMake_TEST_FAILED "Cannot find TEST_OPTIONAL_LAST argument in cache")
+  return()
+endif()
+if("${CMAKE_MATCH_0}" MATCHES FORCE)
+  set(RunCMake_TEST_FAILED "Expected not forced TEST_OPTIONAL_LAST argument")
+  return()
+endif()
index d388315..6133418 100644 (file)
@@ -9,4 +9,5 @@ ExternalProject_Add(FOO TMP_DIR "${CMAKE_CURRENT_BINARY_DIR}/tmp"
                         CMAKE_CACHE_DEFAULT_ARGS
                             "-DFOO:STRING=$<1:BAR>$<0:BAD>"
                             "-DTEST_LIST:STRING=A;B;C"
-                            "-DTEST_OPTIONAL:FILEPATH=TEST_OPTIONAL-NOTFOUND")
+                            "-DTEST_OPTIONAL:FILEPATH=TEST_OPTIONAL-NOTFOUND"
+                            "-DTEST_OPTIONAL_LAST:FILEPATH=TEST_OPTIONAL_LAST-NOTFOUND")