• Brad King's avatar
    Xcode: Fix object library references in multi-project trees (#13452) · b237dbd8
    Brad King authored
    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.
    b237dbd8
Name
Last commit
Last update
Docs Loading commit data...
Example Loading commit data...
Modules Loading commit data...
Source Loading commit data...
Templates Loading commit data...
Tests Loading commit data...
Utilities Loading commit data...
.gitattributes Loading commit data...
.hooks-config.bash Loading commit data...
CMakeCPack.cmake Loading commit data...
CMakeCPackOptions.cmake.in Loading commit data...
CMakeGraphVizOptions.cmake Loading commit data...
CMakeLists.txt Loading commit data...
CMakeLogo.gif Loading commit data...
CTestConfig.cmake Loading commit data...
CTestCustom.cmake.in Loading commit data...
CTestCustom.ctest.in Loading commit data...
ChangeLog.manual Loading commit data...
ChangeLog.txt Loading commit data...
CompileFlags.cmake Loading commit data...
Copyright.txt Loading commit data...
DartConfig.cmake Loading commit data...
DartLocal.conf.in Loading commit data...
Readme.txt Loading commit data...
bootstrap Loading commit data...
cmake_uninstall.cmake.in Loading commit data...
configure Loading commit data...
doxygen.config Loading commit data...