mirror of
https://github.com/reactos/CMake.git
synced 2024-12-13 14:27:23 +00:00
4e7f67383f
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
17 lines
593 B
Plaintext
17 lines
593 B
Plaintext
^CMake Error at OBJECTwithOnlyObjectSources.cmake:[0-9]+ \(add_library\):
|
|
OBJECT library \"TestObjectLibWithoutSources\" contains:
|
|
|
|
[^
|
|
]*test(\.cpp)?\.o(bj)?
|
|
|
|
but may contain only sources that compile, header files, and other files
|
|
that would not affect linking of a normal library.
|
|
Call Stack \(most recent call first\):
|
|
CMakeLists.txt:[0-9]+ \(include\)
|
|
|
|
|
|
CMake Error at OBJECTwithOnlyObjectSources.cmake:[0-9]+ \(add_library\):
|
|
Only executables and non-OBJECT libraries may reference target objects.
|
|
Call Stack \(most recent call first\):
|
|
CMakeLists.txt:[0-9]+ \(include\)$
|