ENH: correctly ignore files
This commit is contained in:
parent
76dac72246
commit
16c0a02d9b
|
@ -2515,11 +2515,15 @@ void cmLocalUnixMakefileGenerator::OutputMakeVariables(std::ostream& fout)
|
||||||
fout << "\n\n";
|
fout << "\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
cmStdString& cmLocalUnixMakefileGenerator::GetIncludeFlags(const char* lang)
|
const char* cmLocalUnixMakefileGenerator::GetIncludeFlags(const char* lang)
|
||||||
{
|
{
|
||||||
|
if(!lang)
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
if(m_LanguageToIncludeFlags.count(lang))
|
if(m_LanguageToIncludeFlags.count(lang))
|
||||||
{
|
{
|
||||||
return m_LanguageToIncludeFlags[lang];
|
return m_LanguageToIncludeFlags[lang].c_str();
|
||||||
}
|
}
|
||||||
// Output Include paths
|
// Output Include paths
|
||||||
cmOStringStream includeFlags;
|
cmOStringStream includeFlags;
|
||||||
|
@ -2621,7 +2625,7 @@ cmStdString& cmLocalUnixMakefileGenerator::GetIncludeFlags(const char* lang)
|
||||||
}
|
}
|
||||||
flags += m_Makefile->GetDefineFlags();
|
flags += m_Makefile->GetDefineFlags();
|
||||||
m_LanguageToIncludeFlags[lang] = flags;
|
m_LanguageToIncludeFlags[lang] = flags;
|
||||||
return m_LanguageToIncludeFlags[lang];
|
return m_LanguageToIncludeFlags[lang].c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmLocalUnixMakefileGenerator::OutputMakeRules(std::ostream& fout)
|
void cmLocalUnixMakefileGenerator::OutputMakeRules(std::ostream& fout)
|
||||||
|
@ -2819,11 +2823,12 @@ OutputBuildObjectFromSource(std::ostream& fout,
|
||||||
bool shared)
|
bool shared)
|
||||||
{
|
{
|
||||||
// Header files shouldn't have build rules.
|
// Header files shouldn't have build rules.
|
||||||
if(source.GetPropertyAsBool("HEADER_FILE_ONLY"))
|
if(source.GetPropertyAsBool("HEADER_FILE_ONLY") ||
|
||||||
|
m_GlobalGenerator->IgnoreFile(source.GetSourceExtension().c_str()))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string outputExt =
|
std::string outputExt =
|
||||||
m_GlobalGenerator->GetLanguageOutputExtensionFromExtension(
|
m_GlobalGenerator->GetLanguageOutputExtensionFromExtension(
|
||||||
source.GetSourceExtension().c_str());
|
source.GetSourceExtension().c_str());
|
||||||
|
@ -2896,11 +2901,8 @@ OutputBuildObjectFromSource(std::ostream& fout,
|
||||||
{
|
{
|
||||||
// if the language is not defined and should not be ignored,
|
// if the language is not defined and should not be ignored,
|
||||||
// then produce an error
|
// then produce an error
|
||||||
if(!m_GlobalGenerator->IgnoreFile(source.GetSourceExtension().c_str()))
|
cmSystemTools::Error("Unexpected file type ",
|
||||||
{
|
sourceFile.c_str());
|
||||||
cmSystemTools::Error("Unexpected file type ",
|
|
||||||
sourceFile.c_str());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
flags += this->GetIncludeFlags(lang);
|
flags += this->GetIncludeFlags(lang);
|
||||||
// expand multi-command semi-colon separated lists
|
// expand multi-command semi-colon separated lists
|
||||||
|
|
|
@ -240,7 +240,7 @@ protected:
|
||||||
*/
|
*/
|
||||||
std::string& CreateSafeUniqueObjectFileName(const char* sin);
|
std::string& CreateSafeUniqueObjectFileName(const char* sin);
|
||||||
|
|
||||||
cmStdString& GetIncludeFlags(const char* lang);
|
const char* GetIncludeFlags(const char* lang);
|
||||||
protected:
|
protected:
|
||||||
int m_MakefileVariableSize;
|
int m_MakefileVariableSize;
|
||||||
std::map<cmStdString, cmStdString> m_MakeVariableMap;
|
std::map<cmStdString, cmStdString> m_MakeVariableMap;
|
||||||
|
|
Loading…
Reference in New Issue