CMake: Remove disabling asserts for release builds
This commit is contained in:
@@ -36,7 +36,7 @@ macro(compile_flags)
|
||||
|
||||
# Prepare a generator that checks if we are not a debug, and don't have asserts
|
||||
# on. We need this later on to set some compile options for stable releases.
|
||||
set(IS_STABLE_RELEASE "$<AND:$<NOT:$<CONFIG:Debug>>,$<NOT:$<BOOL:${OPTION_USE_ASSERTS}>>>")
|
||||
#set(IS_STABLE_RELEASE "$<AND:$<NOT:$<CONFIG:Debug>>,$<NOT:$<BOOL:${OPTION_USE_ASSERTS}>>>")
|
||||
|
||||
if (MSVC)
|
||||
add_compile_options(/W3)
|
||||
@@ -68,14 +68,14 @@ macro(compile_flags)
|
||||
-fno-strict-aliasing
|
||||
)
|
||||
|
||||
add_compile_options(
|
||||
#add_compile_options(
|
||||
# When we are a stable release (Release build + USE_ASSERTS not set),
|
||||
# assertations are off, which trigger a lot of warnings. We disable
|
||||
# these warnings for these releases.
|
||||
"$<${IS_STABLE_RELEASE}:-Wno-unused-variable>"
|
||||
"$<${IS_STABLE_RELEASE}:-Wno-unused-but-set-parameter>"
|
||||
"$<${IS_STABLE_RELEASE}:-Wno-unused-but-set-variable>"
|
||||
)
|
||||
#"$<${IS_STABLE_RELEASE}:-Wno-unused-variable>"
|
||||
#"$<${IS_STABLE_RELEASE}:-Wno-unused-but-set-parameter>"
|
||||
#"$<${IS_STABLE_RELEASE}:-Wno-unused-but-set-variable>"
|
||||
#)
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
Reference in New Issue
Block a user