Skip to content

Commit 54ad621

Browse files
authored
cmake: Fix redundant dependency for build-version.inc (#6549)
The custom command to generate build-version.inc was being depended on in two ways by the SPIRV-Tools-static target. This caused issues with the Xcode "new build system" which does not allow this. This change removes the redundant dependency through the spirv-tools-build-version target. The dependency through the source file properties on software_version.cpp is sufficient. The spirv-tools-build-version target has also been removed since it is no longer used and was only a convenience target. Fixes #6548
1 parent e16e629 commit 54ad621

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

source/CMakeLists.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,6 @@ add_custom_command(OUTPUT ${SPIRV_TOOLS_BUILD_VERSION_INC}
149149
DEPENDS ${SPIRV_TOOLS_BUILD_VERSION_INC_GENERATOR}
150150
${SPIRV_TOOLS_CHANGES_FILE}
151151
COMMENT "Update build-version.inc in the SPIRV-Tools build directory (if necessary).")
152-
# Convenience target for standalone generation of the build-version.inc file.
153-
# This is not required for any dependence chain.
154-
add_custom_target(spirv-tools-build-version
155-
DEPENDS ${SPIRV_TOOLS_BUILD_VERSION_INC})
156-
set_property(TARGET spirv-tools-build-version PROPERTY FOLDER "SPIRV-Tools build")
157152

158153
list(APPEND PCH_DEPENDS
159154
${CORE_TABLES_HEADER_INC_FILE}
@@ -340,7 +335,7 @@ function(spirv_tools_default_target_options target)
340335
)
341336
set_property(TARGET ${target} PROPERTY FOLDER "SPIRV-Tools libraries")
342337
spvtools_check_symbol_exports(${target})
343-
add_dependencies(${target} spirv-tools-build-version core_tables extinst_tables)
338+
add_dependencies(${target} core_tables extinst_tables)
344339
endfunction()
345340

346341
# Always build ${SPIRV_TOOLS}-shared. This is expected distro packages, and

0 commit comments

Comments
 (0)