From 15f55cca5971c93b1b6c950b9b7ca5a398140957 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 13 Nov 2014 08:53:51 -0500 Subject: [PATCH] Do not use just-built CMake to install itself when cross-compiling (#15248) The special case added by commit v2.4.0~3051 (When building CMake itself, use the new cmake to install so that the current cmake can be overwritten, 2004-06-09) does not make sense when cross-compiling. --- Source/cmGlobalGenerator.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 6a4adc0f4..978f00eb2 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2362,7 +2362,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