CMake/Tests/RunCMake/add_library
Deniz Bahadir 4e7f67383f 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
2017-10-24 08:14:47 -04:00
..
CMakeLists.txt
INTERFACEwithNoSources.cmake
INTERFACEwithNoSourcesButLinkObjects.cmake
INTERFACEwithOnlyObjectSources.cmake
MODULEwithNoSources-result.txt
MODULEwithNoSources-stderr.txt
MODULEwithNoSources.cmake
MODULEwithNoSourcesButLinkObjects-result.txt
MODULEwithNoSourcesButLinkObjects-stderr.txt
MODULEwithNoSourcesButLinkObjects.cmake
MODULEwithOnlyObjectSources.cmake
OBJECTwithNoSources-result.txt
OBJECTwithNoSources-stderr.txt
OBJECTwithNoSources.cmake
OBJECTwithNoSourcesButLinkObjects-result.txt
OBJECTwithNoSourcesButLinkObjects-stderr.txt
OBJECTwithNoSourcesButLinkObjects.cmake
OBJECTwithOnlyObjectSources-result.txt
OBJECTwithOnlyObjectSources-stderr.txt
OBJECTwithOnlyObjectSources.cmake
RunCMakeTest.cmake
SHAREDwithNoSources-result.txt
SHAREDwithNoSources-stderr.txt
SHAREDwithNoSources.cmake
SHAREDwithNoSourcesButLinkObjects-result.txt
SHAREDwithNoSourcesButLinkObjects-stderr.txt
SHAREDwithNoSourcesButLinkObjects.cmake
SHAREDwithOnlyObjectSources.cmake
STATICwithNoSources-result.txt
STATICwithNoSources-stderr.txt
STATICwithNoSources.cmake
STATICwithNoSourcesButLinkObjects-result.txt
STATICwithNoSourcesButLinkObjects-stderr.txt
STATICwithNoSourcesButLinkObjects.cmake
STATICwithOnlyObjectSources.cmake
test.cpp
UNKNOWNwithNoSources.cmake
UNKNOWNwithNoSourcesButLinkObjects-result.txt
UNKNOWNwithNoSourcesButLinkObjects-stderr.txt
UNKNOWNwithNoSourcesButLinkObjects.cmake
UNKNOWNwithOnlyObjectSources-result.txt
UNKNOWNwithOnlyObjectSources-stderr.txt
UNKNOWNwithOnlyObjectSources.cmake