This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, next has been updated via 718c6e8e33bfb666e7482504f429409df1c0b566 (commit) via aea1b03617bed037bbd12af36d7ef92feff0ba74 (commit) via e5cbec14a5aec9203bd0e29fa0172fa00c97e521 (commit) via 0ca122fcb3df3331a6daaeec090bd967daa0f2b9 (commit) from a0e599587c8ddd4898d6019fab52f01f9ddec4d3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=718c6e8e33bfb666e7482504f429409df1c0b566 commit 718c6e8e33bfb666e7482504f429409df1c0b566 Merge: a0e5995 aea1b03 Author: Brad King <brad.k...@kitware.com> AuthorDate: Fri Jan 15 10:23:56 2016 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Fri Jan 15 10:23:56 2016 -0500 Merge topic 'export-static-private-depend' into next aea1b036 Fix export of STATIC library PRIVATE dependencies with CMP0022 NEW e5cbec14 Tests: Use CMP0022 NEW behavior in some ExportImport cases 0ca122fc Tests: Isolate policy changes in ExportImport test https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aea1b03617bed037bbd12af36d7ef92feff0ba74 commit aea1b03617bed037bbd12af36d7ef92feff0ba74 Author: Brad King <brad.k...@kitware.com> AuthorDate: Fri Jan 15 10:02:52 2016 -0500 Commit: Brad King <brad.k...@kitware.com> CommitDate: Fri Jan 15 10:18:53 2016 -0500 Fix export of STATIC library PRIVATE dependencies with CMP0022 NEW The target_link_libraries command records the PRIVATE dependencies of a STATIC library in INTERFACE_LINK_LIBRARIES as "$<LINK_ONLY:dep>". This hides the target name from export namespacing logic inside a generator expression. When user-written generator expressions reference a target name they must put it inside a "$<TARGET_NAME:dep>" expression to allow the export logic to rename the target. In the case that the private dependency is not already a generator expression, target_link_libraries must use "$<LINK_ONLY:$<TARGET_NAME:dep>>" to allow the export logic to rename the target. Reported-by: Tamás Kenéz <tamas.ke...@gmail.com> diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index 435346a..5f3246a 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -432,8 +432,11 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib, { std::string configLib = this->Target ->GetDebugGeneratorExpressions(lib, llt); - if (cmGeneratorExpression::IsValidTargetName(lib) - || cmGeneratorExpression::Find(lib) != std::string::npos) + if (cmGeneratorExpression::IsValidTargetName(configLib)) + { + configLib = "$<LINK_ONLY:$<TARGET_NAME:" + configLib + ">>"; + } + else if (cmGeneratorExpression::Find(configLib) != std::string::npos) { configLib = "$<LINK_ONLY:" + configLib + ">"; } diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt index 9c50d6c..c2ecb0b 100644 --- a/Tests/ExportImport/Export/CMakeLists.txt +++ b/Tests/ExportImport/Export/CMakeLists.txt @@ -136,6 +136,8 @@ cmake_policy(SET CMP0022 NEW) add_library(testLibRequired testLibRequired.c) add_library(testLibDepends testLibDepends.c) target_link_libraries(testLibDepends LINK_PUBLIC testLibRequired) +add_library(testStaticLibRequiredPrivate testStaticLibRequiredPrivate.c) +target_link_libraries(testLibDepends PRIVATE testStaticLibRequiredPrivate) cmake_policy(POP) macro(add_include_lib _libName) @@ -394,6 +396,10 @@ install(TARGETS INCLUDES DESTINATION $<INSTALL_PREFIX>/include/$<TARGET_PROPERTY:NAME> ) +install(TARGETS + testStaticLibRequiredPrivate + EXPORT RequiredExp DESTINATION lib +) install(EXPORT RequiredExp NAMESPACE Req:: FILE testLibRequiredTargets.cmake DESTINATION lib/cmake/testLibRequired) file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest") diff --git a/Tests/ExportImport/Export/testLibDepends.c b/Tests/ExportImport/Export/testLibDepends.c index fb5a002..3c7774e 100644 --- a/Tests/ExportImport/Export/testLibDepends.c +++ b/Tests/ExportImport/Export/testLibDepends.c @@ -16,5 +16,10 @@ #endif extern int testLibRequired(void); +extern int testStaticLibRequiredPrivate(void); -int testLibDepends(void) { return testLibRequired(); } +int testLibDepends(void) { + return testLibRequired() + + testStaticLibRequiredPrivate() + ; +} diff --git a/Tests/ExportImport/Export/testStaticLibRequiredPrivate.c b/Tests/ExportImport/Export/testStaticLibRequiredPrivate.c new file mode 100644 index 0000000..28a2675 --- /dev/null +++ b/Tests/ExportImport/Export/testStaticLibRequiredPrivate.c @@ -0,0 +1 @@ +int testStaticLibRequiredPrivate(void) { return 0; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e5cbec14a5aec9203bd0e29fa0172fa00c97e521 commit e5cbec14a5aec9203bd0e29fa0172fa00c97e521 Author: Brad King <brad.k...@kitware.com> AuthorDate: Fri Jan 15 09:49:21 2016 -0500 Commit: Brad King <brad.k...@kitware.com> CommitDate: Fri Jan 15 09:56:01 2016 -0500 Tests: Use CMP0022 NEW behavior in some ExportImport cases diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt index 9b6a543..9c50d6c 100644 --- a/Tests/ExportImport/Export/CMakeLists.txt +++ b/Tests/ExportImport/Export/CMakeLists.txt @@ -130,10 +130,13 @@ set_property(TARGET testLibCycleA PROPERTY LINK_INTERFACE_MULTIPLICITY 3) add_library(testLibNoSONAME SHARED testLibNoSONAME.c) set_property(TARGET testLibNoSONAME PROPERTY NO_SONAME 1) +cmake_policy(PUSH) +cmake_policy(SET CMP0022 NEW) # Test exporting dependent libraries into different exports add_library(testLibRequired testLibRequired.c) add_library(testLibDepends testLibDepends.c) target_link_libraries(testLibDepends LINK_PUBLIC testLibRequired) +cmake_policy(POP) macro(add_include_lib _libName) file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${_libName}.c" "/* no content */\n") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0ca122fcb3df3331a6daaeec090bd967daa0f2b9 commit 0ca122fcb3df3331a6daaeec090bd967daa0f2b9 Author: Brad King <brad.k...@kitware.com> AuthorDate: Fri Jan 15 09:54:56 2016 -0500 Commit: Brad King <brad.k...@kitware.com> CommitDate: Fri Jan 15 09:55:26 2016 -0500 Tests: Isolate policy changes in ExportImport test Use cmake_policy(PUSH/POP) to isolate CMP0022 policy changes. diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt index dcba9ac..9b6a543 100644 --- a/Tests/ExportImport/Export/CMakeLists.txt +++ b/Tests/ExportImport/Export/CMakeLists.txt @@ -270,6 +270,7 @@ install(FILES DESTINATION include/testSharedLibRequiredUser ) +cmake_policy(PUSH) cmake_policy(SET CMP0022 NEW) add_library(testSharedLibRequiredUser2 SHARED testSharedLibRequiredUser2.cpp) generate_export_header(testSharedLibRequiredUser2) @@ -283,7 +284,7 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/testsharedlibrequireduser2_export.h" DESTINATION include/testSharedLibRequiredUser2 ) -cmake_policy(SET CMP0022 OLD) +cmake_policy(POP) add_library(testSharedLibDepends SHARED testSharedLibDepends.cpp) set_property(TARGET testSharedLibDepends APPEND PROPERTY @@ -311,6 +312,8 @@ target_link_libraries(testSharedLibDepends LINK_PUBLIC renamed_on_export) target_link_libraries(testSharedLibDepends LINK_INTERFACE_LIBRARIES $<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:$<TARGET_NAME:testSharedLibRequired>>) +cmake_policy(PUSH) +cmake_policy(SET CMP0022 OLD) add_library(cmp0022OLD SHARED cmp0022_vs6_1.cpp) generate_export_header(cmp0022OLD BASE_NAME cmp0022) target_include_directories(cmp0022OLD PUBLIC @@ -324,7 +327,7 @@ target_include_directories(cmp0022NEW PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}>" "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/cmp0022>" ) -cmake_policy(SET CMP0022 OLD) +cmake_policy(POP) install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/cmp0022.h" "${CMAKE_CURRENT_BINARY_DIR}/cmp0022_export.h" ----------------------------------------------------------------------- Summary of changes: Source/cmTargetLinkLibrariesCommand.cxx | 7 +++++-- Tests/ExportImport/Export/CMakeLists.txt | 16 ++++++++++++++-- Tests/ExportImport/Export/testLibDepends.c | 7 ++++++- .../ExportImport/Export/testStaticLibRequiredPrivate.c | 1 + 4 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 Tests/ExportImport/Export/testStaticLibRequiredPrivate.c hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits