fix(autogen): opening log file before created generated directory
This commit is contained in:
parent
243af95a3b
commit
143d3769c7
1 changed files with 2 additions and 2 deletions
|
@ -43,6 +43,8 @@ int processHeader(fs::path srcRoot, fs::path srcPath, fs::path outPath) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
fs::create_directories(outPath.parent_path()); // Make sure generated dir exists before we try writing to it
|
||||
|
||||
// We write to a special log file instead of stdout/stderr to
|
||||
// 1. avoid confusion
|
||||
// 2. prevent MSBuild from reading the word "error" and detecting there's a problem with the program (there isn't)
|
||||
|
@ -74,8 +76,6 @@ int processHeader(fs::path srcRoot, fs::path srcPath, fs::path outPath) {
|
|||
data::analyzeClasses(cursor, srcRootStr, &dataAnlyState);
|
||||
enum_::analyzeClasses(cursor, srcRootStr, &enumAnlyState);
|
||||
|
||||
fs::create_directories(outPath.parent_path()); // Make sure generated dir exists before we try writing to it
|
||||
|
||||
printf("[AUTOGEN] Generating file %s...\n", relpathStr.c_str());
|
||||
std::ofstream outStream(outPathStr);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue