@ -48,7 +48,18 @@ if(WIN32)
endif ( )
endif ( )
# A s k f o r C + + 1 4 s t a n d a r d f r o m c o m p i l e r s
set ( CMAKE_CXX_STANDARD 14 )
# R e q u i r e t h e s t a n d a r d s u p p o r t f r o m c o m p i l e r s .
set ( CMAKE_CXX_STANDARD_REQUIRED ON )
# U s e o n l y s t a n d a r d c + + t o k e e p c o d e p o r t a b l e
set ( CMAKE_CXX_EXTENSIONS OFF )
if ( MSVC )
# c m a k e 3 . 1 0 i s f i r s t v e r s i o n t h a t s u p p o r t m s v c s t a n d a r d s e t t i n g s
if ( ${ CMAKE_VERSION } VERSION_LESS "3.10.0" )
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++14" )
endif ( )
# d i s a b l e C 4 8 1 9 c o d e - p a g e w a r n i n g
add_definitions ( "/wd4819" )
@ -191,7 +202,7 @@ IF(UNIX)
add_definitions ( -DLINUX_BUILD )
add_definitions ( -D_GLIBCXX_USE_C99 )
SET ( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -g -Wall -Wno-unused-variable" )
SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -mtune=generic -std=c++0x ")
SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -mtune=generic ")
SET ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -mtune=generic" )
IF ( DFHACK_BUILD_64 )
SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64 -mno-avx" )