Removing automatic addition of a -I path for the current source directory.
This is not consistent with the Visual Studio generators which do not provide this path. It should not be added anyway because it is adding an include path not requested by the CMakeLists.txt code. The code I'm removing was originally added in revision 1.17 of cmUnixMakefileGenerator.cxx as a part of several other changes and has a commit log entry of "some bug fixes" It was propagated from their to cmLocalUnixMakefileGenerator.cxx. Since all our projects build in the VS IDE without this include path, it should not be needed. Users can easily fix problems caused by this by adding INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) to their CMakeLists.txt code. This was often necessary previously when a project was originally written on a Unix system and then built with Visual Studio.
This commit is contained in:
parent
1d061ae896
commit
4df215a268
|
@ -2493,8 +2493,6 @@ void cmLocalUnixMakefileGenerator::OutputMakeVariables(std::ostream& fout)
|
||||||
fout << "INCLUDE_FLAGS = ";
|
fout << "INCLUDE_FLAGS = ";
|
||||||
std::vector<std::string>& includes = m_Makefile->GetIncludeDirectories();
|
std::vector<std::string>& includes = m_Makefile->GetIncludeDirectories();
|
||||||
std::vector<std::string>::iterator i;
|
std::vector<std::string>::iterator i;
|
||||||
fout << "-I" <<
|
|
||||||
this->ConvertToOutputForExisting(m_Makefile->GetStartDirectory()) << " ";
|
|
||||||
std::map<cmStdString, cmStdString> implicitIncludes;
|
std::map<cmStdString, cmStdString> implicitIncludes;
|
||||||
implicitIncludes["/usr/include"] = "/usr/include";
|
implicitIncludes["/usr/include"] = "/usr/include";
|
||||||
if(m_Makefile->GetDefinition("CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES"))
|
if(m_Makefile->GetDefinition("CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES"))
|
||||||
|
|
Loading…
Reference in New Issue