Files
CMake/Tests/CMakeCommands/target_link_libraries/TopDir.c
T
Brad King e27a76f131 target_link_libraries: Restore transitive out-of-dir linking
Refactoring in commit 7f506b95a7 (cmGeneratorTarget: Refactor link item
lookup, 2021-05-26, v3.21.0-rc1~103^2~4) accidentally dropped the
persistent lookup scope tracking across multiple items that was added by
commit f0e67da061 (target_link_libraries: Fix out-of-dir linking of a
list of targets, 2020-01-14, v3.17.0-rc1~149^2).  This broke a
transitive out-of-dir linking case not covered by our test suite.
Restore the scope tracking and add a test case.

Fixes: #22363
2021-06-29 16:52:12 -04:00

27 lines
731 B
C

#ifndef DEF_SameNameImportedSubDirA
# error "DEF_SameNameImportedSubDirA is not defined but should be!"
#endif
#ifndef DEF_SameNameImportedSubDirB
# error "DEF_SameNameImportedSubDirB is not defined but should be!"
#endif
#ifndef DEF_SameNameImported2SubDirA
# error "DEF_SameNameImported2SubDirA is not defined but should be!"
#endif
#ifndef DEF_SameNameImported2SubDirB
# error "DEF_SameNameImported2SubDirB is not defined but should be!"
#endif
#ifdef DEF_TopDirImported
# error "DEF_TopDirImported is defined but should not be!"
#endif
#ifdef DEF_SubDirC1
# error "DEF_SubDirC1 defined but should not be"
#endif
#ifdef DEF_SubDirC2
# error "DEF_SubDirC2 defined but should not be"
#endif
int main(void)
{
return 0;
}