Revision 1a53d6b68179ffa6cb456023ad00828effad4044 authored by Derek Gerstmann on 24 April 2023, 19:52:24 UTC, committed by Derek Gerstmann on 24 April 2023, 19:52:24 UTC
2 parent s bf21d5f + fcddcf8
Raw File
CheckFilesExist.cmake
function(check_files_exist FAILED)
    set(${FAILED} FALSE PARENT_SCOPE)
    foreach (F IN LISTS ARGN)
        if (NOT EXISTS ${F})
            message(STATUS "File not found: ${F}")
            set(${FAILED} TRUE PARENT_SCOPE)
        endif ()
    endforeach ()
endfunction()

if (CMAKE_SCRIPT_MODE_FILE)
    check_files_exist(FAILED ${FILES_TO_CHECK})
    if (FAILED)
        message(FATAL_ERROR "One or more files weren't found")
    endif ()
endif ()
back to top