13 lines
256 B
CMake
13 lines
256 B
CMake
foreach(i RANGE 1 100)
|
|
math(EXPR off3 "${i} % 3")
|
|
math(EXPR off5 "${i} % 5")
|
|
if(NOT off3 AND NOT off5)
|
|
message(FizzBuzz)
|
|
elseif(NOT off3)
|
|
message(Fizz)
|
|
elseif(NOT off5)
|
|
message(Buzz)
|
|
else()
|
|
message(${i})
|
|
endif()
|
|
endforeach(i)
|