Imported Upstream version 3.19.4 upstream/3.19.4
authorDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 8 Oct 2021 00:20:34 +0000 (09:20 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 8 Oct 2021 00:20:34 +0000 (09:20 +0900)
16 files changed:
Help/prop_gbl/GENERATOR_IS_MULTI_CONFIG.rst
Help/release/3.19.rst
Help/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM.rst
Modules/FindHDF5.cmake
Modules/GetPrerequisites.cmake
Modules/InstallRequiredSystemLibraries.cmake
Modules/Platform/Linux-Intel-Fortran.cmake
Source/CMakeVersion.cmake
Source/Checks/cm_cxx_features.cmake
Source/cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.cxx
Source/cmGlobalVisualStudio14Generator.cxx
Source/cmGlobalVisualStudio14Generator.h
Source/cmGlobalVisualStudioVersionedGenerator.cxx
Source/cmGlobalVisualStudioVersionedGenerator.h
Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-all-check.cmake
Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos.cmake

index 6f1a9e1..761a1dd 100644 (file)
@@ -5,7 +5,11 @@ GENERATOR_IS_MULTI_CONFIG
 
 Read-only property that is true on multi-configuration generators.
 
-True when using a multi-configuration generator
-(such as :ref:`Visual Studio Generators` or :generator:`Xcode`).
+True when using a multi-configuration generator such as:
+
+* :generator:`Ninja Multi-Config`
+* :ref:`Visual Studio Generators`
+* :generator:`Xcode`
+
 Multi-config generators use :variable:`CMAKE_CONFIGURATION_TYPES`
 as the set of configurations and ignore :variable:`CMAKE_BUILD_TYPE`.
index 7ad27c8..d819e8c 100644 (file)
@@ -400,3 +400,11 @@ Changes made since CMake 3.19.0 include the following.
   * The naming pattern ``cmake-$ver-macos10.10-universal`` is a universal
     binary with ``x86_64`` and ``arm64`` architectures.  It requires
     macOS 10.10 or newer.
+
+3.19.4
+------
+
+* The :variable:`CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM`
+  variable introduced in 3.19.0 previously worked only with the
+  :generator:`Visual Studio 14 2015` generator.  It has now been fixed to
+  work with :ref:`Visual Studio Generators` for later VS versions too.
index 591ea91..d9f136c 100644 (file)
@@ -3,7 +3,7 @@ CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM
 
 .. versionadded:: 3.19
 
-Override the :ref:`Windows 10 SDK Maximum Version for VS 2015`.
+Override the :ref:`Windows 10 SDK Maximum Version for VS 2015` and beyond.
 
 The :variable:`CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM` variable may
 be set to a false value (e.g. ``OFF``, ``FALSE``, or ``0``) or the SDK version
index 25f5a1f..38388d9 100644 (file)
@@ -360,9 +360,11 @@ function( _HDF5_invoke_compiler language output_var return_value_var version_var
   execute_process(
     COMMAND ${HDF5_${language}_COMPILER_EXECUTABLE} ${test_file}
     WORKING_DIRECTORY ${scratch_dir}
+    OUTPUT_VARIABLE output
+    ERROR_VARIABLE output
     RESULT_VARIABLE return_value
     )
-  if(return_value)
+  if(return_value AND NOT HDF5_FIND_QUIETLY)
     message(STATUS
       "HDF5 ${language} compiler wrapper is unable to compile a minimal HDF5 program.")
   else()
@@ -374,7 +376,7 @@ function( _HDF5_invoke_compiler language output_var return_value_var version_var
       RESULT_VARIABLE return_value
       OUTPUT_STRIP_TRAILING_WHITESPACE
       )
-    if(return_value)
+    if(return_value AND NOT HDF5_FIND_QUIETLY)
       message(STATUS
         "Unable to determine HDF5 ${language} flags from HDF5 wrapper.")
     endif()
@@ -385,7 +387,7 @@ function( _HDF5_invoke_compiler language output_var return_value_var version_var
       RESULT_VARIABLE return_value
       OUTPUT_STRIP_TRAILING_WHITESPACE
       )
-    if(return_value)
+    if(return_value AND NOT HDF5_FIND_QUIETLY)
       message(STATUS
         "Unable to determine HDF5 ${language} version_var from HDF5 wrapper.")
     endif()
index c99c772..2d4765a 100644 (file)
@@ -735,7 +735,7 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
     set(gp_regex_cmp_count 1)
   elseif(gp_tool MATCHES "otool$")
     set(gp_cmd_args "-L")
-    set(gp_regex "^\t([^\t]+) \\(compatibility version ([0-9]+.[0-9]+.[0-9]+), current version ([0-9]+.[0-9]+.[0-9]+)\\)${eol_char}$")
+    set(gp_regex "^\t([^\t]+) \\(compatibility version ([0-9]+.[0-9]+.[0-9]+), current version ([0-9]+.[0-9]+.[0-9]+)(, weak)?\\)${eol_char}$")
     set(gp_regex_error "")
     set(gp_regex_fallback "")
     set(gp_regex_cmp_count 3)
index caca697..29d1ec0 100644 (file)
@@ -291,6 +291,7 @@ if(MSVC)
         foreach(crt
             "${MSVC_CRT_DIR}/msvcp${v}_1.dll"
             "${MSVC_CRT_DIR}/msvcp${v}_2.dll"
+            "${MSVC_CRT_DIR}/msvcp${v}_atomic_wait.dll"
             "${MSVC_CRT_DIR}/msvcp${v}_codecvt_ids.dll"
             "${MSVC_CRT_DIR}/vcruntime${v}_1.dll"
             )
@@ -319,6 +320,7 @@ if(MSVC)
         foreach(crt
             "${MSVC_CRT_DIR}/msvcp${v}_1d.dll"
             "${MSVC_CRT_DIR}/msvcp${v}_2d.dll"
+            "${MSVC_CRT_DIR}/msvcp${v}d_atomic_wait.dll"
             "${MSVC_CRT_DIR}/msvcp${v}d_codecvt_ids.dll"
             "${MSVC_CRT_DIR}/vcruntime${v}_1d.dll"
             )
index d8e94d0..a99e793 100644 (file)
@@ -1,4 +1,4 @@
 include(Platform/Linux-Intel)
 __linux_compiler_intel(Fortran)
-string(APPEND CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS " -nofor_main")
+string(APPEND CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS " -nofor-main")
 set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "")
index efdc0bf..2b6c381 100644 (file)
@@ -1,7 +1,7 @@
 # CMake version number components.
 set(CMake_VERSION_MAJOR 3)
 set(CMake_VERSION_MINOR 19)
-set(CMake_VERSION_PATCH 3)
+set(CMake_VERSION_PATCH 4)
 #set(CMake_VERSION_RC 0)
 set(CMake_VERSION_IS_DIRTY 0)
 
@@ -21,7 +21,7 @@ endif()
 
 if(NOT CMake_VERSION_NO_GIT)
   # If this source was exported by 'git archive', use its commit info.
-  set(git_info [==[19ff734e76 CMake 3.19.3]==])
+  set(git_info [==[0c86d15459 CMake 3.19.4]==])
 
   # Otherwise, try to identify the current development source version.
   if(NOT git_info MATCHES "^([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]?[0-9a-f]?)[0-9a-f]* "
index 663d89a..7917d41 100644 (file)
@@ -81,7 +81,13 @@ if(CMake_HAVE_CXX_MAKE_UNIQUE)
 endif()
 cm_check_cxx_feature(unique_ptr)
 if (NOT CMAKE_CXX_STANDARD LESS "17")
-  cm_check_cxx_feature(filesystem TRY_RUN)
+  if (NOT CMAKE_CROSSCOMPILING OR CMAKE_CROSSCOMPILING_EMULATOR)
+    cm_check_cxx_feature(filesystem TRY_RUN)
+  else()
+    # In cross-compiling mode, it is not possible to check implementation bugs
+    # so rely only on conformance done by compilation
+    cm_check_cxx_feature(filesystem)
+  endif()
 else()
   set(CMake_HAVE_CXX_FILESYSTEM FALSE)
 endif()
index 351d92a..6d97720 100644 (file)
@@ -44,7 +44,7 @@ bool cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool::GetFileInfo(
   std::string line;
   static const cmsys::RegularExpression rpathRegex("^ *cmd LC_RPATH$");
   static const cmsys::RegularExpression loadDylibRegex(
-    "^ *cmd LC_LOAD_DYLIB$");
+    "^ *cmd LC_LOAD(_WEAK)?_DYLIB$");
   static const cmsys::RegularExpression pathRegex(
     "^ *path (.*) \\(offset [0-9]+\\)$");
   static const cmsys::RegularExpression nameRegex(
index e17c6d7..b46f1b9 100644 (file)
@@ -253,6 +253,12 @@ std::string cmGlobalVisualStudio14Generator::GetWindows10SDKMaxVersion(
     // If value is an invalid pointer, leave result unchanged.
   }
 
+  return this->GetWindows10SDKMaxVersionDefault(mf);
+}
+
+std::string cmGlobalVisualStudio14Generator::GetWindows10SDKMaxVersionDefault(
+  cmMakefile*) const
+{
   // The last Windows 10 SDK version that VS 2015 can target is 10.0.14393.0.
   //
   // "VS 2015 Users: The Windows 10 SDK (15063, 16299, 17134, 17763) is
index 1ccd4c7..7804b83 100644 (file)
@@ -40,9 +40,13 @@ protected:
   // of the toolset is installed
   bool IsWindowsStoreToolsetInstalled() const;
 
+  // Used to adjust the max-SDK-version calculation to accommodate user
+  // configuration.
+  std::string GetWindows10SDKMaxVersion(cmMakefile* mf) const;
+
   // Used to make sure that the Windows 10 SDK selected can work with the
   // version of the toolset.
-  virtual std::string GetWindows10SDKMaxVersion(cmMakefile* mf) const;
+  virtual std::string GetWindows10SDKMaxVersionDefault(cmMakefile* mf) const;
 
   virtual bool SelectWindows10SDK(cmMakefile* mf, bool required);
 
index 95357e7..84f870e 100644 (file)
@@ -540,7 +540,8 @@ bool cmGlobalVisualStudioVersionedGenerator::IsWin81SDKInstalled() const
   return false;
 }
 
-std::string cmGlobalVisualStudioVersionedGenerator::GetWindows10SDKMaxVersion(
+std::string
+cmGlobalVisualStudioVersionedGenerator::GetWindows10SDKMaxVersionDefault(
   cmMakefile*) const
 {
   return std::string();
index af09cbd..46a5f40 100644 (file)
@@ -56,7 +56,7 @@ protected:
   // Check for a Win 8 SDK known to the registry or VS installer tool.
   bool IsWin81SDKInstalled() const;
 
-  std::string GetWindows10SDKMaxVersion(cmMakefile*) const override;
+  std::string GetWindows10SDKMaxVersionDefault(cmMakefile*) const override;
 
   std::string FindMSBuildCommand() override;
   std::string FindDevEnvCommand() override;
index e6f2623..e7cdbf6 100644 (file)
@@ -148,6 +148,27 @@ set(_check
   )
 check_contents(deps/udeps6.txt "^${_check}$")
 
+# Weak library reference should have exactly the same dependencies as a regular library reference (test 1)
+set_with_libsystem(_check
+  [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/bin/../lib/executable_path/libexecutable_path\.dylib]]
+  [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/bin/../lib/rpath_executable_path/librpath_executable_path\.dylib]]
+  [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/libtestlib\.dylib]]
+  [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/loader_path/libloader_path\.dylib]]
+  [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/normal/../rpath/librpath\.dylib]]
+  [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/normal/libnormal\.dylib]]
+  [[[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/rpath_loader_path/librpath_loader_path\.dylib]]
+  )
+check_contents(deps/deps7.txt "^${_check}$")
+
+set(_check
+  [[@executable_path/../lib/executable_path_bundle/libexecutable_path_bundle\.dylib]]
+  [[@loader_path/loader_path_unresolved/libloader_path_unresolved\.dylib]]
+  [[@rpath/librpath_executable_path_bundle\.dylib]]
+  [[@rpath/librpath_loader_path_unresolved\.dylib]]
+  [[@rpath/librpath_unresolved\.dylib]]
+  )
+check_contents(deps/udeps7.txt "^${_check}$")
+
 set(_check
   "^libconflict\\.dylib:[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/conflict/libconflict\\.dylib;[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-build/root-all/executable/lib/conflict2/libconflict\\.dylib\n$"
   )
