https://github.com/Kitware/CMake
Raw File
Tip revision: 45da558742bad36be518e8d95dee0d0ec3793a64 authored by Brad King on 01 November 2017, 12:26:04 UTC
CMake 3.10.0-rc4
Tip revision: 45da558
WhileTest.cmake.in
set(NUMBERS "")
set(COUNT 0)

while(COUNT LESS 200)
    string(APPEND NUMBERS " ${COUNT}")
    set(COUNT "2${COUNT}")

    set(NCOUNT 3)
    while(NCOUNT LESS 31)
        string(APPEND NUMBERS " ${NCOUNT}")
        string(APPEND NCOUNT "0")
    endwhile()
endwhile()

if(NOT NUMBERS STREQUAL " 0 3 30 20 3 30")
    message(SEND_ERROR "while loop nesting error, result: '${NUMBERS}'")
endif()
back to top