summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-11-13 13:53:51 (GMT)
committerBrad King <brad.king@kitware.com>2014-11-13 13:58:16 (GMT)
commit15f55cca5971c93b1b6c950b9b7ca5a398140957 (patch)
tree3c251ecfb264f4a899a96cffc9cd979ff3506a44 /Source/cmGlobalGenerator.cxx
parent54ff77dc621a91302abad0ab38d9bd26de8914b9 (diff)
downloadCMake-15f55cca5971c93b1b6c950b9b7ca5a398140957.zip
CMake-15f55cca5971c93b1b6c950b9b7ca5a398140957.tar.gz
CMake-15f55cca5971c93b1b6c950b9b7ca5a398140957.tar.bz2
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.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 6a4adc0..978f00e 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