mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-12 23:54:17 +00:00
- Fixed a few flags for Visual Studio compilation.
This commit is contained in:
parent
3e90b65014
commit
03b75ae7c1
2 changed files with 11 additions and 3 deletions
|
@ -76,7 +76,7 @@ find_package( ZLIB )
|
||||||
if( MSVC )
|
if( MSVC )
|
||||||
# Eliminate unreferenced functions and data
|
# Eliminate unreferenced functions and data
|
||||||
# Perform identical COMDAT folding
|
# Perform identical COMDAT folding
|
||||||
set( REL_LINKER_FLAGS "/opt:ref /opt:icf /nodefaultlib:msvcrt" )
|
set( REL_LINKER_FLAGS "/opt:ref /opt:icf /nodefaultlib:msvcrt /TSAWARE" )
|
||||||
|
|
||||||
# String pooling
|
# String pooling
|
||||||
# Function-level linking
|
# Function-level linking
|
||||||
|
@ -84,10 +84,10 @@ if( MSVC )
|
||||||
set( ALL_C_FLAGS "/GF /Gy /GR-" )
|
set( ALL_C_FLAGS "/GF /Gy /GR-" )
|
||||||
|
|
||||||
# Avoid CRT DLL dependancies in release builds
|
# Avoid CRT DLL dependancies in release builds
|
||||||
set( REL_C_FLAGS "/MT" )
|
set( REL_C_FLAGS "/MT /Oy" )
|
||||||
|
|
||||||
# Debug allocations in debug builds
|
# Debug allocations in debug builds
|
||||||
set( DEB_C_FLAGS "/D _CRTDBG_MAP_ALLOC" )
|
set( DEB_C_FLAGS "/D _CRTDBG_MAP_ALLOC /MTd /Gm" )
|
||||||
|
|
||||||
# Disable warnings for unsecure CRT functions from VC8+
|
# Disable warnings for unsecure CRT functions from VC8+
|
||||||
if( MSVC_VERSION GREATER 1399 )
|
if( MSVC_VERSION GREATER 1399 )
|
||||||
|
@ -98,9 +98,11 @@ if( MSVC )
|
||||||
string(REPLACE "/MD " " " CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE} )
|
string(REPLACE "/MD " " " CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE} )
|
||||||
string(REPLACE "/MD " " " CMAKE_CXX_FLAGS_MINSIZEREL ${CMAKE_CXX_FLAGS_MINSIZEREL} )
|
string(REPLACE "/MD " " " CMAKE_CXX_FLAGS_MINSIZEREL ${CMAKE_CXX_FLAGS_MINSIZEREL} )
|
||||||
string(REPLACE "/MD " " " CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO} )
|
string(REPLACE "/MD " " " CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO} )
|
||||||
|
string(REPLACE "/MDd " " " CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG} )
|
||||||
string(REPLACE "/MD " " " CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE} )
|
string(REPLACE "/MD " " " CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE} )
|
||||||
string(REPLACE "/MD " " " CMAKE_C_FLAGS_MINSIZEREL ${CMAKE_C_FLAGS_MINSIZEREL} )
|
string(REPLACE "/MD " " " CMAKE_C_FLAGS_MINSIZEREL ${CMAKE_C_FLAGS_MINSIZEREL} )
|
||||||
string(REPLACE "/MD " " " CMAKE_C_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO} )
|
string(REPLACE "/MD " " " CMAKE_C_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO} )
|
||||||
|
string(REPLACE "/MDd " " " CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG} )
|
||||||
string(REPLACE " /GR" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} )
|
string(REPLACE " /GR" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} )
|
||||||
endif( MSVC )
|
endif( MSVC )
|
||||||
|
|
||||||
|
|
|
@ -430,6 +430,12 @@ if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STRE
|
||||||
endif( NOT NO_STRIP )
|
endif( NOT NO_STRIP )
|
||||||
endif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" )
|
endif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" )
|
||||||
|
|
||||||
|
# MSVC Flags
|
||||||
|
|
||||||
|
if( MSVC )
|
||||||
|
set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DELAYLOAD:\"fmodex${X64}.dll\"" )
|
||||||
|
endif( MSVC )
|
||||||
|
|
||||||
# Check for functions that may or may not exist.
|
# Check for functions that may or may not exist.
|
||||||
|
|
||||||
CHECK_FUNCTION_EXISTS( filelength FILELENGTH_EXISTS )
|
CHECK_FUNCTION_EXISTS( filelength FILELENGTH_EXISTS )
|
||||||
|
|
Loading…
Reference in a new issue