summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/add_library/OBJECTwithNoSourcesButLinkObjects-stderr.txt
diff options
context:
space:
mode:
authorDeniz Bahadir <dbahadir@benocs.com>2017-10-19 14:31:10 +0200
committerBrad King <brad.king@kitware.com>2017-10-24 08:14:47 -0400
commit4e7f67383f297d708efbb6640c9bee188a127d4e (patch)
tree4aba6cacdf3974f6bfbb4cb5908a37011a5ed33c /Tests/RunCMake/add_library/OBJECTwithNoSourcesButLinkObjects-stderr.txt
parent6e4e7c6547fb4d379d564340d015af20e4a4e892 (diff)
downloadcmake-4e7f67383f297d708efbb6640c9bee188a127d4e.tar.gz
Defer check for sources within a target until generation.
The `add_library` and `add_executable` commands can now be called with no source-files and won't generate a warning or error message, as long as source-files will be added later via the `target_sources` command. If during the generation step still no sources are associated with targets created by such calls a useful error message will be generated and generation fails. Targets of type `INTERFACE_LIBRARY`, `UTILITY` or `GLOBAL_TARGET` are excluded from this check because we do not need sources for these target types during generation. Fixes: #16872
Diffstat (limited to 'Tests/RunCMake/add_library/OBJECTwithNoSourcesButLinkObjects-stderr.txt')
-rw-r--r--Tests/RunCMake/add_library/OBJECTwithNoSourcesButLinkObjects-stderr.txt3
1 files changed, 1 insertions, 2 deletions
diff --git a/Tests/RunCMake/add_library/OBJECTwithNoSourcesButLinkObjects-stderr.txt b/Tests/RunCMake/add_library/OBJECTwithNoSourcesButLinkObjects-stderr.txt
index 8f20096167..cd6f1e0528 100644
--- a/Tests/RunCMake/add_library/OBJECTwithNoSourcesButLinkObjects-stderr.txt
+++ b/Tests/RunCMake/add_library/OBJECTwithNoSourcesButLinkObjects-stderr.txt
@@ -1,5 +1,4 @@
-^You have called ADD_LIBRARY for library TestObjectLibWithoutSources without any source files. This typically indicates a problem with your CMakeLists.txt file
-CMake Error at OBJECTwithNoSourcesButLinkObjects.cmake:[0-9]+ \(target_link_libraries\):
+^CMake Error at OBJECTwithNoSourcesButLinkObjects.cmake:[0-9]+ \(target_link_libraries\):
Object library target \"TestObjectLibWithoutSources\" may not link to
anything.
Call Stack \(most recent call first\):