@ -1,3 +1,5 @@
# S P D X - F i l e C o p y r i g h t T e x t : C o p y r i g h t 2 0 2 5 E d e n E m u l a t o r P r o j e c t
# S P D X - L i c e n s e - I d e n t i f i e r : G P L - 3 . 0 - o r - l a t e r
# S P D X - F i l e C o p y r i g h t T e x t : 2 0 1 8 y u z u E m u l a t o r P r o j e c t
# S P D X - L i c e n s e - I d e n t i f i e r : G P L - 2 . 0 - o r - l a t e r
@ -88,26 +90,26 @@ if (MSVC)
/ w d 4 7 0 2 # u n r e a c h a b l e code ( when used with LTO )
)
if ( USE_CCACHE OR YUZU_USE_PRECOMPILED_HEADERS )
# w h e n c a c h i n g , w e n e e d t o u s e / Z 7 t o d o w n g r a d e d e b u g i n f o t o u s e a n o l d e r b u t m o r e c a c h e a b l e f o r m a t
# P r e c o m p i l e d h e a d e r s a r e d e l e t e d i f n o t u s i n g / Z 7 . S e e h t t p s : / / g i t h u b . c o m / n a n o a n t / C M a k e P C H C o m p i l e r / i s s u e s / 2 1
add_compile_options ( /Z7 )
# A v o i d D 9 0 2 5 w a r n i n g
string ( REPLACE "/Zi" "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}" )
string ( REPLACE "/Zi" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}" )
else ( )
add_compile_options ( /Zi )
endif ( )
if ( USE_CCACHE OR YUZU_USE_PRECOMPILED_HEADERS )
# w h e n c a c h i n g , w e n e e d t o u s e / Z 7 t o d o w n g r a d e d e b u g i n f o t o u s e a n o l d e r b u t m o r e c a c h e a b l e f o r m a t
# P r e c o m p i l e d h e a d e r s a r e d e l e t e d i f n o t u s i n g / Z 7 . S e e h t t p s : / / g i t h u b . c o m / n a n o a n t / C M a k e P C H C o m p i l e r / i s s u e s / 2 1
add_compile_options ( /Z7 )
# A v o i d D 9 0 2 5 w a r n i n g
string ( REPLACE "/Zi" "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}" )
string ( REPLACE "/Zi" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}" )
else ( )
add_compile_options ( /Zi )
endif ( )
if ( ARCHITECTURE_x86_64 )
add_compile_options ( /QIntel-jcc-erratum )
endif ( )
if ( ARCHITECTURE_x86_64 )
add_compile_options ( /QIntel-jcc-erratum )
endif ( )
# / G S - - N o s t a c k b u f f e r o v e r f l o w c h e c k s
add_compile_options ( "$<$<CONFIG:Release>:/GS->" )
# / G S - - N o s t a c k b u f f e r o v e r f l o w c h e c k s
add_compile_options ( "$<$<CONFIG:Release>:/GS->" )
set ( CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG /MANIFEST:NO" CACHE STRING "" FORCE )
set ( CMAKE_EXE_LINKER_FLAGS_RELEASE "/DEBUG /MANIFEST:NO /INCREMENTAL:NO /OPT:REF,ICF" CACHE STRING "" FORCE )
set ( CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG /MANIFEST:NO" CACHE STRING "" FORCE )
set ( CMAKE_EXE_LINKER_FLAGS_RELEASE "/DEBUG /MANIFEST:NO /INCREMENTAL:NO /OPT:REF,ICF" CACHE STRING "" FORCE )
else ( )
add_compile_options (
- f w r a p v
@ -124,63 +126,63 @@ else()
- W n o - m i s s i n g - f i e l d - i n i t i a l i z e r s
)
if ( CMAKE_CXX_COMPILER_ID MATCHES Clang ) # C l a n g o r A p p l e C l a n g
add_compile_options (
- W n o - b r a c e d - s c a l a r - i n i t
- W n o - u n u s e d - p r i v a t e - f i e l d
- W n o - n u l l a b i l i t y - c o m p l e t e n e s s
- W e r r o r = s h a d o w - u n c a p t u r e d - l o c a l
- W e r r o r = i m p l i c i t - f a l l t h r o u g h
- W e r r o r = t y p e - l i m i t s
)
endif ( )
if ( CMAKE_CXX_COMPILER_ID MATCHES Clang OR CMAKE_CXX_COMPILER_ID MATCHES IntelLLVM ) # C l a n g o r A p p l e C l a n g
add_compile_options (
- W n o - b r a c e d - s c a l a r - i n i t
- W n o - u n u s e d - p r i v a t e - f i e l d
- W n o - n u l l a b i l i t y - c o m p l e t e n e s s
- W e r r o r = s h a d o w - u n c a p t u r e d - l o c a l
- W e r r o r = i m p l i c i t - f a l l t h r o u g h
- W e r r o r = t y p e - l i m i t s
)
endif ( )
if ( ARCHITECTURE_x86_64 )
add_compile_options ( "-mcx16" )
endif ( )
if ( ARCHITECTURE_x86_64 )
add_compile_options ( "-mcx16" )
endif ( )
if ( APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL Clang )
add_compile_options ( "-stdlib=libc++" )
endif ( )
if ( APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL Clang )
add_compile_options ( "-stdlib=libc++" )
endif ( )
# G C C b u g s
if ( CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "11" AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
# T h e s e d i a g n o s t i c s w o u l d b e g r e a t i f t h e y w o r k e d , b u t a r e j u s t c o m p l e t e l y b r o k e n
# a n d p r o d u c e b o g u s e r r o r s o n e x t e r n a l l i b r a r i e s l i k e f m t .
add_compile_options (
- W n o - a r r a y - b o u n d s
- W n o - s t r i n g o p - o v e r r e a d
- W n o - s t r i n g o p - o v e r f l o w
)
endif ( )
# G C C b u g s
if ( CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "11" AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
# T h e s e d i a g n o s t i c s w o u l d b e g r e a t i f t h e y w o r k e d , b u t a r e j u s t c o m p l e t e l y b r o k e n
# a n d p r o d u c e b o g u s e r r o r s o n e x t e r n a l l i b r a r i e s l i k e f m t .
add_compile_options (
- W n o - a r r a y - b o u n d s
- W n o - s t r i n g o p - o v e r r e a d
- W n o - s t r i n g o p - o v e r f l o w
)
endif ( )
# S e t f i l e o f f s e t s i z e t o 6 4 b i t s .
#
# O n m o d e r n U n i x e s , t h i s i s t y p i c a l l y a l r e a d y t h e c a s e . T h e l o n e e x c e p t i o n i s
# g l i b c , w h i c h m a y d e f a u l t t o 3 2 b i t s . g l i b c a l l o w s t h i s t o b e c o n f i g u r e d
# b y s e t t i n g _ F I L E _ O F F S E T _ B I T S .
if ( CMAKE_SYSTEM_NAME STREQUAL "Linux" OR MINGW )
add_definitions ( -D_FILE_OFFSET_BITS=64 )
endif ( )
# S e t f i l e o f f s e t s i z e t o 6 4 b i t s .
#
# O n m o d e r n U n i x e s , t h i s i s t y p i c a l l y a l r e a d y t h e c a s e . T h e l o n e e x c e p t i o n i s
# g l i b c , w h i c h m a y d e f a u l t t o 3 2 b i t s . g l i b c a l l o w s t h i s t o b e c o n f i g u r e d
# b y s e t t i n g _ F I L E _ O F F S E T _ B I T S .
if ( CMAKE_SYSTEM_NAME STREQUAL "Linux" OR MINGW )
add_definitions ( -D_FILE_OFFSET_BITS=64 )
endif ( )
if ( MINGW )
add_definitions ( -DMINGW_HAS_SECURE_API )
add_compile_options ( "-msse4.1" )
if ( MINGW )
add_definitions ( -DMINGW_HAS_SECURE_API )
add_compile_options ( "-msse4.1" )
if ( MINGW_STATIC_BUILD )
add_definitions ( -DQT_STATICPLUGIN )
add_compile_options ( "-static" )
if ( MINGW_STATIC_BUILD )
add_definitions ( -DQT_STATICPLUGIN )
add_compile_options ( "-static" )
endif ( )
endif ( )
endif ( )
if ( CMAKE_SYSTEM_NAME STREQUAL "Linux" OR MINGW )
# G N U a r : C r e a t e t h i n a r c h i v e f i l e s .
# R e q u i r e s b i n u t i l s - 2 . 1 9 o r l a t e r .
set ( CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> qcTP <TARGET> <LINK_FLAGS> <OBJECTS>" )
set ( CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> qTP <TARGET> <LINK_FLAGS> <OBJECTS>" )
set ( CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> qcTP <TARGET> <LINK_FLAGS> <OBJECTS>" )
set ( CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> qTP <TARGET> <LINK_FLAGS> <OBJECTS>" )
endif ( )
if ( CMAKE_SYSTEM_NAME STREQUAL "Linux" OR MINGW )
# G N U a r : C r e a t e t h i n a r c h i v e f i l e s .
# R e q u i r e s b i n u t i l s - 2 . 1 9 o r l a t e r .
set ( CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> qcTP <TARGET> <LINK_FLAGS> <OBJECTS>" )
set ( CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> qTP <TARGET> <LINK_FLAGS> <OBJECTS>" )
set ( CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> qcTP <TARGET> <LINK_FLAGS> <OBJECTS>" )
set ( CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> qTP <TARGET> <LINK_FLAGS> <OBJECTS>" )
endif ( )
endif ( )
add_subdirectory ( common )