@@ -143,6 +143,7 @@ CmdLineParser::CmdLineParser(CmdLineLogger &logger, Settings &settings, Suppress
143143 : mLogger(logger)
144144 , mSettings(settings)
145145 , mSuppressions(suppressions)
146+ , mAnalyzeAllVsConfigsSetOnCmdLine(false )
146147{}
147148
148149bool CmdLineParser::fillSettingsFromArgs (int argc, const char * const argv[])
@@ -550,8 +551,10 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a
550551 else if (std::strncmp (argv[i]," --addon-python=" , 15 ) == 0 )
551552 mSettings .addonPython .assign (argv[i]+15 );
552553
553- else if (std::strcmp (argv[i]," --analyze-all-vs-configs" ) == 0 )
554+ else if (std::strcmp (argv[i]," --analyze-all-vs-configs" ) == 0 ) {
554555 mSettings .analyzeAllVsConfigs = true ;
556+ mAnalyzeAllVsConfigsSetOnCmdLine = true ;
557+ }
555558
556559 // Check configuration
557560 else if (std::strcmp (argv[i], " --check-config" ) == 0 )
@@ -1036,8 +1039,10 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a
10361039 return Result::Fail;
10371040 }
10381041
1039- else if (std::strcmp (argv[i]," --no-analyze-all-vs-configs" ) == 0 )
1042+ else if (std::strcmp (argv[i]," --no-analyze-all-vs-configs" ) == 0 ) {
10401043 mSettings .analyzeAllVsConfigs = false ;
1044+ mAnalyzeAllVsConfigsSetOnCmdLine = true ;
1045+ }
10411046
10421047 else if (std::strcmp (argv[i], " --no-check-headers" ) == 0 )
10431048 mSettings .checkHeaders = false ;
@@ -1639,12 +1644,14 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a
16391644
16401645 if (!mSettings .analyzeAllVsConfigs ) {
16411646 if (projectType != ImportProject::Type::VS_SLN && projectType != ImportProject::Type::VS_VCXPROJ) {
1642- mLogger .printError (" --no-analyze-all-vs-configs has no effect - no Visual Studio project provided." );
1643- return Result::Fail;
1647+ if (mAnalyzeAllVsConfigsSetOnCmdLine ) {
1648+ mLogger .printError (" --no-analyze-all-vs-configs has no effect - no Visual Studio project provided." );
1649+ return Result::Fail;
1650+ }
1651+ } else {
1652+ // TODO: bail out when this does nothing
1653+ project.selectOneVsConfig (mSettings .platform .type );
16441654 }
1645-
1646- // TODO: bail out when this does nothing
1647- project.selectOneVsConfig (mSettings .platform .type );
16481655 }
16491656
16501657 if (!mSettings .buildDir .empty () && !Path::isDirectory (mSettings .buildDir )) {
0 commit comments