How to increment variable

2019-02-16 07:37发布

问题:

In a CMake script, how to increment a variable ?

I was expecting a function like "increment(VAR)" but couldn't find any.

回答1:

MATH(EXPR VAR "${VAR}+1")

CMake documentation



标签: cmake