summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a9f68a8f2..95d54dadc 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -24,7 +24,7 @@ if (MSVC)
24 # Ensure that projects build with Unicode support. 24 # Ensure that projects build with Unicode support.
25 add_definitions(-DUNICODE -D_UNICODE) 25 add_definitions(-DUNICODE -D_UNICODE)
26 26
27 # /W3 - Level 3 warnings 27 # /W4 - Level 4 warnings
28 # /MP - Multi-threaded compilation 28 # /MP - Multi-threaded compilation
29 # /Zi - Output debugging information 29 # /Zi - Output debugging information
30 # /Zm - Specifies the precompiled header memory allocation limit 30 # /Zm - Specifies the precompiled header memory allocation limit
@@ -61,7 +61,7 @@ if (MSVC)
61 /external:W0 # Sets the default warning level to 0 for external headers, effectively turning off warnings for external headers 61 /external:W0 # Sets the default warning level to 0 for external headers, effectively turning off warnings for external headers
62 62
63 # Warnings 63 # Warnings
64 /W3 64 /W4
65 /WX 65 /WX
66 66
67 /we4062 # Enumerator 'identifier' in a switch of enum 'enumeration' is not handled 67 /we4062 # Enumerator 'identifier' in a switch of enum 'enumeration' is not handled
@@ -84,12 +84,16 @@ if (MSVC)
84 84
85 /wd4100 # 'identifier': unreferenced formal parameter 85 /wd4100 # 'identifier': unreferenced formal parameter
86 /wd4324 # 'struct_name': structure was padded due to __declspec(align()) 86 /wd4324 # 'struct_name': structure was padded due to __declspec(align())
87 /wd4201 # nonstandard extension used : nameless struct/union
87 ) 88 )
88 89
89 if (USE_CCACHE OR YUZU_USE_PRECOMPILED_HEADERS) 90 if (USE_CCACHE OR YUZU_USE_PRECOMPILED_HEADERS)
90 # when caching, we need to use /Z7 to downgrade debug info to use an older but more cacheable format 91 # when caching, we need to use /Z7 to downgrade debug info to use an older but more cacheable format
91 # Precompiled headers are deleted if not using /Z7. See https://github.com/nanoant/CMakePCHCompiler/issues/21 92 # Precompiled headers are deleted if not using /Z7. See https://github.com/nanoant/CMakePCHCompiler/issues/21
92 add_compile_options(/Z7) 93 add_compile_options(/Z7)
94 # Avoid D9025 warning
95 string(REPLACE "/Zi" "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
96 string(REPLACE "/Zi" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
93 else() 97 else()
94 add_compile_options(/Zi) 98 add_compile_options(/Zi)
95 endif() 99 endif()