Skip to content

Commit

Permalink
Fix Windows CMake Invalid character escape '\U' error
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Sep 10, 2023
1 parent 5401725 commit 9959379
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/zig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -871,12 +871,15 @@ set(CMAKE_CXX_COMPILER {cxx})
set(CMAKE_RANLIB {ranlib})"#,
system_name = system_name,
system_processor = system_processor,
cc = zig_wrapper.cc.display(),
cxx = zig_wrapper.cxx.display(),
ranlib = zig_wrapper.ranlib.display(),
cc = zig_wrapper.cc.to_slash_lossy(),
cxx = zig_wrapper.cxx.to_slash_lossy(),
ranlib = zig_wrapper.ranlib.to_slash_lossy(),
);
if enable_zig_ar {
content.push_str(&format!("\nset(CMAKE_AR {})\n", zig_wrapper.ar.display()));
content.push_str(&format!(
"\nset(CMAKE_AR {})\n",
zig_wrapper.ar.to_slash_lossy()
));
}
fs::write(&toolchain_file, content)?;
Ok(toolchain_file)
Expand Down

0 comments on commit 9959379

Please sign in to comment.