Skip to content

Commit

Permalink
fix: escaped quote on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
zaucy committed Dec 10, 2024
1 parent c7bafa1 commit 5db67f0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main.cpp2
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,10 @@ cl_build_binary_cmd: (info: cpp2b_source_binary_info, bin_outpath: fs::path) ->
cppfront_include_dir := fs::absolute(".cache/cpp2/repos/hsutter/cppfront/include");
transpiled_src := fs::absolute(".cache/cpp2/source") / fs::path(info.src).replace_extension(".cpp");
d := fs::absolute(modules_dir());

bin_parent_dir := fs::relative(bin_outpath).parent_path().string();
std::replace(bin_parent_dir.begin(), bin_parent_dir.end(), '/', '\\');

cmd_str: std::string = "cl /nologo /std:c++latest /W4 /MDd /EHsc /DEBUG:full /Zi /FC";
for info.imports do (imp: std::string) {
imp_bmi := d / ("(imp)$.ifc");
Expand All @@ -575,7 +579,7 @@ cl_build_binary_cmd: (info: cpp2b_source_binary_info, bin_outpath: fs::path) ->
cmd_str += " \"(transpiled_src.string())$\"";
cmd_str += " -I\"(cppfront_include_dir.string())$\"";
cmd_str += " /Fe\"(bin_outpath.string())$\"";
cmd_str += " /Fd\"(fs::relative(bin_outpath).parent_path().string())$\\\"";
cmd_str += " /Fd\"(bin_parent_dir)$\\\\\"";
return cmd_str;
}

Expand Down

0 comments on commit 5db67f0

Please sign in to comment.