Merge pull request #6 from lioncash/flags

CMakeLists: Enable extra standards conformance flags on MSVC
This commit is contained in:
Phillip Stephens 2019-08-30 16:28:04 -07:00 committed by GitHub
commit a638632fbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 0 deletions

View File

@ -20,6 +20,25 @@ add_library(kabufuda STATIC
)
if(WIN32)
if (MSVC)
target_compile_options(kabufuda PRIVATE
# Enforce various standards compliant behavior.
/permissive-
# Enable standard volatile semantics.
/volatile:iso
# Reports the proper value for the __cplusplus preprocessor macro.
/Zc:__cplusplus
# Allow constexpr variables to have explicit external linkage.
/Zc:externConstexpr
# Assume that new throws exceptions, allowing better code generation.
/Zc:throwingNew
)
endif()
target_sources(kabufuda PRIVATE
include/kabufuda/winsupport.hpp
lib/kabufuda/AsyncIOWin32.cpp