mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
Rather than injecting `CMakeLists.txt` files into each target's `SOURCES`, teach the generators to add them during generation using dedicated code. This avoids mutating the original targets, and avoids polluting `$<TARGET_PROPERTY:foo,SOURCES>` with generator-specific content. This also avoids listing the `CMakeLists.txt` sources in the results of `CMAKE_DEBUG_TARGET_PROPERTIES==SOURCES` so the `RunCMake.TargetSources` test no longer needs a separate case for IDEs.
7 lines
261 B
CMake
7 lines
261 B
CMake
file(READ ${RunCMake_TEST_BINARY_DIR}/foo.txt foo_sources)
|
|
|
|
set(foo_expected "empty.c;empty2.c;empty3.c")
|
|
if(NOT foo_sources STREQUAL foo_expected)
|
|
set(RunCMake_TEST_FAILED "foo SOURCES was:\n [[${foo_sources}]]\nbut expected:\n [[${foo_expected}]]")
|
|
endif()
|