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

Commit

Permalink
layers:Prevent parallel build conflict
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tobine committed Dec 15, 2017
1 parent 59490a2 commit 8e6e00e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions layers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ add_vk_layer(unique_objects unique_objects.cpp unique_objects_wrappers.h vk_laye
add_vk_layer(parameter_validation parameter_validation.cpp parameter_validation_utils.cpp parameter_validation.h vk_layer_table.cpp vk_validation_error_messages.h)

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

0 comments on commit 8e6e00e

Please sign in to comment.