BUG: don't use non-imported target when cross compiling as commands in custom commands
STYLE: remove now invalid comments, use this-> Alex
This commit is contained in:
parent
e10e3bc86e
commit
79756b0e67
|
@ -2024,9 +2024,13 @@ std::string cmLocalGenerator::GetRealLocation(const char* inName,
|
||||||
const char* config)
|
const char* config)
|
||||||
{
|
{
|
||||||
std::string outName=inName;
|
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);
|
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 );
|
outName = target->GetLocation( config );
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,6 @@ void cmLocalVisualStudio6Generator::OutputDSPFile()
|
||||||
|
|
||||||
// clear project names
|
// clear project names
|
||||||
this->CreatedProjectNames.clear();
|
this->CreatedProjectNames.clear();
|
||||||
// Call TraceVSDependencies on all targets
|
|
||||||
cmTargets &tgts = this->Makefile->GetTargets();
|
cmTargets &tgts = this->Makefile->GetTargets();
|
||||||
for(cmTargets::iterator l = tgts.begin();
|
for(cmTargets::iterator l = tgts.begin();
|
||||||
l != tgts.end(); l++)
|
l != tgts.end(); l++)
|
||||||
|
|
|
@ -113,7 +113,6 @@ void cmLocalVisualStudio7Generator::OutputVCProjFile()
|
||||||
|
|
||||||
// Create the VCProj or set of VCProj's for libraries and executables
|
// Create the VCProj or set of VCProj's for libraries and executables
|
||||||
|
|
||||||
// Call TraceVSDependencies on all targets
|
|
||||||
cmTargets &tgts = this->Makefile->GetTargets();
|
cmTargets &tgts = this->Makefile->GetTargets();
|
||||||
for(cmTargets::iterator l = tgts.begin();
|
for(cmTargets::iterator l = tgts.begin();
|
||||||
l != tgts.end(); l++)
|
l != tgts.end(); l++)
|
||||||
|
|
|
@ -547,9 +547,9 @@ void cmTarget::TraceVSDependencies(std::string projFile,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckForTargetsAsCommand(this->GetPreBuildCommands());
|
this->CheckForTargetsAsCommand(this->GetPreBuildCommands());
|
||||||
CheckForTargetsAsCommand(this->GetPreLinkCommands());
|
this->CheckForTargetsAsCommand(this->GetPreLinkCommands());
|
||||||
CheckForTargetsAsCommand(this->GetPostBuildCommands());
|
this->CheckForTargetsAsCommand(this->GetPostBuildCommands());
|
||||||
|
|
||||||
while (!srcFilesToProcess.empty())
|
while (!srcFilesToProcess.empty())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue