Files
cmake/Tests/RunCMake/FASTBuild/InterfaceWithPrivateSource.cmake
T
Eduard Voronkin af8f4ca675 FASTBuild: fix iface targets with private sources
When `PRIVATE` sources are added to an `INTERFACE`
target A and A is a dependency of B - the target A
ends up in "direct dependencies" of the B targets
and it messes up the generated `fbuild.bff` file.

Fixes: #27644
2026-02-27 10:13:14 -05:00

7 lines
189 B
CMake

add_library(iface_lib INTERFACE EXCLUDE_FROM_ALL)
target_sources(iface_lib PRIVATE header.hpp)
add_library(static_lib STATIC main.cpp)
target_link_libraries(static_lib PRIVATE iface_lib)