mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 02:16:53 +08:00
cmake: use at least 1 core to build SITL
If we use -j 0, ninja fails with invalid argument.
This commit is contained in:
@@ -49,6 +49,10 @@ if(parallel_jobs GREATER NUMBER_OF_LOGICAL_CORES)
|
|||||||
set(parallel_jobs ${NUMBER_OF_LOGICAL_CORES})
|
set(parallel_jobs ${NUMBER_OF_LOGICAL_CORES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(parallel_jobs LESS 1)
|
||||||
|
set(parallel_jobs 1)
|
||||||
|
endif()
|
||||||
|
|
||||||
message(DEBUG "${NUMBER_OF_LOGICAL_CORES} logical cores detected and ${AVAILABLE_PHYSICAL_MEMORY} megabytes of memory available.
|
message(DEBUG "${NUMBER_OF_LOGICAL_CORES} logical cores detected and ${AVAILABLE_PHYSICAL_MEMORY} megabytes of memory available.
|
||||||
Limiting sitl_gazebo and simulation-ignition concurrent jobs to ${parallel_jobs}")
|
Limiting sitl_gazebo and simulation-ignition concurrent jobs to ${parallel_jobs}")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user