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

View file

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

View file

@ -88,7 +88,7 @@ add_libwebrtc_command(webrtc-clang
#
# 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
"Build"
"${LIBWEBRTC_BUILD_CMD}"
@ -109,4 +109,4 @@ ExternalProject_Add(libwebrtc
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}
-DLIBWEBRTC_INCLUDE_DIR:STRING=${CMAKE_BINARY_DIR}/src/webrtc
-DLIBWEBRTC_OUTPUT_DIR:PATH=${CMAKE_BINARY_DIR}/src/out/Default)
-DLIBWEBRTC_OUTPUT_DIR:PATH=${CMAKE_BINARY_DIR}/src/out/Default)

View file

@ -13,7 +13,7 @@ build:
before_build:
- cd c:\projects\libwebrtc
- 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:
- path: libwebrtc-0.0.1-rc.4-win32-x64.7z