]> granicus.if.org Git - curl/commitdiff
appveyor: Use two parallel compilation on appveyor with CMake
authorMichał Janiszewski <janisozaur@gmail.com>
Sat, 19 Oct 2019 18:09:55 +0000 (20:09 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 23 Oct 2019 08:37:01 +0000 (10:37 +0200)
Appveyor provides 2 CPUs for each builder[1], make sure to use parallel
compilation, when running with CMake. CMake learned this new option in
version 3.12[2] and the version provided by appveyor is fresh enough.

Curl doesn't really take that long to build and it is using the slowest
builder available, msbuild, so expect only a moderate improvement in
build times.

[1] https://www.appveyor.com/docs/build-environment/
[2] https://cmake.org/cmake/help/v3.12/release/3.12.html

Closes #4508

appveyor.yml

index e1bc914854d9b94b8179066a89563db8510d79e9..e8d6e2521f483b4e36079d89258d297927b9a46d 100644 (file)
@@ -160,7 +160,7 @@ build_script:
         -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG=""
         -DCMAKE_INSTALL_PREFIX="C:/CURL"
         -DCMAKE_BUILD_TYPE=%PRJ_CFG% &&
-        cmake --build . --config %PRJ_CFG% --clean-first -- %BUILD_OPT%) else (
+        cmake --build . --config %PRJ_CFG% --parallel 2 --clean-first -- %BUILD_OPT%) else (
       if %BUILD_SYSTEM%==VisualStudioSolution (
         cd projects &&
         .\\generate.bat %VC_VERSION% &&