|
|
@ -56,26 +56,22 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
|
|
|
|
|
|
|
|
|
|
if(MSVC)
|
|
|
|
if(MSVC)
|
|
|
|
# cmake 3.10 is first version that support msvc standard settings
|
|
|
|
# disable C4819 code-page warning
|
|
|
|
if(${CMAKE_VERSION} VERSION_LESS "3.10.0")
|
|
|
|
add_definitions( "/wd4819" )
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++11")
|
|
|
|
|
|
|
|
endif()
|
|
|
|
# Disable use of POSIX name warnings
|
|
|
|
# disable C4819 code-page warning
|
|
|
|
add_definitions ( "/D_CRT_NONSTDC_NO_WARNINGS /D_CRT_SECURE_NO_WARNINGS")
|
|
|
|
add_definitions( "/wd4819" )
|
|
|
|
|
|
|
|
|
|
|
|
# supress C4503 - VC++ dislikes if a name is too long. If you get
|
|
|
|
# Disable use of POSIX name warnings
|
|
|
|
# weird and mysterious linking errors, you can disable this, but you'll have to
|
|
|
|
add_definitions ( "/D_CRT_NONSTDC_NO_WARNINGS /D_CRT_SECURE_NO_WARNINGS")
|
|
|
|
# deal with a LOT of compiler noise over it
|
|
|
|
|
|
|
|
# see https://msdn.microsoft.com/en-us/library/074af4b6.aspx
|
|
|
|
# supress C4503 - VC++ dislikes if a name is too long. If you get
|
|
|
|
add_definitions( "/wd4503")
|
|
|
|
# weird and mysterious linking errors, you can disable this, but you'll have to
|
|
|
|
|
|
|
|
# deal with a LOT of compiler noise over it
|
|
|
|
# suppress C4267 - VC++ complains whenever we implicitly convert an integer to
|
|
|
|
# see https://msdn.microsoft.com/en-us/library/074af4b6.aspx
|
|
|
|
# a smaller type, and most of the time this is just conversion from 64 to 32 bits
|
|
|
|
add_definitions( "/wd4503")
|
|
|
|
# for things like vector sizes, which are never that big anyway.
|
|
|
|
|
|
|
|
add_definitions( "/wd4267")
|
|
|
|
# suppress C4267 - VC++ complains whenever we implicitly convert an integer to
|
|
|
|
|
|
|
|
# a smaller type, and most of the time this is just conversion from 64 to 32 bits
|
|
|
|
|
|
|
|
# for things like vector sizes, which are never that big anyway.
|
|
|
|
|
|
|
|
add_definitions( "/wd4267")
|
|
|
|
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
# Automatically detect architecture based on Visual Studio generator
|
|
|
|
# Automatically detect architecture based on Visual Studio generator
|
|
|
|