File tree 1 file changed +13
-12
lines changed
1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -158,23 +158,24 @@ Expected<std::string>
158
158
getCmakeDefaultGenerator (llvm::StringRef cmakePath)
159
159
{
160
160
Expected<std::string> const cmakeHelpExp = executeCmakeHelp (cmakePath);
161
- if (!cmakeHelpExp)
161
+ if (cmakeHelpExp)
162
+ {
163
+ std::string const cmakeHelp = *std::move (cmakeHelpExp);
164
+ return parseCmakeHelpOutput (cmakeHelp);
165
+ }
166
+
167
+ Expected<std::string> const cmakeSystemInformationExp = executeCmakeSystemInformation (cmakePath);
168
+ if (cmakeSystemInformationExp)
162
169
{
163
- Expected<std::string> const cmakeSystemInformationExp = executeCmakeSystemInformation (cmakePath);
164
- if (!cmakeSystemInformationExp)
165
- {
166
- if (llvm::sys::path::extension (cmakePath) == " .exe" )
167
- {
168
- return " Visual Studio 17 2022" ;
169
- }
170
- return " Unix Makefiles" ;
171
- }
172
170
std::string const cmakeSystemInformation = *std::move (cmakeSystemInformationExp);
173
171
return parseCmakeSystemInformationOutput (cmakeSystemInformation);
174
172
}
175
173
176
- std::string const cmakeHelp = *std::move (cmakeHelpExp);
177
- return parseCmakeHelpOutput (cmakeHelp);
174
+ if (llvm::sys::path::extension (cmakePath) == " .exe" )
175
+ {
176
+ return " Visual Studio 17 2022" ;
177
+ }
178
+ return " Unix Makefiles" ;
178
179
}
179
180
180
181
Expected<bool >
You can’t perform that action at this time.
0 commit comments