summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/TargetObjects
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2019-04-03 18:42:35 (GMT)
committerRobert Maynard <robert.maynard@kitware.com>2019-04-19 17:52:50 (GMT)
commitce078dda79df1c8d9f142e45d2fa3cf971a09594 (patch)
treeea3941cabdb1df8f5dbefc29223f9f2bfc1e8d8d /Tests/RunCMake/TargetObjects
parent3e129d71bc12a325c0548aaaea24470cd172470b (diff)
downloadCMake-ce078dda79df1c8d9f142e45d2fa3cf971a09594.zip
CMake-ce078dda79df1c8d9f142e45d2fa3cf971a09594.tar.gz
CMake-ce078dda79df1c8d9f142e45d2fa3cf971a09594.tar.bz2
Relax the usage of TARGET_OBJECTS generator expression
The geneator expression can now be used with static, shared, and module libraries and executables.
Diffstat (limited to 'Tests/RunCMake/TargetObjects')
-rw-r--r--Tests/RunCMake/TargetObjects/NotObjlibTarget-stderr.txt9
-rw-r--r--Tests/RunCMake/TargetObjects/NotObjlibTarget.cmake4
2 files changed, 7 insertions, 6 deletions
diff --git a/Tests/RunCMake/TargetObjects/NotObjlibTarget-stderr.txt b/Tests/RunCMake/TargetObjects/NotObjlibTarget-stderr.txt
index a66794c..77c4afd 100644
--- a/Tests/RunCMake/TargetObjects/NotObjlibTarget-stderr.txt
+++ b/Tests/RunCMake/TargetObjects/NotObjlibTarget-stderr.txt
@@ -1,8 +1,9 @@
-CMake Error at NotObjlibTarget.cmake:3 \(file\):
+CMake Error at NotObjlibTarget.cmake:[0-9]+ \(file\):
Error evaluating generator expression:
- \$<TARGET_OBJECTS:StaticLib>
+ \$<TARGET_OBJECTS:IFaceLib>
- Objects of target "StaticLib" referenced but is not an OBJECT library.
+ Objects of target "IFaceLib" referenced but is not an allowed library types
+ \(EXECUTABLE, STATIC, SHARED, MODULE, OBJECT\).
Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/TargetObjects/NotObjlibTarget.cmake b/Tests/RunCMake/TargetObjects/NotObjlibTarget.cmake
index 3bb3e37..9fec369 100644
--- a/Tests/RunCMake/TargetObjects/NotObjlibTarget.cmake
+++ b/Tests/RunCMake/TargetObjects/NotObjlibTarget.cmake
@@ -1,3 +1,3 @@
-add_library(StaticLib empty.cpp)
+add_library(IFaceLib INTERFACE )
-file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/test_output CONTENT $<TARGET_OBJECTS:StaticLib>)
+file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/test_output CONTENT $<TARGET_OBJECTS:IFaceLib>)