Skip to content
This repository was archived by the owner on Jul 19, 2018. It is now read-only.

Commit 88070f9

Browse files
committed
layers:Prevent parallel build conflict
Core validation and unique_objects layers both use generated safe_struct.cpp file. To prevent a potential build race condition on the windows build, add a dependency between those two layers.
1 parent 6b257a2 commit 88070f9

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

layers/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@ add_vk_layer(unique_objects unique_objects.cpp unique_objects_wrappers.h vk_laye
225225
add_vk_layer(parameter_validation parameter_validation.cpp parameter_validation_utils.cpp parameter_validation.h vk_layer_table.cpp vk_validation_error_messages.h)
226226

227227
# Core validation has additional dependencies
228+
# Dependency on unique_objects is only to prevent parallel build of both layers.
229+
# Visual Studio has trouble with clobbering vk_safe_struct.cpp if both build in parallel.
230+
add_dependencies(VkLayer_core_validation VkLayer_unique_objects)
228231
target_include_directories(VkLayer_core_validation PRIVATE ${GLSLANG_SPIRV_INCLUDE_DIR})
229232
target_include_directories(VkLayer_core_validation PRIVATE ${SPIRV_TOOLS_INCLUDE_DIR})
230233
target_link_libraries(VkLayer_core_validation ${SPIRV_TOOLS_LIBRARIES})

0 commit comments

Comments
 (0)