diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-08 09:13:41 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-08 09:13:41 +0900 |
commit | 4ca455f44f42bf3257fe1ce752ca7447e9568a27 (patch) | |
tree | 4a6eff60bff6c55a37c5fa7fcacfb4515ffb7352 | |
parent | 5e0b8c3fb67987a77056099c684318ef5d707920 (diff) | |
download | cmake-4ca455f44f42bf3257fe1ce752ca7447e9568a27.tar.gz cmake-4ca455f44f42bf3257fe1ce752ca7447e9568a27.tar.bz2 cmake-4ca455f44f42bf3257fe1ce752ca7447e9568a27.zip |
Imported Upstream version 3.13.5upstream/3.13.5
-rw-r--r-- | Help/release/3.13.rst | 9 | ||||
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/cmTargetLinkLibrariesCommand.cxx | 4 | ||||
-rw-r--r-- | Tests/CMakeCommands/target_link_libraries/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/CMakeCommands/target_link_libraries/SubDirC/CMakeLists.txt | 9 | ||||
-rw-r--r-- | Tests/CMakeCommands/target_link_libraries/SubDirC/SubDirC.c | 11 | ||||
-rw-r--r-- | Tests/CMakeCommands/target_link_libraries/TopDir.c | 6 | ||||
-rw-r--r-- | Utilities/Release/WiX/WIX.template.in | 2 |
8 files changed, 44 insertions, 3 deletions
diff --git a/Help/release/3.13.rst b/Help/release/3.13.rst index 1c58550ff..a8dd0baf7 100644 --- a/Help/release/3.13.rst +++ b/Help/release/3.13.rst @@ -278,3 +278,12 @@ Changes made since CMake 3.13.0 include the following. relying on the old behavior can be trivially fixed by specifying the path to the source tree (even if just ``.``) explicitly and continue to work with all versions of CMake. + +3.13.5 +------ + +* In CMake 3.13.0 through 3.13.4, calling :command:`target_link_libraries` + to add ``PRIVATE`` dependencies to a static library created in another + directory (under policy :policy:`CMP0079` ``NEW`` behavior) would + incorrectly propagate usage requirements of those dependencies to + dependents that link the static library. This has been fixed. diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 025ce327c..fcd262572 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 13) -set(CMake_VERSION_PATCH 4) +set(CMake_VERSION_PATCH 5) #set(CMake_VERSION_RC 0) diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index ad33f9850..ded683147 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -452,8 +452,8 @@ bool cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib, if (this->Target->GetType() == cmStateEnums::STATIC_LIBRARY) { std::string configLib = this->Target->GetDebugGeneratorExpressions(libRef, llt); - if (cmGeneratorExpression::IsValidTargetName(libRef) || - cmGeneratorExpression::Find(libRef) != std::string::npos) { + if (cmGeneratorExpression::IsValidTargetName(lib) || + cmGeneratorExpression::Find(lib) != std::string::npos) { configLib = "$<LINK_ONLY:" + configLib + ">"; } this->Target->AppendProperty("INTERFACE_LINK_LIBRARIES", diff --git a/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt index 85ce1f785..5c704ac83 100644 --- a/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt +++ b/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt @@ -134,11 +134,15 @@ assert_property(newsignature1 LINK_LIBRARIES "depC;depB;subdirlib") #---------------------------------------------------------------------------- # Test cross-directory linking. cmake_policy(PUSH) +cmake_policy(SET CMP0022 NEW) cmake_policy(SET CMP0079 NEW) add_executable(TopDir TopDir.c) add_subdirectory(SubDirA) add_subdirectory(SubDirB) target_link_libraries(SubDirB TopDirImported) +add_subdirectory(SubDirC) +target_link_libraries(SubDirC PRIVATE SubDirC2) +target_link_libraries(TopDir SubDirC) add_library(TopDirImported IMPORTED INTERFACE) target_compile_definitions(TopDirImported INTERFACE DEF_TopDirImported) cmake_policy(POP) diff --git a/Tests/CMakeCommands/target_link_libraries/SubDirC/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/SubDirC/CMakeLists.txt new file mode 100644 index 000000000..54bcc5174 --- /dev/null +++ b/Tests/CMakeCommands/target_link_libraries/SubDirC/CMakeLists.txt @@ -0,0 +1,9 @@ +add_library(SubDirC STATIC SubDirC.c) + +add_library(SubDirC1 INTERFACE) +target_compile_definitions(SubDirC1 INTERFACE DEF_SubDirC1) + +add_library(SubDirC2 INTERFACE) +target_compile_definitions(SubDirC2 INTERFACE DEF_SubDirC2) + +target_link_libraries(SubDirC PRIVATE SubDirC1) diff --git a/Tests/CMakeCommands/target_link_libraries/SubDirC/SubDirC.c b/Tests/CMakeCommands/target_link_libraries/SubDirC/SubDirC.c new file mode 100644 index 000000000..c5536dccd --- /dev/null +++ b/Tests/CMakeCommands/target_link_libraries/SubDirC/SubDirC.c @@ -0,0 +1,11 @@ +#ifndef DEF_SubDirC1 +# error "DEF_SubDirC1 not defined" +#endif +#ifndef DEF_SubDirC2 +# error "DEF_SubDirC2 not defined" +#endif + +int SubDirC(void) +{ + return 0; +} diff --git a/Tests/CMakeCommands/target_link_libraries/TopDir.c b/Tests/CMakeCommands/target_link_libraries/TopDir.c index 4706bb94e..d8066e5ca 100644 --- a/Tests/CMakeCommands/target_link_libraries/TopDir.c +++ b/Tests/CMakeCommands/target_link_libraries/TopDir.c @@ -7,6 +7,12 @@ #ifdef DEF_TopDirImported # error "DEF_TopDirImported is defined but should not be!" #endif +#ifdef DEF_SubDirC1 +# error "DEF_SubDirC1 defined but should not be" +#endif +#ifdef DEF_SubDirC2 +# error "DEF_SubDirC2 defined but should not be" +#endif int main(void) { diff --git a/Utilities/Release/WiX/WIX.template.in b/Utilities/Release/WiX/WIX.template.in index fe176ca90..8abf9d8f2 100644 --- a/Utilities/Release/WiX/WIX.template.in +++ b/Utilities/Release/WiX/WIX.template.in @@ -20,6 +20,8 @@ Schedule="afterInstallInitialize" AllowDowngrades="yes"/> + <Property Id="REINSTALLMODE" Value="amus"/> + <WixVariable Id="WixUILicenseRtf" Value="$(var.CPACK_WIX_LICENSE_RTF)"/> <Property Id="WIXUI_INSTALLDIR" Value="INSTALL_ROOT"/> |