Added new variable, 'ENABLE_UNUSED_VAR_PAR_WARNINGS' to make debug output more or less verbose. It is off by default.

This commit is contained in:
Ward Fisher 2014-01-24 10:30:14 -07:00
parent 133b17810d
commit 8ef7441a5e

View File

@ -119,8 +119,8 @@ ENDIF()
#
# Also, set some other default compiler flags.
IF(CMAKE_COMPILER_IS_GNUCC OR APPLE)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -Wno-unused-variable -Wno-unused-parameter")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wno-unused-variable -Wno-unused-parameter")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall")
ENDIF()
IF(NOT ENABLE_COVERAGE_TESTS)
@ -128,6 +128,11 @@ IF(NOT ENABLE_COVERAGE_TESTS)
SET(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -O2")
ENDIF()
IF(NOT ENABLE_UNUSED_VAR_PAR_WARNINGS) {
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-varaible -Wno-unused-parameter")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-variable -Wno-unused-parameter")
}
ADD_DEFINITIONS()