CMake/Tests/ObjectLibrary
Brad King b237dbd8c3 Xcode: Fix object library references in multi-project trees (#13452)
In cmGlobalXCodeGenerator::Generate we generate a .xcodeproj for each
directory in the tree containing a project() command.  First we
iteratively use SetGenerationRoot to add "ALL_BUILD" and other targets
to each project.  This leaves "CurrentProject" set to the last project
when we invoke cmGlobalGenerator::Generate, which is not the same as the
top-level project if any subdirectories invoke the project() command.

When cmGlobalGenerator::Generate reaches CreateGeneratorTargets it
constructs cmGeneratorTarget and calls ComputeTargetObjects exactly once
per target.  In this context the value of CurrentProject is undefined so
we cannot pass it to GetObjectsNormalDirectory.  Use "$(PROJECT_NAME)"
instead so it will adapt automatically to each project.

Also teach Tests/ObjectLibrary to cover this case.
2012-08-03 10:17:49 -04:00
..
A Xcode: Fix object library references in multi-project trees (#13452) 2012-08-03 10:17:49 -04:00
B Xcode: Fix object library references in multi-project trees (#13452) 2012-08-03 10:17:49 -04:00
AB.def Test OBJECT library use without other sources 2012-03-16 10:12:30 -04:00
CMakeLists.txt Test OBJECT library use without other sources 2012-03-16 10:12:30 -04:00
c.c Test OBJECT library success cases 2012-03-16 10:12:30 -04:00
dummy.c Test OBJECT library use without other sources 2012-03-16 10:12:30 -04:00
dummy.obj Test OBJECT library use without other sources 2012-03-16 10:12:30 -04:00
main.c Test OBJECT library success cases 2012-03-16 10:12:30 -04:00
mainAB.c Test OBJECT library use without other sources 2012-03-16 10:12:30 -04:00