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 @@ -145,7 +145,8 @@ if (Vulkan_FOUND)
145145 -DCMAKE_BUILD_TYPE=$<CONFIG>
146146 ${VULKAN_SHADER_GEN_CMAKE_ARGS}
147147
148- BUILD_COMMAND ${CMAKE_COMMAND} --build . --config $<CONFIG>
148+ BUILD_COMMAND ${CMAKE_COMMAND} --build . --config $<CONFIG>
149+ BUILD_ALWAYS TRUE
149150
150151 # NOTE: When DESTDIR is set using Makefile generators and
151152 # "make install" triggers the build step, vulkan-shaders-gen
@@ -166,6 +167,14 @@ if (Vulkan_FOUND)
166167
167168 file (GLOB _ggml_vk_shader_files CONFIGURE_DEPENDS "${_ggml_vk_input_dir} /*.comp" )
168169
170+ # Because external projects do not provide source-level tracking,
171+ # the vulkan-shaders-gen sources need to be explicitly added to
172+ # ensure that changes will cascade into shader re-generation.
173+
174+ file (GLOB _ggml_vk_shaders_gen_sources
175+ CONFIGURE_DEPENDS "${_ggml_vk_input_dir} /*.cpp"
176+ "${_ggml_vk_input_dir} /*.h" )
177+
169178 add_custom_command (
170179 OUTPUT ${_ggml_vk_header}
171180 ${_ggml_vk_source}
@@ -180,6 +189,7 @@ if (Vulkan_FOUND)
180189 --no -clean
181190
182191 DEPENDS ${_ggml_vk_shader_files}
192+ ${_ggml_vk_shaders_gen_sources}
183193 vulkan-shaders-gen
184194
185195 COMMENT "Generate vulkan shaders"
You can’t perform that action at this time.
0 commit comments