Fix msvc build and enable multiprocessor builds

Disable warning C4324: 'struct_name' : structure was padded due to
__declspec(align())

Multiprocessor builds are not enabled by default when using msbuild,
unlike for Ninja builds.

Bug: tint:665
Change-Id: I0e50c88ac91acd963c31c07cbbf2fae6b743e77d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/45621
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
Antonio Maiorano 2021-03-23 14:03:58 +00:00 committed by Commit Bot service account
parent 2e97435ba6
commit e547605da7
1 changed files with 6 additions and 0 deletions

View File

@ -84,6 +84,11 @@ if (MSVC)
endif()
endif()
# Enable msbuild multiprocessor builds
if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
endif()
if (${TINT_CHECK_CHROMIUM_STYLE})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Xclang -add-plugin -Xclang find-bad-constructs")
endif()
@ -197,6 +202,7 @@ function(tint_default_compile_options TARGET)
/wd4127
/wd4244
/wd4267
/wd4324
/wd4458
/wd4514
/wd4571