@@ -157,3 +178,4 @@ check_contents(deps/cdeps3.txt "${_check}")
 check_contents(deps/cdeps4.txt "${_check}")
 check_contents(deps/cdeps5.txt "${_check}")
 check_contents(deps/cdeps6.txt "${_check}")
+check_contents(deps/cdeps7.txt "${_check}")
index c56a14b..aab19b7 100644 (file)
@@ -128,16 +128,19 @@ endforeach()
 target_link_libraries(testlib PRIVATE ${testlib_names})
 
 add_executable(topexe macos/topexe.c)
+add_executable(topexe_weak macos/topexe.c)
 add_library(toplib SHARED macos/toplib.c)
 add_library(topmod MODULE macos/toplib.c)
 target_link_libraries(topexe PRIVATE testlib)
+target_link_libraries(topexe_weak PRIVATE "-weak_library" testlib)
 target_link_libraries(toplib PRIVATE testlib)
 target_link_libraries(topmod PRIVATE testlib)
 
 set_property(TARGET topexe toplib topmod PROPERTY INSTALL_RPATH "${CMAKE_BINARY_DIR}/root-all/executable/lib")
+set_property(TARGET topexe_weak toplib topmod PROPERTY INSTALL_RPATH "${CMAKE_BINARY_DIR}/root-all/executable/lib")
 
