summaryrefslogtreecommitdiffstats
path: root/Tests/ExportImport/Export/testStaticLibRequiredPrivate.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-01-15 15:02:52 (GMT)
committerBrad King <brad.king@kitware.com>2016-01-15 15:18:53 (GMT)
commitaea1b03617bed037bbd12af36d7ef92feff0ba74 (patch)
tree818a548be8f6d180879ddb2b1c83a126fec55707 /Tests/ExportImport/Export/testStaticLibRequiredPrivate.c
parente5cbec14a5aec9203bd0e29fa0172fa00c97e521 (diff)
downloadCMake-aea1b03617bed037bbd12af36d7ef92feff0ba74.zip
CMake-aea1b03617bed037bbd12af36d7ef92feff0ba74.tar.gz
CMake-aea1b03617bed037bbd12af36d7ef92feff0ba74.tar.bz2
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.kenez@gmail.com>
Diffstat (limited to 'Tests/ExportImport/Export/testStaticLibRequiredPrivate.c')
-rw-r--r--Tests/ExportImport/Export/testStaticLibRequiredPrivate.c1
1 files changed, 1 insertions, 0 deletions
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; }