diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-05-24 12:43:31 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-05-24 12:43:31 (GMT) |
commit | 79756b0e676c9e5e02ad13039ad092b78f64f63d (patch) | |
tree | 033fdc6513036fa3adafd205956903b25c285020 | |
parent | e10e3bc86edd3b319f036a5e33a428863d0e91f8 (diff) | |
download | CMake-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
-rw-r--r-- | Source/cmLocalGenerator.cxx | 8 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio6Generator.cxx | 1 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 1 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 6 |
4 files changed, 9 insertions, 7 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 ); } diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx index 41f00a6..25e3253 100644 --- a/Source/cmLocalVisualStudio6Generator.cxx +++ b/Source/cmLocalVisualStudio6Generator.cxx @@ -106,7 +106,6 @@ void cmLocalVisualStudio6Generator::OutputDSPFile() // clear project names this->CreatedProjectNames.clear(); - // Call TraceVSDependencies on all targets cmTargets &tgts = this->Makefile->GetTargets(); for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); l++) diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index f3b594d..54866e5 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -113,7 +113,6 @@ void cmLocalVisualStudio7Generator::OutputVCProjFile() // Create the VCProj or set of VCProj's for libraries and executables - // Call TraceVSDependencies on all targets cmTargets &tgts = this->Makefile->GetTargets(); for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); l++) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 6d9b419..ac8d34b 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -547,9 +547,9 @@ void cmTarget::TraceVSDependencies(std::string projFile, } } - CheckForTargetsAsCommand(this->GetPreBuildCommands()); - CheckForTargetsAsCommand(this->GetPreLinkCommands()); - CheckForTargetsAsCommand(this->GetPostBuildCommands()); + this->CheckForTargetsAsCommand(this->GetPreBuildCommands()); + this->CheckForTargetsAsCommand(this->GetPreLinkCommands()); + this->CheckForTargetsAsCommand(this->GetPostBuildCommands()); while (!srcFilesToProcess.empty()) { |