cmake/Tests/CMakeTests/WhileTest.cmake.in

18 lines
392 B
CMake
Raw Normal View History

2012-04-19 19:04:21 +03:00
set(NUMBERS "")
set(COUNT 0)
while(COUNT LESS 200)
2016-10-30 18:24:19 +01:00
string(APPEND NUMBERS " ${COUNT}")
2012-04-19 19:04:21 +03:00
set(COUNT "2${COUNT}")
set(NCOUNT 3)
while(NCOUNT LESS 31)
2016-10-30 18:24:19 +01:00
string(APPEND NUMBERS " ${NCOUNT}")
string(APPEND NCOUNT "0")
2012-04-19 19:04:21 +03:00
endwhile()
2013-03-16 19:13:01 +02:00
endwhile()
2012-04-19 19:04:21 +03:00
if(NOT NUMBERS STREQUAL " 0 3 30 20 3 30")
message(SEND_ERROR "while loop nesting error, result: '${NUMBERS}'")
endif()