mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-01-26 02:07:26 +00:00
Another fix for windres
This commit is contained in:
parent
ec511b5fd7
commit
8f303c4d44
1 changed files with 12 additions and 4 deletions
|
@ -382,10 +382,18 @@ IF(CMAKE_COMPILER_IS_GNUCC)
|
||||||
ADD_DEFINITIONS(-fno-stack-protector)
|
ADD_DEFINITIONS(-fno-stack-protector)
|
||||||
ENDIF(AQUARIA_GCC_HAS_STACKPROT)
|
ENDIF(AQUARIA_GCC_HAS_STACKPROT)
|
||||||
|
|
||||||
|
CHECK_C_COMPILER_FLAG("-fno-stack-protector" AQUARIA_GCC_HAS_STACKPROT)
|
||||||
|
IF(AQUARIA_GCC_HAS_STACKPROT)
|
||||||
# -O3 breaks on some GCC/MinGW versions, make sure CMake does not set this as default.
|
# -O3 breaks on some GCC/MinGW versions, make sure CMake does not set this as default.
|
||||||
# Exceptions are not used, excluding support for release builds adds less bulk as well.
|
# Exceptions are not used, excluding support for release builds adds less bulk as well.
|
||||||
set(CMAKE_C_FLAGS_RELEASE "-O2" CACHE STRING "Flags used for release builds" FORCE)
|
set(CMAKE_C_FLAGS_RELEASE "-pipe -fsigned-char -fno-stack-protector -O2" CACHE STRING "Flags used for release builds" FORCE)
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -fno-exceptions" CACHE STRING "Flags used for release builds" FORCE)
|
set(CMAKE_CXX_FLAGS_RELEASE "-pipe -fsigned-char -fno-stack-protector -O2 -fno-exceptions" CACHE STRING "Flags used for release builds" FORCE)
|
||||||
|
ELSE(AQUARIA_GCC_HAS_STACKPROT)
|
||||||
|
# -O3 breaks on some GCC/MinGW versions, make sure CMake does not set this as default.
|
||||||
|
# Exceptions are not used, excluding support for release builds adds less bulk as well.
|
||||||
|
set(CMAKE_C_FLAGS_RELEASE "-pipe -fsigned-char -O2" CACHE STRING "Flags used for release builds" FORCE)
|
||||||
|
set(CMAKE_CXX_FLAGS_RELEASE "-pipe -fsigned-char -O2 -fno-exceptions" CACHE STRING "Flags used for release builds" FORCE)
|
||||||
|
ENDIF(AQUARIA_GCC_HAS_STACKPROT)
|
||||||
|
|
||||||
# !!! FIXME: probably not safe long-term.
|
# !!! FIXME: probably not safe long-term.
|
||||||
# CMake mailing list had this hack for getting rid of -rdynamic:
|
# CMake mailing list had this hack for getting rid of -rdynamic:
|
||||||
|
|
Loading…
Reference in a new issue