1 if(DEFINED CI_JOB_INDEX AND DEFINED CI_JOB_COUNT)
2 math(EXPR job_name "${CI_JOB_INDEX}+1")
3 message("-- configuring CI job ${job_name}/${CI_JOB_COUNT}")
4 get_property(targets GLOBAL PROPERTY RELEASE_TARGETS)
5 list(LENGTH targets count)
6 math(EXPR per_job "(${count}+${CI_JOB_COUNT}-1)/${CI_JOB_COUNT}")
7 message("-- ${per_job} targets per job")
8 math(EXPR start "${CI_JOB_INDEX}*${per_job}")
9 list(SUBLIST targets ${start} ${per_job} ci_targets)
10 message("-- will build targets: ${ci_targets}")
12 ${CMAKE_COMMAND} -E true