Merge topic 'no-cmake-self-install-when-cross-compiling'

15f55cca Do not use just-built CMake to install itself when cross-compiling (#15248)
This commit is contained in:
Brad King 2014-11-14 10:56:39 -05:00 committed by CMake Topic Stage
commit 810ef59a42
1 changed files with 2 additions and 1 deletions

View File

@ -2372,7 +2372,8 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
depends.push_back(this->GetAllTargetName());
}
}
if(mf->GetDefinition("CMake_BINARY_DIR"))
if(mf->GetDefinition("CMake_BINARY_DIR") &&
!mf->IsOn("CMAKE_CROSSCOMPILING"))
{
// We are building CMake itself. We cannot use the original
// executable to install over itself. The generator will