summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:20:34 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:20:34 +0900
commit869d410f54c1595f01a41306c6ed9c6dd0455c36 (patch)
tree4085ca73037995ec40069dda360f708dcfb83302
parent7433c268f8cc770bf1cc0593fd15f26763033f81 (diff)
downloadcmake-869d410f54c1595f01a41306c6ed9c6dd0455c36.tar.gz
cmake-869d410f54c1595f01a41306c6ed9c6dd0455c36.tar.bz2
cmake-869d410f54c1595f01a41306c6ed9c6dd0455c36.zip
Imported Upstream version 3.19.4upstream/3.19.4
-rw-r--r--Help/prop_gbl/GENERATOR_IS_MULTI_CONFIG.rst8
-rw-r--r--Help/release/3.19.rst8
-rw-r--r--Help/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM.rst2
-rw-r--r--Modules/FindHDF5.cmake8
-rw-r--r--Modules/GetPrerequisites.cmake2
-rw-r--r--Modules/InstallRequiredSystemLibraries.cmake2
-rw-r--r--Modules/Platform/Linux-Intel-Fortran.cmake2
-rw-r--r--Source/CMakeVersion.cmake4
-rw-r--r--Source/Checks/cm_cxx_features.cmake8
-rw-r--r--Source/cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.cxx2
-rw-r--r--Source/cmGlobalVisualStudio14Generator.cxx6
-rw-r--r--Source/cmGlobalVisualStudio14Generator.h6
-rw-r--r--Source/cmGlobalVisualStudioVersionedGenerator.cxx3
-rw-r--r--Source/cmGlobalVisualStudioVersionedGenerator.h2
-rw-r--r--Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-all-check.cmake22
-rw-r--r--Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos.cmake15
16 files changed, 83 insertions, 17 deletions
diff --git a/Help/prop_gbl/GENERATOR_IS_MULTI_CONFIG.rst b/Help/prop_gbl/GENERATOR_IS_MULTI_CONFIG.rst
index 6f1a9e185..761a1dd2a 100644
--- a/Help/prop_gbl/GENERATOR_IS_MULTI_CONFIG.rst
+++ b/Help/prop_gbl/GENERATOR_IS_MULTI_CONFIG.rst
@@ -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`.
diff --git a/Help/release/3.19.rst b/Help/release/3.19.rst
index 7ad27c89f..d819e8ce1 100644
--- a/Help/release/3.19.rst
+++ b/Help/release/3.19.rst
@@ -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.
diff --git a/Help/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM.rst b/Help/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM.rst
index 591ea914d..d9f136c60 100644
--- a/Help/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM.rst
+++ b/Help/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM.rst
@@ -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
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 25f5a1f0a..38388d998 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -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()
diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake
index c99c7725a..2d4765aaa 100644
--- a/Modules/GetPrerequisites.cmake
+++ b/Modules/GetPrerequisites.cmake
@@ -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)
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index caca6977b..29d1ec0e7 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -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"
)
diff --git a/Modules/Platform/Linux-Intel-Fortran.cmake b/Modules/Platform/Linux-Intel-Fortran.cmake
index d8e94d0de..a99e79342 100644
--- a/Modules/Platform/Linux-Intel-Fortran.cmake
+++ b/Modules/Platform/Linux-Intel-Fortran.cmake
@@ -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 "")
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index efdc0bfbd..2b6c3819e 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 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]* "
diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake
index 663d89a96..7917d41fa 100644
--- a/Source/Checks/cm_cxx_features.cmake
+++ b/Source/Checks/cm_cxx_features.cmake
@@ -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()
diff --git a/Source/cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.cxx b/Source/cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.cxx
index 351d92aa8..6d97720c2 100644
--- a/Source/cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.cxx
+++ b/Source/cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.cxx
@@ -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(
diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx
index e17c6d766..b46f1b9b0 100644
--- a/Source/cmGlobalVisualStudio14Generator.cxx
+++ b/Source/cmGlobalVisualStudio14Generator.cxx
@@ -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
diff --git a/Source/cmGlobalVisualStudio14Generator.h b/Source/cmGlobalVisualStudio14Generator.h
index 1ccd4c73b..7804b83cb 100644
--- a/Source/cmGlobalVisualStudio14Generator.h
+++ b/Source/cmGlobalVisualStudio14Generator.h
@@ -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);
diff --git a/Source/cmGlobalVisualStudioVersionedGenerator.cxx b/Source/cmGlobalVisualStudioVersionedGenerator.cxx
index 95357e7dc..84f870ea6 100644
--- a/Source/cmGlobalVisualStudioVersionedGenerator.cxx
+++ b/Source/cmGlobalVisualStudioVersionedGenerator.cxx
@@ -540,7 +540,8 @@ bool cmGlobalVisualStudioVersionedGenerator::IsWin81SDKInstalled() const
return false;
}
-std::string cmGlobalVisualStudioVersionedGenerator::GetWindows10SDKMaxVersion(
+std::string
+cmGlobalVisualStudioVersionedGenerator::GetWindows10SDKMaxVersionDefault(
cmMakefile*) const
{
return std::string();
diff --git a/Source/cmGlobalVisualStudioVersionedGenerator.h b/Source/cmGlobalVisualStudioVersionedGenerator.h
index af09cbd86..46a5f40e5 100644
--- a/Source/cmGlobalVisualStudioVersionedGenerator.h
+++ b/Source/cmGlobalVisualStudioVersionedGenerator.h
@@ -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;
diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-all-check.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-all-check.cmake
index e6f2623c5..e7cdbf66f 100644
--- a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-all-check.cmake
+++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos-all-check.cmake
@@ -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}")
diff --git a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos.cmake b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos.cmake
index c56a14b6c..aab19b764 100644
--- a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos.cmake
+++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/macos.cmake
@@ -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>"
+ )
]])