File tree 2 files changed +18
-7
lines changed
2 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -74,8 +74,19 @@ executeCmakeHelp(llvm::StringRef cmakePath)
74
74
Expected<std::string>
75
75
getCmakeDefaultGenerator (llvm::StringRef cmakePath)
76
76
{
77
- MRDOCS_TRY (auto const cmakeHelp, executeCmakeHelp (cmakePath));
77
+ Expected<std::string> const cmakeHelpExp = executeCmakeHelp (cmakePath);
78
+ if (!cmakeHelpExp) {
79
+ if (llvm::sys::path::extension (cmakePath) == " .exe" )
80
+ {
81
+ return " Visual Studio 17 2022" ;
82
+ }
83
+ else
84
+ {
85
+ return " Unix Makefiles" ;
86
+ }
87
+ }
78
88
89
+ std::string const cmakeHelp = *std::move (cmakeHelpExp);
79
90
std::istringstream stream (cmakeHelp);
80
91
std::string line;
81
92
std::string defaultGenerator;
Original file line number Diff line number Diff line change @@ -179,12 +179,6 @@ DoGenerateAction()
179
179
compileCommands, config,
180
180
defaultIncludePaths);
181
181
182
- // Normalize outputPath path
183
- MRDOCS_CHECK (toolArgs.outputPath , " The output path argument is missing" );
184
- toolArgs.outputPath = files::normalizePath (
185
- files::makeAbsolute (toolArgs.outputPath ,
186
- (*config)->workingDir ));
187
-
188
182
// --------------------------------------------------------------
189
183
//
190
184
// Build corpus
@@ -206,6 +200,12 @@ DoGenerateAction()
206
200
// Generate docs
207
201
//
208
202
// --------------------------------------------------------------
203
+ // Normalize outputPath path
204
+ MRDOCS_CHECK (toolArgs.outputPath , " The output path argument is missing" );
205
+ toolArgs.outputPath = files::normalizePath (
206
+ files::makeAbsolute (
207
+ toolArgs.outputPath ,
208
+ (*config)->workingDir ));
209
209
report::info (" Generating docs\n " );
210
210
MRDOCS_TRY (generator.build (toolArgs.outputPath .getValue (), *corpus));
211
211
return {};
You can’t perform that action at this time.
0 commit comments