diff options
author | MaulingMonkey <git@maulingmonkey.com> | 2021-02-26 01:01:03 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-26 01:01:03 -0800 |
commit | fd10f10d282f332e8c698da481747e34eb222901 (patch) | |
tree | e6e14025b677d77cee344db20c574fd670a9e847 | |
parent | 856c70b5985da942ffea82a613fc8357055020f2 (diff) | |
download | binaryen-fd10f10d282f332e8c698da481747e34eb222901.tar.gz binaryen-fd10f10d282f332e8c698da481747e34eb222901.tar.bz2 binaryen-fd10f10d282f332e8c698da481747e34eb222901.zip |
Fix VS2017 builds with /std:c++17 (#3620)
-rw-r--r-- | CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index fbcf3caca..818515972 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -152,6 +152,7 @@ if(MSVC) if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.0") # VS2013 and older explicitly need /arch:sse2 set, VS2015 no longer has that option, but always enabled. add_compile_flag("/arch:sse2") endif() + add_compile_flag("/std:c++17") # VS2017 generates "error C2429: attribute 'fallthrough' requires compiler flag '/std:c++17'" add_compile_flag("/wd4146") # Ignore warning "warning C4146: unary minus operator applied to unsigned type, result still unsigned", this pattern is used somewhat commonly in the code. # 4267 and 4244 are conversion/truncation warnings. We might want to fix these but they are currently pervasive. add_compile_flag("/wd4267") |