diff --git a/cmake/BuildVulkanShaders.cmake b/cmake/BuildVulkanShaders.cmake index f2bcdbe1c..a75fbef15 100644 --- a/cmake/BuildVulkanShaders.cmake +++ b/cmake/BuildVulkanShaders.cmake @@ -162,9 +162,15 @@ if(NOT FOUND_MATCHING_SHA256_FILE) generate_shader_file("-DTW_QUAD_TEXTURED" "-DTW_PUSH_CONST" "${PROJECT_SOURCE_DIR}/data/shader/vulkan/quad.frag" "data/shader/vulkan/quad_push_textured.frag.spv") generate_shader_file("-DTW_QUAD_TEXTURED" "-DTW_PUSH_CONST" "${PROJECT_SOURCE_DIR}/data/shader/vulkan/quad.vert" "data/shader/vulkan/quad_push_textured.vert.spv") - execute_process(${GLSLANG_VALIDATOR_COMMAND_LIST}) + execute_process(${GLSLANG_VALIDATOR_COMMAND_LIST} RESULT_VARIABLE STATUS) + if(STATUS AND NOT STATUS EQUAL 0) + message(FATAL_ERROR "${GLSLANG_VALIDATOR_COMMAND_LIST} failed") + endif() if(SPIRV_OPTIMIZER_PROGRAM_FOUND) - execute_process(${SPIRV_OPTIMIZER_COMMAND_LIST}) + execute_process(${SPIRV_OPTIMIZER_COMMAND_LIST} RESULT_VARIABLE STATUS) + if(STATUS AND NOT STATUS EQUAL 0) + message(FATAL_ERROR "${SPIRV_OPTIMIZER_COMMAND_LIST} failed") + endif() file(REMOVE ${GLSLANG_VALIDATOR_DELETE_LIST}) endif()