-install(TARGETS topexe toplib topmod testlib testlib_conflict RUNTIME DESTINATION executable/bin LIBRARY DESTINATION executable/lib)
-install(TARGETS topexe toplib topmod testlib testlib_conflict RUNTIME DESTINATION bundle_executable/bin LIBRARY DESTINATION bundle_executable/lib)
+install(TARGETS topexe topexe_weak toplib topmod testlib testlib_conflict RUNTIME DESTINATION executable/bin LIBRARY DESTINATION executable/lib)
+install(TARGETS topexe topexe_weak toplib topmod testlib testlib_conflict RUNTIME DESTINATION bundle_executable/bin LIBRARY DESTINATION bundle_executable/lib)
 
 install(CODE [[
   function(exec_get_runtime_dependencies depsfile udepsfile cdepsfile)
@@ -213,4 +216,12 @@ install(CODE [[
       "${CMAKE_INSTALL_PREFIX}/executable/lib/$<TARGET_FILE_NAME:testlib_conflict>"
     BUNDLE_EXECUTABLE "${CMAKE_INSTALL_PREFIX}/bundle_executable/bin/$<TARGET_FILE_NAME:topexe>"
     )
+
+  exec_get_runtime_dependencies(
+    deps7.txt udeps7.txt cdeps7.txt
+    EXECUTABLES
+      "${CMAKE_INSTALL_PREFIX}/executable/bin/$<TARGET_FILE_NAME:topexe_weak>"
+    LIBRARIES
+      "${CMAKE_INSTALL_PREFIX}/executable/lib/$<TARGET_FILE_NAME:testlib_conflict>"
+    )
   ]])