Merge topic 'vs10-empty-target'
448661f VS10: Skip targets with no linker language (#11230)
This commit is contained in:
commit
54a3bf001c
@ -125,7 +125,10 @@ void cmVisualStudio10TargetGenerator::Generate()
|
|||||||
".vcxproj");
|
".vcxproj");
|
||||||
if(this->Target->GetType() <= cmTarget::MODULE_LIBRARY)
|
if(this->Target->GetType() <= cmTarget::MODULE_LIBRARY)
|
||||||
{
|
{
|
||||||
this->ComputeClOptions();
|
if(!this->ComputeClOptions())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
cmMakefile* mf = this->Target->GetMakefile();
|
cmMakefile* mf = this->Target->GetMakefile();
|
||||||
std::string path = mf->GetStartOutputDirectory();
|
std::string path = mf->GetStartOutputDirectory();
|
||||||
@ -949,19 +952,23 @@ OutputLinkIncremental(std::string const& configName)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmVisualStudio10TargetGenerator::ComputeClOptions()
|
bool cmVisualStudio10TargetGenerator::ComputeClOptions()
|
||||||
{
|
{
|
||||||
std::vector<std::string> const* configs =
|
std::vector<std::string> const* configs =
|
||||||
this->GlobalGenerator->GetConfigurations();
|
this->GlobalGenerator->GetConfigurations();
|
||||||
for(std::vector<std::string>::const_iterator i = configs->begin();
|
for(std::vector<std::string>::const_iterator i = configs->begin();
|
||||||
i != configs->end(); ++i)
|
i != configs->end(); ++i)
|
||||||
{
|
{
|
||||||
this->ComputeClOptions(*i);
|
if(!this->ComputeClOptions(*i))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmVisualStudio10TargetGenerator::ComputeClOptions(
|
bool cmVisualStudio10TargetGenerator::ComputeClOptions(
|
||||||
std::string const& configName)
|
std::string const& configName)
|
||||||
{
|
{
|
||||||
// much of this was copied from here:
|
// much of this was copied from here:
|
||||||
@ -984,7 +991,7 @@ void cmVisualStudio10TargetGenerator::ComputeClOptions(
|
|||||||
cmSystemTools::Error
|
cmSystemTools::Error
|
||||||
("CMake can not determine linker language for target:",
|
("CMake can not determine linker language for target:",
|
||||||
this->Name.c_str());
|
this->Name.c_str());
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
if(strcmp(linkLanguage, "C") == 0 || strcmp(linkLanguage, "CXX") == 0
|
if(strcmp(linkLanguage, "C") == 0 || strcmp(linkLanguage, "CXX") == 0
|
||||||
|| strcmp(linkLanguage, "Fortran") == 0)
|
|| strcmp(linkLanguage, "Fortran") == 0)
|
||||||
@ -1044,6 +1051,7 @@ void cmVisualStudio10TargetGenerator::ComputeClOptions(
|
|||||||
}
|
}
|
||||||
|
|
||||||
this->ClOptions[configName] = pOptions.release();
|
this->ClOptions[configName] = pOptions.release();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
@ -50,8 +50,8 @@ private:
|
|||||||
void WriteObjSources();
|
void WriteObjSources();
|
||||||
void WritePathAndIncrementalLinkOptions();
|
void WritePathAndIncrementalLinkOptions();
|
||||||
void WriteItemDefinitionGroups();
|
void WriteItemDefinitionGroups();
|
||||||
void ComputeClOptions();
|
bool ComputeClOptions();
|
||||||
void ComputeClOptions(std::string const& configName);
|
bool ComputeClOptions(std::string const& configName);
|
||||||
void WriteClOptions(std::string const& config,
|
void WriteClOptions(std::string const& config,
|
||||||
std::vector<std::string> const & includes);
|
std::vector<std::string> const & includes);
|
||||||
void WriteRCOptions(std::string const& config,
|
void WriteRCOptions(std::string const& config,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user