Tidy up MSVC CMakeLists.txt

fix #650
This commit is contained in:
Vinnie Falco
2017-07-27 12:15:17 -07:00
parent e87bac242b
commit fd1b236159
2 changed files with 9 additions and 1 deletions

View File

@ -4,6 +4,7 @@ Version 91:
* Don't build pre-C++11
* source.dox is path-independent
* Tidy up namespace qualifiers
* Tidy up MSVC CMakeLists.txt
WebSocket:

View File

@ -22,10 +22,17 @@ if (MSVC)
add_definitions (-D_SCL_SECURE_NO_WARNINGS=1)
add_definitions (-D_CRT_SECURE_NO_WARNINGS=1)
add_compile_options(
/bigobj # large object file format
/permissive- # strict C++
#/wd4503 # decorated name length exceeded, name was truncated
/W4 # enable all warnings
/MP # Multi-processor compilation
)
set (Boost_USE_STATIC_LIBS ON)
set (Boost_USE_STATIC_RUNTIME ON)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /W4 /bigobj /permissive-")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Ob2 /Oi /Ot /GL /MT")
set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Oi /Ot /MT")