@@ -236,7 +236,7 @@ void ImportProject::parseArgs(FileSettings &fs, const std::vector<std::string> &
236236 fsSetDefines (fs, std::move (defs));
237237}
238238
239- void ImportProject::ignorePaths (const std::vector<std::string> &ipaths, bool debug)
239+ std::vector<std::string> ImportProject::ignorePaths (const std::vector<std::string> &ipaths, bool debug)
240240{
241241 PathMatch matcher (ipaths, Path::getCurrentPath ());
242242 for (auto it = fileSettings.cbegin (); it != fileSettings.cend ();) {
@@ -248,6 +248,7 @@ void ImportProject::ignorePaths(const std::vector<std::string> &ipaths, bool deb
248248 else
249249 ++it;
250250 }
251+ return matcher.unmatched ();
251252}
252253
253254void ImportProject::ignoreOtherConfigs (const std::string &cfg)
@@ -1787,27 +1788,24 @@ ImportProject::Type ImportProject::import(const std::string &filename, Settings
17871788 if (!mPath .empty () && !endsWith (mPath ,' /' ))
17881789 mPath += ' /' ;
17891790
1790- const std::vector<std::string> fileFilters =
1791- settings ? settings->fileFilters : std::vector<std::string>();
1792-
17931791 if (endsWith (filename, " .json" )) {
17941792 if (processCompileCommands (fin)) {
17951793 setRelativePaths (filename);
17961794 return ImportProject::Type::COMPILE_DB ;
17971795 }
17981796 } else if (endsWith (filename, " .sln" )) {
1799- if (importSln (fin, filename, fileFilters )) {
1797+ if (importSln (fin, filename)) {
18001798 setRelativePaths (filename);
18011799 return ImportProject::Type::VS_SLN ;
18021800 }
18031801 } else if (endsWith (filename, " .slnx" )) {
1804- if (importSlnx (filename, fileFilters )) {
1802+ if (importSlnx (filename)) {
18051803 setRelativePaths (filename);
18061804 return ImportProject::Type::VS_SLNX ;
18071805 }
18081806 } else if (endsWith (filename, " .vcxproj" )) {
18091807 PropertiesMap mVariables ;
1810- if (importVcxproj (toAbsolute (filename), mVariables , fileFilters )) {
1808+ if (importVcxproj (toAbsolute (filename), mVariables )) {
18111809 setRelativePaths (filename);
18121810 return ImportProject::Type::VS_VCXPROJ ;
18131811 }
@@ -1935,7 +1933,7 @@ void ImportProject::setSolution(const std::string &filename, PropertiesMap &prop
19351933 properties[" SolutionName" ] = fileStem (properties[" SolutionFileName" ]);
19361934}
19371935
1938- bool ImportProject::importSln (std::istream &istr, const std::string &filename, const std::vector<std::string> &fileFilters )
1936+ bool ImportProject::importSln (std::istream &istr, const std::string &filename)
19391937{
19401938 std::string line;
19411939
@@ -2028,7 +2026,7 @@ bool ImportProject::importSln(std::istream &istr, const std::string &filename, c
20282026
20292027 for (const std::string &vcxproj : vcxprojs) {
20302028 PropertiesMap mVariables = solutionVariables;
2031- if (!importVcxproj (vcxproj, mVariables , fileFilters )) {
2029+ if (!importVcxproj (vcxproj, mVariables )) {
20322030 errors.emplace_back (" failed to load '" + vcxproj + " ' from Visual Studio solution" );
20332031 return false ;
20342032 }
@@ -2037,7 +2035,7 @@ bool ImportProject::importSln(std::istream &istr, const std::string &filename, c
20372035 return true ;
20382036}
20392037
2040- bool ImportProject::importSlnx (const std::string& filename, const std::vector<std::string>& fileFilters )
2038+ bool ImportProject::importSlnx (const std::string& filename)
20412039{
20422040 debugs.clear ();
20432041
@@ -2082,7 +2080,7 @@ bool ImportProject::importSlnx(const std::string& filename, const std::vector<st
20822080 vcxproj = Path::fromNativeSeparators (std::move (vcxproj));
20832081
20842082 PropertiesMap mVariables = solutionVariables;
2085- if (!importVcxproj (vcxproj, mVariables , fileFilters )) {
2083+ if (!importVcxproj (vcxproj, mVariables )) {
20862084 errors.emplace_back (" failed to load '" + vcxproj + " ' from Visual Studio solution" );
20872085 return false ;
20882086 }
@@ -4621,8 +4619,7 @@ ImportProject::ImportResult ImportProject::processImport(const std::string &file
46214619}
46224620
46234621bool ImportProject::importVcxproj (const std::string &filename,
4624- PropertiesMap &properties,
4625- const std::vector<std::string> &fileFilters)
4622+ PropertiesMap &properties)
46264623{
46274624 tinyxml2::XMLDocument doc;
46284625 const tinyxml2::XMLError error = doc.LoadFile (filename.c_str ());
@@ -4946,11 +4943,7 @@ bool ImportProject::importVcxproj(const std::string &filename,
49464943 // we can only set it globally but in this context it needs to be treated per file
49474944
49484945 // Project files
4949- PathMatch filtermatcher (fileFilters, Path::getCurrentPath ());
49504946 for (const ItemGroupClCompile &compile : compileList) {
4951- if (!fileFilters.empty () && !filtermatcher.match (compile.filename ))
4952- continue ;
4953-
49544947 const std::string &excl = compile.get (" ExcludedFromBuild" );
49554948 if (!excl.empty () && caseInsensitiveStringCompare (excl, " true" ) == 0 )
49564949 continue ;
0 commit comments