Browse Source

WIP

pull/3282/head
Caio Oliveira 4 weeks ago
committed by lizzie
parent
commit
7cd2ca7418
  1. 4
      CMakeLists.txt
  2. 18
      src/CMakeLists.txt

4
CMakeLists.txt

@ -132,6 +132,10 @@ if (CXX_CLANG_CL)
endif() endif()
endif() endif()
if (MSVC AND NOT CXX_CLANG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
endif()
# Set bundled sdl2/qt as dependent options. # Set bundled sdl2/qt as dependent options.
# On Linux system SDL2 is likely to be lacking HIDAPI support which have drawbacks but is needed for SDL motion # On Linux system SDL2 is likely to be lacking HIDAPI support which have drawbacks but is needed for SDL motion
cmake_dependent_option(ENABLE_SDL2 "Enable the SDL2 frontend" ON "NOT ANDROID" OFF) cmake_dependent_option(ENABLE_SDL2 "Enable the SDL2 frontend" ON "NOT ANDROID" OFF)

18
src/CMakeLists.txt

@ -25,7 +25,7 @@ if (MSVC AND NOT CXX_CLANG)
set(CMAKE_CONFIGURATION_TYPES Debug Release CACHE STRING "" FORCE) set(CMAKE_CONFIGURATION_TYPES Debug Release CACHE STRING "" FORCE)
# Silence "deprecation" warnings # Silence "deprecation" warnings
add_compile_definitions(_CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_DEPRECATE _SCL_SECURE_NO_WARNINGS)
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
# Avoid windows.h junk # Avoid windows.h junk
add_compile_definitions(NOMINMAX) add_compile_definitions(NOMINMAX)
@ -38,7 +38,6 @@ if (MSVC AND NOT CXX_CLANG)
# /W4 - Level 4 warnings # /W4 - Level 4 warnings
# /MP - Multi-threaded compilation # /MP - Multi-threaded compilation
# /Zm - Specifies the precompiled header memory allocation limit
# /Zo - Enhanced debug info for optimized builds # /Zo - Enhanced debug info for optimized builds
# /permissive- - Enables stricter C++ standards conformance checks # /permissive- - Enables stricter C++ standards conformance checks
# /EHsc - C++-only exception handling semantics # /EHsc - C++-only exception handling semantics
@ -51,7 +50,6 @@ if (MSVC AND NOT CXX_CLANG)
# /GT - Supports fiber safety for data allocated using static thread-local storage # /GT - Supports fiber safety for data allocated using static thread-local storage
add_compile_options( add_compile_options(
/MP /MP
/Zm200
/Zo /Zo
/permissive- /permissive-
/EHsc /EHsc
@ -62,7 +60,13 @@ if (MSVC AND NOT CXX_CLANG)
/Zc:inline /Zc:inline
/Zc:preprocessor /Zc:preprocessor
/Zc:throwingNew /Zc:throwingNew
/Zc:__cplusplus
/Zc:lambda
/Zc:enumTypes
/Zc:ternary
/bigobj # Increase number of sections in .obj files
/GT /GT
/W4
# External headers diagnostics # External headers diagnostics
/external:anglebrackets # Treats all headers included by #include <header>, where the header file is enclosed in angle brackets (< >), as external headers /external:anglebrackets # Treats all headers included by #include <header>, where the header file is enclosed in angle brackets (< >), as external headers
@ -92,14 +96,6 @@ if (MSVC AND NOT CXX_CLANG)
/wd4702 # unreachable code (when used with LTO) /wd4702 # unreachable code (when used with LTO)
) )
if (NOT CXX_CLANG)
add_compile_options(
# Warnings
/W4
/WX-
)
endif()
if (ARCHITECTURE_x86_64) if (ARCHITECTURE_x86_64)
add_compile_options(/QIntel-jcc-erratum) add_compile_options(/QIntel-jcc-erratum)
endif() endif()

Loading…
Cancel
Save