summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2004-04-28 17:21:56 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2004-04-28 17:21:56 (GMT)
commita6b60841dbc56b896380435e4e190cbdc6e1a25a (patch)
treebd7b0971e37170049b5c13a6979360042e4683b1 /Source/cmLocalUnixMakefileGenerator.cxx
parente539cf9f7c39b2c25b5566925e0c43a39f2ee868 (diff)
downloadCMake-a6b60841dbc56b896380435e4e190cbdc6e1a25a.zip
CMake-a6b60841dbc56b896380435e4e190cbdc6e1a25a.tar.gz
CMake-a6b60841dbc56b896380435e4e190cbdc6e1a25a.tar.bz2
BUG: fix for bug 116 platform files can now specify directories that should not be added by CMAKE
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator.cxx15
1 files changed, 14 insertions, 1 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx
index 80dd767..9e221cc 100644
--- a/Source/cmLocalUnixMakefileGenerator.cxx
+++ b/Source/cmLocalUnixMakefileGenerator.cxx
@@ -2487,13 +2487,26 @@ void cmLocalUnixMakefileGenerator::OutputMakeVariables(std::ostream& fout)
std::vector<std::string>::iterator i;
fout << "-I" <<
this->ConvertToOutputForExisting(m_Makefile->GetStartDirectory()) << " ";
+ std::map<cmStdString, cmStdString> implicitIncludes;
+ implicitIncludes["/usr/include"] = "/usr/include";
+ if(m_Makefile->GetDefinition("CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES"))
+ {
+ std::string arg = m_Makefile->GetDefinition("CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES");
+ std::vector<std::string> implicitIncludeVec;
+ cmSystemTools::ExpandListArgument(arg, implicitIncludeVec);
+ for(int k =0; k < implicitIncludeVec.size(); k++)
+ {
+ implicitIncludes[implicitIncludeVec[k]] = implicitIncludeVec[k];
+ }
+ }
+
for(i = includes.begin(); i != includes.end(); ++i)
{
std::string include = *i;
// Don't output a -I for the standard include path "/usr/include".
// This can cause problems with certain standard library
// implementations because the wrong headers may be found first.
- if(include != "/usr/include")
+ if(implicitIncludes.find(include) == implicitIncludes.end())
{
fout << "-I" << this->ConvertToOutputForExisting(i->c_str()) << " ";
}