summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-11-13 08:53:51 -0500
committerBrad King <brad.king@kitware.com>2014-11-13 08:58:16 -0500
commit15f55cca5971c93b1b6c950b9b7ca5a398140957 (patch)
tree3c251ecfb264f4a899a96cffc9cd979ff3506a44
parent54ff77dc621a91302abad0ab38d9bd26de8914b9 (diff)
downloadcmake-15f55cca5971c93b1b6c950b9b7ca5a398140957.tar.gz
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.
-rw-r--r--Source/cmGlobalGenerator.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 6a4adc0f48..978f00eb26 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