@@ -235,7 +235,7 @@ void ImportProject::parseArgs(FileSettings &fs, const std::vector<std::string> &
235235 fsSetDefines (fs, std::move (defs));
236236}
237237
238- void ImportProject::ignorePaths (const std::vector<std::string> &ipaths, bool debug)
238+ std::vector<std::string> ImportProject::ignorePaths (const std::vector<std::string> &ipaths, bool debug)
239239{
240240 PathMatch matcher (ipaths, Path::getCurrentPath ());
241241 for (auto it = fileSettings.cbegin (); it != fileSettings.cend ();) {
@@ -247,6 +247,7 @@ void ImportProject::ignorePaths(const std::vector<std::string> &ipaths, bool deb
247247 else
248248 ++it;
249249 }
250+ return matcher.unmatched ();
250251}
251252
252253void ImportProject::ignoreOtherConfigs (const std::string &cfg)
@@ -1759,27 +1760,24 @@ ImportProject::Type ImportProject::import(const std::string &filename, Settings
17591760 if (!mPath .empty () && !endsWith (mPath ,' /' ))
17601761 mPath += ' /' ;
17611762
1762- const std::vector<std::string> fileFilters =
1763- settings ? settings->fileFilters : std::vector<std::string>();
1764-
17651763 if (endsWith (filename, " .json" )) {
17661764 if (processCompileCommands (fin)) {
17671765 setRelativePaths (filename);
17681766 return ImportProject::Type::COMPILE_DB ;
17691767 }
17701768 } else if (endsWith (filename, " .sln" )) {
1771- if (importSln (fin, filename, fileFilters )) {
1769+ if (importSln (fin, filename)) {
17721770 setRelativePaths (filename);
17731771 return ImportProject::Type::VS_SLN ;
17741772 }
17751773 } else if (endsWith (filename, " .slnx" )) {
1776- if (importSlnx (filename, fileFilters )) {
1774+ if (importSlnx (filename)) {
17771775 setRelativePaths (filename);
17781776 return ImportProject::Type::VS_SLNX ;
17791777 }
17801778 } else if (endsWith (filename, " .vcxproj" )) {
17811779 PropertiesMap mVariables ;
1782- if (importVcxproj (toAbsolute (filename), mVariables , fileFilters )) {
1780+ if (importVcxproj (toAbsolute (filename), mVariables )) {
17831781 setRelativePaths (filename);
17841782 return ImportProject::Type::VS_VCXPROJ ;
17851783 }
@@ -1907,7 +1905,7 @@ void ImportProject::setSolution(const std::string &filename, PropertiesMap &prop
19071905 properties[" SolutionName" ] = fileStem (properties[" SolutionFileName" ]);
19081906}
19091907
1910- bool ImportProject::importSln (std::istream &istr, const std::string &filename, const std::vector<std::string> &fileFilters )
1908+ bool ImportProject::importSln (std::istream &istr, const std::string &filename)
19111909{
19121910 std::string line;
19131911
@@ -2000,7 +1998,7 @@ bool ImportProject::importSln(std::istream &istr, const std::string &filename, c
20001998
20011999 for (const std::string &vcxproj : vcxprojs) {
20022000 PropertiesMap mVariables = solutionVariables;
2003- if (!importVcxproj (vcxproj, mVariables , fileFilters )) {
2001+ if (!importVcxproj (vcxproj, mVariables )) {
20042002 errors.emplace_back (" failed to load '" + vcxproj + " ' from Visual Studio solution" );
20052003 return false ;
20062004 }
@@ -2009,7 +2007,7 @@ bool ImportProject::importSln(std::istream &istr, const std::string &filename, c
20092007 return true ;
20102008}
20112009
2012- bool ImportProject::importSlnx (const std::string& filename, const std::vector<std::string>& fileFilters )
2010+ bool ImportProject::importSlnx (const std::string& filename)
20132011{
20142012 debugs.clear ();
20152013
@@ -2054,7 +2052,7 @@ bool ImportProject::importSlnx(const std::string& filename, const std::vector<st
20542052 vcxproj = Path::fromNativeSeparators (std::move (vcxproj));
20552053
20562054 PropertiesMap mVariables = solutionVariables;
2057- if (!importVcxproj (vcxproj, mVariables , fileFilters )) {
2055+ if (!importVcxproj (vcxproj, mVariables )) {
20582056 errors.emplace_back (" failed to load '" + vcxproj + " ' from Visual Studio solution" );
20592057 return false ;
20602058 }
@@ -4583,8 +4581,7 @@ ImportProject::ImportResult ImportProject::processImport(const std::string &file
45834581}
45844582
45854583bool ImportProject::importVcxproj (const std::string &filename,
4586- PropertiesMap &properties,
4587- const std::vector<std::string> &fileFilters)
4584+ PropertiesMap &properties)
45884585{
45894586 tinyxml2::XMLDocument doc;
45904587 const tinyxml2::XMLError error = doc.LoadFile (filename.c_str ());
@@ -4908,11 +4905,7 @@ bool ImportProject::importVcxproj(const std::string &filename,
49084905 // we can only set it globally but in this context it needs to be treated per file
49094906
49104907 // Project files
4911- PathMatch filtermatcher (fileFilters, Path::getCurrentPath ());
49124908 for (const ItemGroupClCompile &compile : compileList) {
4913- if (!fileFilters.empty () && !filtermatcher.match (compile.filename ))
4914- continue ;
4915-
49164909 const std::string &excl = compile.get (" ExcludedFromBuild" );
49174910 if (!excl.empty () && caseInsensitiveStringCompare (excl, " true" ) == 0 )
49184911 continue ;
0 commit comments