summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-05-24 12:43:31 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-05-24 12:43:31 (GMT)
commit79756b0e676c9e5e02ad13039ad092b78f64f63d (patch)
tree033fdc6513036fa3adafd205956903b25c285020 /Source/cmLocalGenerator.cxx
parente10e3bc86edd3b319f036a5e33a428863d0e91f8 (diff)
downloadCMake-79756b0e676c9e5e02ad13039ad092b78f64f63d.zip
CMake-79756b0e676c9e5e02ad13039ad092b78f64f63d.tar.gz
CMake-79756b0e676c9e5e02ad13039ad092b78f64f63d.tar.bz2
BUG: don't use non-imported target when cross compiling as commands in custom commands
STYLE: remove now invalid comments, use this-> Alex
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 8d29344..bc0aca4 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2024,9 +2024,13 @@ std::string cmLocalGenerator::GetRealLocation(const char* inName,
const char* config)
{
std::string outName=inName;
- // Look for a CMake target with the given name.
+ // Look for a CMake target with the given name, which is an executable
+ // and which can be run
cmTarget* target = this->GlobalGenerator->FindTarget(0, inName, true);
- if ((target != 0) && (target->GetType() == cmTarget::EXECUTABLE))
+ if ((target != 0)
+ && (target->GetType() == cmTarget::EXECUTABLE)
+ && ((this->Makefile->IsOn("CMAKE_CROSSCOMPILING") == false)
+ || (target->IsImported() == true)))
{
outName = target->GetLocation( config );
}