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

Commit 8e6e00e

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 59490a2 commit 8e6e00e

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
@@ -217,6 +217,9 @@ add_vk_layer(unique_objects unique_objects.cpp unique_objects_wrappers.h vk_laye
217217
add_vk_layer(parameter_validation parameter_validation.cpp parameter_validation_utils.cpp parameter_validation.h vk_layer_table.cpp vk_validation_error_messages.h)
218218

219219
# Core validation has additional dependencies
220+
# Dependency on unique_objects is only to prevent parallel build of both layers.
221+
# Visual Studio has trouble with clobbering vk_safe_struct.cpp if both build in parallel.
222+
add_dependencies(VkLayer_core_validation VkLayer_unique_objects)
220223
target_include_directories(VkLayer_core_validation PRIVATE ${GLSLANG_SPIRV_INCLUDE_DIR})
221224
target_include_directories(VkLayer_core_validation PRIVATE ${SPIRV_TOOLS_INCLUDE_DIR})
222225
target_link_libraries(VkLayer_core_validation ${SPIRV_TOOLS_LIBRARIES})

0 commit comments

Comments
 (0)