File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -143,7 +143,8 @@ if (Vulkan_FOUND)
143143 -DCMAKE_BUILD_TYPE=$<CONFIG>
144144 ${VULKAN_SHADER_GEN_CMAKE_ARGS}
145145
146- BUILD_COMMAND ${CMAKE_COMMAND} --build . --config $<CONFIG>
146+ BUILD_COMMAND ${CMAKE_COMMAND} --build . --config $<CONFIG>
147+ BUILD_ALWAYS TRUE
147148
148149 # NOTE: When DESTDIR is set using Makefile generators and
149150 # "make install" triggers the build step, vulkan-shaders-gen
@@ -164,6 +165,14 @@ if (Vulkan_FOUND)
164165
165166 file (GLOB _ggml_vk_shader_files CONFIGURE_DEPENDS "${_ggml_vk_input_dir} /*.comp" )
166167
168+ # Because external projects do not provide source-level tracking,
169+ # the vulkan-shaders-gen sources need to be explicitly added to
170+ # ensure that changes will cascade into shader re-generation.
171+
172+ file (GLOB _ggml_vk_shaders_gen_sources
173+ CONFIGURE_DEPENDS "${_ggml_vk_input_dir} /*.cpp"
174+ "${_ggml_vk_input_dir} /*.h" )
175+
167176 add_custom_command (
168177 OUTPUT ${_ggml_vk_header}
169178 ${_ggml_vk_source}
@@ -177,6 +186,7 @@ if (Vulkan_FOUND)
177186 --no -clean
178187
179188 DEPENDS ${_ggml_vk_shader_files}
189+ ${_ggml_vk_shaders_gen_sources}
180190 vulkan-shaders-gen
181191
182192 COMMENT "Generate vulkan shaders"
You can’t perform that action at this time.
0 commit comments