|
20 | 20 |
|
21 | 21 | #include <string>
|
22 | 22 | #include <system_error>
|
| 23 | +#include <boost/predef.h> |
23 | 24 | #include <boost/process.hpp>
|
| 25 | +#if BOOST_OS_WINDOWS |
| 26 | +#include <boost/process/windows.hpp> |
| 27 | +#endif |
24 | 28 | #include <SMCE/internal/utils.hpp>
|
25 | 29 | #include <SMCE/Sketch.hpp>
|
26 | 30 | #include <SMCE/SketchConf.hpp>
|
@@ -164,6 +168,9 @@ std::error_code Toolchain::do_configure(Sketch& sketch) noexcept {
|
164 | 168 | "-P",
|
165 | 169 | m_res_dir.string() + "/RtResources/SMCE/share/Scripts/ConfigureSketch.cmake",
|
166 | 170 | (bp::std_out & bp::std_err) > cmake_conf_out
|
| 171 | +#if BOOST_OS_WINDOWS |
| 172 | + ,bp::windows::create_no_window |
| 173 | +#endif |
167 | 174 | );
|
168 | 175 |
|
169 | 176 | {
|
@@ -206,6 +213,9 @@ std::error_code Toolchain::do_build(Sketch& sketch) noexcept {
|
206 | 213 | "--build", (sketch.m_tmpdir / "build").string(),
|
207 | 214 | "--config", "Release",
|
208 | 215 | (bp::std_out & bp::std_err) > cmake_build_out
|
| 216 | +#if BOOST_OS_WINDOWS |
| 217 | + ,bp::windows::create_no_window |
| 218 | +#endif |
209 | 219 | };
|
210 | 220 |
|
211 | 221 | for (std::string line; std::getline(cmake_build_out, line);) {
|
@@ -253,7 +263,14 @@ std::error_code Toolchain::do_build(Sketch& sketch) noexcept {
|
253 | 263 | return toolchain_error::cmake_not_found;
|
254 | 264 | }
|
255 | 265 | bp::ipstream cmake_out;
|
256 |
| - bp::child cmake_child{m_cmake_path, "--version", bp::std_out > cmake_out}; |
| 266 | + bp::child cmake_child{ |
| 267 | + m_cmake_path, |
| 268 | + "--version", |
| 269 | + bp::std_out > cmake_out |
| 270 | +#if BOOST_OS_WINDOWS |
| 271 | + ,bp::windows::create_no_window |
| 272 | +#endif |
| 273 | + }; |
257 | 274 | std::string line;
|
258 | 275 | while (cmake_child.running() && std::getline(cmake_out, line) && !line.empty()) {
|
259 | 276 | if(!line.starts_with("cmake")) {
|
|
0 commit comments