Made clang-cl use the right warning flags

This commit is contained in:
Charles Giessen 2020-05-03 21:54:40 -06:00
parent 5e5b446d41
commit 1daf83f541
2 changed files with 3 additions and 4 deletions

View File

@ -9,13 +9,13 @@ add_library(vk-bootstrap::vk-bootstrap ALIAS vk-bootstrap)
add_library(vk-bootstrap-compiler-warnings INTERFACE) add_library(vk-bootstrap-compiler-warnings INTERFACE)
target_compile_options(vk-bootstrap-compiler-warnings target_compile_options(vk-bootstrap-compiler-warnings
INTERFACE INTERFACE
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>: $<$<OR:$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>,$<AND:$<CXX_COMPILER_ID:Clang>,$<NOT:$<STREQUAL:"x${CMAKE_CXX_SIMULATE_ID}","xMSVC">>>>:
-Wall -Wall
-Wextra -Wextra
-pedantic-errors -pedantic-errors
-Wconversion -Wconversion
-Wsign-conversion> -Wsign-conversion>
$<$<CXX_COMPILER_ID:MSVC>: $<$<OR:$<CXX_COMPILER_ID:MSVC>,$<AND:$<CXX_COMPILER_ID:Clang>,$<STREQUAL:"x${CMAKE_CXX_SIMULATE_ID}","xMSVC">>>:
/WX /WX
/W4> /W4>
) )

View File

@ -357,8 +357,7 @@ int create_command_buffers (Init& init, RenderData& data) {
render_pass_info.framebuffer = data.framebuffers[i]; render_pass_info.framebuffer = data.framebuffers[i];
render_pass_info.renderArea.offset = { 0, 0 }; render_pass_info.renderArea.offset = { 0, 0 };
render_pass_info.renderArea.extent = init.swapchain.extent; render_pass_info.renderArea.extent = init.swapchain.extent;
VkClearValue clearColor{ { { 0.0f, 0.0f, 0.0f, 1.0f } } };
VkClearValue clearColor = { 0.0f, 0.0f, 0.0f, 1.0f };
render_pass_info.clearValueCount = 1; render_pass_info.clearValueCount = 1;
render_pass_info.pClearValues = &clearColor; render_pass_info.pClearValues = &clearColor;