Disable -Werror in debug builds

This commit is contained in:
Gary Talent 2016-12-24 13:06:44 -06:00
parent 175fac3292
commit 42d8a3f792
3 changed files with 18 additions and 2 deletions

View File

@ -20,11 +20,16 @@ add_definitions(
-fno-rtti
#-g
#-fcolor-diagnostics
-Werror
#--analyze
#-Os # GCC size optimization flag
)
if (CMAKE_BUILD_TYPE STREQUAL "Release")
add_definitions(
-Werror
)
endif()
enable_testing()
add_subdirectory(src)

View File

@ -62,3 +62,9 @@ gba:
${ENV_RUN} ./scripts/setup_build gba
${ENV_RUN} rm -f build/current
${ENV_RUN} ln -s gba-release build/current
gba-debug:
${ENV_RUN} rm -rf build/gba-debug
${ENV_RUN} ./scripts/setup_build gba debug
${ENV_RUN} rm -f build/current
${ENV_RUN} ln -s gba-debug build/current

View File

@ -1,4 +1,4 @@
all: gba_build native_build native_debug_build windows_release windows_debug
all: gba_build gba_debug_build native_build native_debug_build windows_release windows_debug
MAKE=make -j
@ -7,6 +7,11 @@ gba_build:
${MAKE} -C gba-release ${ARGS}; \
fi
gba_debug_build:
@if [ -d gba-debug ]; then \
${MAKE} -C gba-debug ${ARGS}; \
fi
native_build:
@if [ -d ${HOST_ENV}-release ]; then \
${MAKE} -C ${HOST_ENV}-release ${ARGS}; \