14-cmake语法-循环
循环:
- foreach
set(VAR a b c) foreach(f ${VAR}) message(${f}) endforeach()
- while
set(VAR 5) while(${VAR} GREATER 0) message(${VAR}) math(EXPR VAR "${VAR} - 1") endwhile()
GRATER 就是“大于”
math是计算数值。
参考:
https://www.jianshu.com/p/44ba033c262a