diff options
author | Chris Robinson <[email protected]> | 2023-01-05 17:41:30 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-01-05 17:41:30 -0800 |
commit | 3f8a3af3637606dae61ba112cb5bd9d2d897e5cb (patch) | |
tree | cfe5017b516def72d858624a72a26216d34eb1c4 | |
parent | d61376e54c6b0dabd5f0fea2604cdfb03c34dac9 (diff) |
Disable MSVC warning C5051
"attribute 'attribute-name' requires at least 'standard-level'; ignored"
This hides the fact that it's not optimizing [[likely]] and [[unlikely]], even
though it could (GCC does, Clang gives a similar warning to MSVC, but is
ambiguous about whether it's still doing the optimization). There's nothing I
know to do to make MSVC do those optimizations it otherwise knows to do, so
just hide the warnings instead of pessimizing the code.
-rw-r--r-- | CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e20770bc..c721b641 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -230,7 +230,7 @@ if(MSVC) if(HAVE_PERMISSIVE_SWITCH) set(C_FLAGS ${C_FLAGS} $<$<COMPILE_LANGUAGE:CXX>:/permissive->) endif() - set(C_FLAGS ${C_FLAGS} /W4 /w14640 /wd4065 /wd4127 /wd4268 /wd4324 /wd5030) + set(C_FLAGS ${C_FLAGS} /W4 /w14640 /wd4065 /wd4127 /wd4268 /wd4324 /wd5030 /wd5051) if(NOT DXSDK_DIR) string(REGEX REPLACE "\\\\" "/" DXSDK_DIR "$ENV{DXSDK_DIR}") |