CMake: Add the NINJA_ARGS config variable, set -j 4 in Travis, 2 in AppVeyor

This commit is contained in:
Axel Isouard 2016-11-28 13:28:55 +01:00
parent af87db4d65
commit c92b3d7f0b
No known key found for this signature in database
GPG key ID: 4E64BB3EAAF31C29
4 changed files with 6 additions and 5 deletions

View file

@ -3,7 +3,7 @@ matrix:
- os: linux - os: linux
sudo: required sudo: required
- os: osx - os: osx
osx_image: xcode7 osx_image: xcode7.3
language: cpp language: cpp
@ -43,7 +43,7 @@ install:
- git submodule update - git submodule update
- mkdir out - mkdir out
- cd out - cd out
- cmake .. - cmake -DNINJA_ARGS="-j 4" ..
script: script:
- make package - make package

View file

@ -21,6 +21,7 @@ find_package(DepotTools REQUIRED)
option(BUILD_TESTS "Build test binaries" OFF) option(BUILD_TESTS "Build test binaries" OFF)
option(BUILD_SAMPLES "Build samples binaries" OFF) option(BUILD_SAMPLES "Build samples binaries" OFF)
set(NINJA_ARGS "" CACHE STRING "Ninja arguments to pass before compiling WebRTC")
# #
# Versioning # Versioning

View file

@ -88,7 +88,7 @@ add_libwebrtc_command(webrtc-clang
# #
# Run the build command # Run the build command
# #
set(LIBWEBRTC_BUILD_CMD ninja -C out/Default) set(LIBWEBRTC_BUILD_CMD ninja ${NINJA_ARGS} -C out/Default)
add_libwebrtc_command(webrtc-ninja add_libwebrtc_command(webrtc-ninja
"Build" "Build"
"${LIBWEBRTC_BUILD_CMD}" "${LIBWEBRTC_BUILD_CMD}"

View file

@ -13,7 +13,7 @@ build:
before_build: before_build:
- cd c:\projects\libwebrtc - cd c:\projects\libwebrtc
- git submodule update --init --recursive - git submodule update --init --recursive
- cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_INSTALL_PREFIX=c:\projects\libwebrtc . - cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_INSTALL_PREFIX=c:\projects\libwebrtc -DNINJA_ARGS="-j 2" .
artifacts: artifacts:
- path: libwebrtc-0.0.1-rc.4-win32-x64.7z - path: libwebrtc-0.0.1-rc.4-win32-x64.7z