From e336fe2eabcb2a0e0e3cf99b288134e888ad9df4 Mon Sep 17 00:00:00 2001 From: Jorijn van der Graaf Date: Sun, 1 Mar 2026 19:18:48 +0100 Subject: [PATCH] windows build fix --- implementations/Crafter.Build-Configuration.cpp | 4 ---- implementations/Crafter.Build-Module.cpp | 7 +++++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/implementations/Crafter.Build-Configuration.cpp b/implementations/Crafter.Build-Configuration.cpp index 6bd4238..397e790 100644 --- a/implementations/Crafter.Build-Configuration.cpp +++ b/implementations/Crafter.Build-Configuration.cpp @@ -282,8 +282,6 @@ namespace Crafter { const fs::path cacheDir = GetPath() / "cloneCache"; - std::cout << cacheDir << std::endl; - if (!fs::exists(cacheDir)) { fs::create_directories(cacheDir); } @@ -307,8 +305,6 @@ namespace Crafter { // Update path to the project.json of the dependency path = cacheDir / depFolder / "project.json"; } - - std::cout << path << std::endl; // Create a Project object for the dependency std::unique_ptr depProject = std::make_unique(std::move(path), configName); diff --git a/implementations/Crafter.Build-Module.cpp b/implementations/Crafter.Build-Module.cpp index 7e36a6b..3fc34f3 100644 --- a/implementations/Crafter.Build-Module.cpp +++ b/implementations/Crafter.Build-Module.cpp @@ -66,7 +66,14 @@ namespace Crafter { } } } + + #ifdef CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu result += RunClang(std::format("{} {}.cppm --precompile -o {}.pcm", clang, path.string(), (pcmDir/path.filename()).string())); + #endif + #if defined(CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_windows_msvc) || defined(CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_w64_mingw32) + result += RunClang(std::format("{} && cd {} && {}.cppm --precompile -o {}.pcm", clang, pcmDir, path.string(), path.filename().string())); + #endif + result += RunClang(std::format("{} {}.pcm -c -o {}.o", clang, (pcmDir/path.filename()).string(), (buildDir/path.filename()).string())); if(result.empty()) { compiled.store(CRAFTER_COMPILE_STATUS_COMPLETED);