diff options
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 29ac5b1..51dac3a 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -99,7 +99,25 @@ void cmGlobalGenerator::FindMakeProgram(cmMakefile* mf) "make program", cmCacheManager::FILEPATH); } - + if(makeProgram.find("xcodebuild") != makeProgram.npos) + { + // due to the text file busy /bin/sh problem with xcodebuild + // use the cmakexbuild wrapper instead. This program + // will run xcodebuild and if it sees the error text file busy + // it will stop forwarding output, and let the build finish. + // Then it will retry the build. It will continue this + // untill no text file busy errors occur. + std::string cmakexbuild = + this->CMakeInstance->GetCacheManager()->GetCacheValue("CMAKE_COMMAND"); + cmakexbuild = cmakexbuild.substr(0, cmakexbuild.length()-5); + cmakexbuild += "cmakexbuild"; + + this->GetCMakeInstance()->AddCacheEntry("CMAKE_MAKE_PROGRAM", + cmakexbuild.c_str(), + "make program", + cmCacheManager::FILEPATH); + + } } // enable the given language @@ -1313,9 +1331,8 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) else { singleLine.push_back(cmakeCommand); - singleLine.push_back("-H$(CMAKE_SOURCE_DIR)"); - singleLine.push_back("-B$(CMAKE_BINARY_DIR)"); singleLine.push_back("-i"); + singleLine.push_back("."); cpackCommandLines.push_back(singleLine); (*targets)[editCacheTargetName] = this->CreateGlobalTarget( |