Speed up CI by using ninja and parallel build (#1347)
* chore(CI): speed up CI by using ninja and parallel build * chore(CI): align compiler for c and cxx * fix(samples): add dependency to generator * fix(cmake): get rid of file glob * chore(CI): use clang on mac glfw don't support gcc on mac * fix(sample): add depencency on build_vulkan_hpp * fix(cmake): make sure every target in tests and samples link to utils
This commit is contained in:
@@ -34,6 +34,6 @@ if(NOT SAMPLES_BUILD_ONLY_DYNAMIC)
|
||||
)
|
||||
|
||||
set_target_properties(01_InitInstance PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(01_InitInstance "${Vulkan_LIBRARIES}")
|
||||
target_link_libraries(01_InitInstance PRIVATE utils)
|
||||
|
||||
endif()
|
||||
|
||||
@@ -39,8 +39,6 @@ else()
|
||||
message(FATAL_ERROR, "Vulkan-Hpp: unhandled platform for samples!")
|
||||
endif()
|
||||
|
||||
FILE (GLOB linkunits ${CMAKE_CURRENT_SOURCE_DIR}/*)
|
||||
|
||||
if (SAMPLES_BUILD_WITH_LOCAL_VULKAN_HPP)
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/..")
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../Vulkan-Headers/include")
|
||||
@@ -48,11 +46,54 @@ else()
|
||||
include_directories("${Vulkan_INCLUDE_DIRS}")
|
||||
endif()
|
||||
|
||||
FOREACH( linkunit ${linkunits} )
|
||||
if( IS_DIRECTORY ${linkunit} )
|
||||
if( EXISTS ${linkunit}/CMakeLists.txt )
|
||||
string( REGEX REPLACE "^.*/([^/]*)$" "\\1" LINK_NAME ${linkunit} )
|
||||
add_subdirectory( ${LINK_NAME} )
|
||||
endif()
|
||||
endif()
|
||||
ENDFOREACH( linkunit ${linkunits} )
|
||||
add_subdirectory(utils)
|
||||
add_subdirectory(01_InitInstance)
|
||||
add_subdirectory(02_EnumerateDevices)
|
||||
add_subdirectory(03_InitDevice)
|
||||
add_subdirectory(04_InitCommandBuffer)
|
||||
add_subdirectory(05_InitSwapchain)
|
||||
add_subdirectory(06_InitDepthBuffer)
|
||||
add_subdirectory(07_InitUniformBuffer)
|
||||
add_subdirectory(08_InitPipelineLayout)
|
||||
add_subdirectory(09_InitDescriptorSet)
|
||||
add_subdirectory(10_InitRenderPass)
|
||||
add_subdirectory(11_InitShaders)
|
||||
add_subdirectory(12_InitFrameBuffers)
|
||||
add_subdirectory(13_InitVertexBuffer)
|
||||
add_subdirectory(14_InitPipeline)
|
||||
add_subdirectory(15_DrawCube)
|
||||
add_subdirectory(16_Vulkan_1_1)
|
||||
add_subdirectory(CopyBlitImage)
|
||||
add_subdirectory(CreateDebugUtilsMessenger)
|
||||
add_subdirectory(DebugUtilsObjectName)
|
||||
add_subdirectory(DrawTexturedCube)
|
||||
add_subdirectory(DynamicUniform)
|
||||
add_subdirectory(EnableValidationWithCallback)
|
||||
add_subdirectory(EnumerateDevicesAdvanced)
|
||||
add_subdirectory(Events)
|
||||
add_subdirectory(ImmutableSampler)
|
||||
add_subdirectory(InitTexture)
|
||||
add_subdirectory(InputAttachment)
|
||||
add_subdirectory(InstanceExtensionProperties)
|
||||
add_subdirectory(InstanceLayerExtensionProperties)
|
||||
add_subdirectory(InstanceLayerProperties)
|
||||
add_subdirectory(InstanceVersion)
|
||||
add_subdirectory(MultipleSets)
|
||||
add_subdirectory(OcclusionQuery)
|
||||
add_subdirectory(PhysicalDeviceExtensions)
|
||||
add_subdirectory(PhysicalDeviceFeatures)
|
||||
add_subdirectory(PhysicalDeviceGroups)
|
||||
add_subdirectory(PhysicalDeviceMemoryProperties)
|
||||
add_subdirectory(PhysicalDeviceProperties)
|
||||
add_subdirectory(PhysicalDeviceQueueFamilyProperties)
|
||||
add_subdirectory(PipelineCache)
|
||||
add_subdirectory(PipelineDerivative)
|
||||
add_subdirectory(PushConstants)
|
||||
add_subdirectory(PushDescriptors)
|
||||
add_subdirectory(RayTracing)
|
||||
add_subdirectory(SecondaryCommandBuffer)
|
||||
add_subdirectory(SeparateImageSampler)
|
||||
add_subdirectory(SurfaceCapabilities)
|
||||
add_subdirectory(SurfaceFormats)
|
||||
add_subdirectory(Template)
|
||||
add_subdirectory(TexelBuffer)
|
||||
|
||||
@@ -34,6 +34,6 @@ if(NOT SAMPLES_BUILD_ONLY_DYNAMIC)
|
||||
)
|
||||
|
||||
set_target_properties(CreateDebugUtilsMessenger PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(CreateDebugUtilsMessenger "${Vulkan_LIBRARIES}")
|
||||
target_link_libraries(CreateDebugUtilsMessenger PRIVATE utils)
|
||||
|
||||
endif()
|
||||
|
||||
@@ -34,6 +34,6 @@ if(NOT SAMPLES_BUILD_ONLY_DYNAMIC)
|
||||
)
|
||||
|
||||
set_target_properties(InstanceExtensionProperties PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(InstanceExtensionProperties "${Vulkan_LIBRARIES}")
|
||||
target_link_libraries(InstanceExtensionProperties PRIVATE utils)
|
||||
|
||||
endif()
|
||||
|
||||
@@ -34,6 +34,6 @@ if(NOT SAMPLES_BUILD_ONLY_DYNAMIC)
|
||||
)
|
||||
|
||||
set_target_properties(InstanceLayerExtensionProperties PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(InstanceLayerExtensionProperties "${Vulkan_LIBRARIES}")
|
||||
target_link_libraries(InstanceLayerExtensionProperties PRIVATE utils)
|
||||
|
||||
endif()
|
||||
|
||||
@@ -34,6 +34,6 @@ if(NOT SAMPLES_BUILD_ONLY_DYNAMIC)
|
||||
)
|
||||
|
||||
set_target_properties(InstanceLayerProperties PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(InstanceLayerProperties "${Vulkan_LIBRARIES}")
|
||||
target_link_libraries(InstanceLayerProperties PRIVATE utils)
|
||||
|
||||
endif()
|
||||
|
||||
@@ -34,6 +34,6 @@ if(NOT SAMPLES_BUILD_ONLY_DYNAMIC)
|
||||
)
|
||||
|
||||
set_target_properties(InstanceVersion PROPERTIES FOLDER "Samples")
|
||||
target_link_libraries(InstanceVersion "${Vulkan_LIBRARIES}")
|
||||
target_link_libraries(InstanceVersion PRIVATE utils)
|
||||
|
||||
endif()
|
||||
|
||||
@@ -36,6 +36,10 @@ add_library(utils
|
||||
${HEADERS}
|
||||
)
|
||||
|
||||
if (VULKAN_HPP_RUN_GENERATOR)
|
||||
add_dependencies(utils build_vulkan_hpp)
|
||||
endif()
|
||||
|
||||
target_link_libraries(utils PUBLIC glm)
|
||||
target_link_libraries(utils PUBLIC glfw)
|
||||
target_link_libraries(utils PUBLIC glslang)
|
||||
|
||||
Reference in New Issue
Block a user