diff --git a/.github/workflows/build_orca.yml b/.github/workflows/build_orca.yml index be188b43c75..5f9504d17d0 100644 --- a/.github/workflows/build_orca.yml +++ b/.github/workflows/build_orca.yml @@ -364,7 +364,7 @@ jobs: # env: # WindowsSdkDir: 'C:\Program Files (x86)\Windows Kits\10\' # WindowsSDKVersion: '10.0.26100.0\' - run: .\build_release_vs.bat slicer ${{ !vars.SELF_HOSTED && '-x' || '' }} + run: .\build_release_vs.bat slicer ${{ !vars.SELF_HOSTED && '-x -p' || '' }} - name: Show sccache stats Windows if: ${{ always() && runner.os == 'Windows' && !vars.SELF_HOSTED }} diff --git a/build_release_vs.bat b/build_release_vs.bat index cc347bdd10e..0c8bda1aaa8 100644 --- a/build_release_vs.bat +++ b/build_release_vs.bat @@ -9,6 +9,11 @@ for %%a in (%*) do ( if "%%a"=="-x" set USE_NINJA=1 ) +set "SLIC3R_PRECOMPILED_HEADERS=" +for %%a in (%*) do ( + if "%%a"=="-p" set SLIC3R_PRECOMPILED_HEADERS=OFF +) + if "%USE_NINJA%"=="1" ( echo Using Ninja Multi-Config generator set CMAKE_GENERATOR="Ninja Multi-Config" @@ -135,16 +140,17 @@ cd %build_dir% echo on set CMAKE_POLICY_VERSION_MINIMUM=3.5 -set "CMAKE_LAUNCHER_FLAGS=" -if defined CMAKE_C_COMPILER_LAUNCHER set "CMAKE_LAUNCHER_FLAGS=%CMAKE_LAUNCHER_FLAGS% -DCMAKE_C_COMPILER_LAUNCHER=%CMAKE_C_COMPILER_LAUNCHER%" -if defined CMAKE_CXX_COMPILER_LAUNCHER set "CMAKE_LAUNCHER_FLAGS=%CMAKE_LAUNCHER_FLAGS% -DCMAKE_CXX_COMPILER_LAUNCHER=%CMAKE_CXX_COMPILER_LAUNCHER%" +set "CMAKE_CONFIGURE_FLAGS=" +if defined CMAKE_C_COMPILER_LAUNCHER set "CMAKE_CONFIGURE_FLAGS=%CMAKE_CONFIGURE_FLAGS% -DCMAKE_C_COMPILER_LAUNCHER=%CMAKE_C_COMPILER_LAUNCHER%" +if defined CMAKE_CXX_COMPILER_LAUNCHER set "CMAKE_CONFIGURE_FLAGS=%CMAKE_CONFIGURE_FLAGS% -DCMAKE_CXX_COMPILER_LAUNCHER=%CMAKE_CXX_COMPILER_LAUNCHER%" +if defined SLIC3R_PRECOMPILED_HEADERS set "CMAKE_CONFIGURE_FLAGS=%CMAKE_CONFIGURE_FLAGS% -DSLIC3R_PCH=%SLIC3R_PRECOMPILED_HEADERS%" if "%USE_NINJA%"=="1" ( - cmake .. -G %CMAKE_GENERATOR% -DORCA_TOOLS=ON %SIG_FLAG% -DCMAKE_BUILD_TYPE=%build_type% %CMAKE_LAUNCHER_FLAGS% + cmake .. -G %CMAKE_GENERATOR% -DORCA_TOOLS=ON %SIG_FLAG% -DCMAKE_BUILD_TYPE=%build_type% %CMAKE_CONFIGURE_FLAGS% if errorlevel 1 exit /b 1 cmake --build . --config %build_type% if errorlevel 1 exit /b 1 ) else ( - cmake .. -G %CMAKE_GENERATOR% -A x64 -DORCA_TOOLS=ON %SIG_FLAG% -DCMAKE_BUILD_TYPE=%build_type% %CMAKE_LAUNCHER_FLAGS% + cmake .. -G %CMAKE_GENERATOR% -A x64 -DORCA_TOOLS=ON %SIG_FLAG% -DCMAKE_BUILD_TYPE=%build_type% %CMAKE_CONFIGURE_FLAGS% if errorlevel 1 exit /b 1 cmake --build . --config %build_type% --target ALL_BUILD -- -m if errorlevel 1 exit /b 1