blob: 7e60fc725edcd27b8dee238323d55c733ab4f1dc [file] [log] [blame]
function (CHECK_ERRORS command)
set (errors ${ARGN})
set (command "$<${command}>")
if (errors)
string (LENGTH "${command}" length)
math (EXPR count "${length} + 2")
string (REPEAT " " ${count} shift)
list (TRANSFORM errors PREPEND "${shift}")
list (JOIN errors "\n" msg)
message (FATAL_ERROR "${command}: ${msg}")
endif()
endfunction()