cmake: Minor refactor
cmake: Minor refactor

Minor refactor of build script for readability and diff-ability.

Signed-off-by: Sebastian Bøe <edee888afd63e94916688495334700803eba20a0@nordicsemi.no>

mbolivar/zephyr,ldts/zephyr,galak/zephyr,kraj/zephyr,punitvara/zephyr,nashif/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,nashif/zephyr,finikorg/zephyr,galak/zephyr,ldts/zephyr,ldts/zephyr,kraj/zephyr,punitvara/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,GiulianoFranchetto/zephyr,GiulianoFranchetto/zephyr,GiulianoFranchetto/zephyr,finikorg/zephyr,GiulianoFranchetto/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,zephyriot/zephyr,finikorg/zephyr,mbolivar/zephyr,nashif/zephyr,Vudentz/zephyr,galak/zephyr,mbolivar/zephyr,mbolivar/zephyr,Vudentz/zephyr,kraj/zephyr,explora26/zephyr,zephyriot/zephyr,Vudentz/zephyr,zephyriot/zephyr,kraj/zephyr,zephyriot/zephyr,GiulianoFranchetto/zephyr,explora26/zephyr,mbolivar/zephyr,ldts/zephyr,explora26/zephyr,punitvara/zephyr,Vudentz/zephyr,explora26/zephyr,kraj/zephyr,explora26/zephyr,nashif/zephyr,Vudentz/zephyr,galak/zephyr,ldts/zephyr,punitvara/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,zephyriot/zephyr,punitvara/zephyr