On 12/05/2013 03:39 PM, Alan W. Irwin wrote: > But if you replace > > message(FATAL_ERROR "Should stop loop?") ==> > add_subdirectory(non_existent_directory)
Okay, so the code in question is: while(1) add_subdirectory(non_existent_directory) message(STATUS "Did I make it by FATAL_ERROR?") endwhile(1) > in the above CMake logic you get an infinite loop despite the FATAL > error from the add_subdirectory command. A missing subdirectory is not a FATAL error. Your example is similar to while(1) message(SEND_ERROR "This is not a fatal error") message(STATUS "I made it past SEND_ERROR as docs state") endwhile() which is clearly an infinite loop. Any number of non-fatal errors could occur inside a loop and not affect the loop termination. -Brad -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers