1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-13 03:19:58 +03:00
inav/cmake/ci.cmake
Alberto García Hierro 888763f59e [CMAKE] Cosmetic changes
- Make sure all the new files are terminated with newlines
- Fix typos
2020-08-27 12:30:51 +01:00

15 lines
620 B
CMake

if(DEFINED CI_JOB_INDEX AND DEFINED CI_JOB_COUNT)
math(EXPR job_name "${CI_JOB_INDEX}+1")
message("-- configuring CI job ${job_name}/${CI_JOB_COUNT}")
get_property(targets GLOBAL PROPERTY RELEASE_TARGETS)
list(LENGTH targets count)
math(EXPR per_job "(${count}+${CI_JOB_COUNT}-1)/${CI_JOB_COUNT}")
message("-- ${per_job} targets per job")
math(EXPR start "${CI_JOB_INDEX}*${per_job}")
list(SUBLIST targets ${start} ${per_job} ci_targets)
message("-- will build targets: ${ci_targets}")
add_custom_target(ci
${CMAKE_COMMAND} -E true
DEPENDS ${ci_targets}
)
endif()