mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-22 10:22:52 +01:00
ctest+ci: enable parallel building
This commit is contained in:
parent
56bd77af4e
commit
564f6efeb5
@ -39,6 +39,7 @@ set(_ARGS_ONEVAL
|
||||
|
||||
set(_ARGS_MULVAL
|
||||
CONFIGURE_EXTRA_OPTIONS
|
||||
BUILD_EXTRA_FLAGS
|
||||
)
|
||||
|
||||
foreach(_ARG ${_ARGS_BOOL} ${_ARGS_ONEVAL} ${_ARGS_MULVAL})
|
||||
@ -186,6 +187,7 @@ ctest_configure(
|
||||
message(STATUS "Building...")
|
||||
ctest_build(
|
||||
CONFIGURATION "${_CTEST_BUILD_CONFIGURATION}"
|
||||
FLAGS ${BUILD_EXTRA_FLAGS}
|
||||
NUMBER_ERRORS _NB_BUILD_ERRORS
|
||||
)
|
||||
|
||||
|
@ -5,6 +5,7 @@ else()
|
||||
set(DEBUG FALSE)
|
||||
endif()
|
||||
set(CONFIGURE_EXTRA_OPTIONS ";")
|
||||
set(BUILD_EXTRA_FLAGS "")
|
||||
set(BUILD_TOOLS TRUE)
|
||||
set(BUILD_VIEWER TRUE)
|
||||
set(COVERAGE_COMMAND gcov)
|
||||
|
@ -5,6 +5,13 @@ else()
|
||||
set(DEBUG FALSE)
|
||||
endif()
|
||||
set(CONFIGURE_EXTRA_OPTIONS ";")
|
||||
include(ProcessorCount)
|
||||
ProcessorCount(CORES_COUNT)
|
||||
set(BUILD_EXTRA_FLAGS "")
|
||||
if(NOT CORES_COUNT EQUAL 0)
|
||||
list(APPEND BUILD_EXTRA_FLAGS "-j${CORES_COUNT}")
|
||||
endif()
|
||||
|
||||
set(BUILD_TOOLS TRUE)
|
||||
set(BUILD_VIEWER TRUE)
|
||||
set(COVERAGE_COMMAND gcov)
|
||||
|
@ -23,6 +23,7 @@ else()
|
||||
endif()
|
||||
|
||||
set(CONFIGURE_EXTRA_OPTIONS ";")
|
||||
set(BUILD_EXTRA_FLAGS "")
|
||||
|
||||
if(CONFIGURATION STREQUAL "Debug")
|
||||
set(DEBUG TRUE)
|
||||
|
Loading…
Reference in New Issue
Block a user