Add compiler flags to GCC or G++ to treat warnings as errors.

This commit is contained in:
Pavel Krajcevski 2013-01-26 01:38:10 -05:00
parent f03d381092
commit 3cd699ab58

View file

@ -68,6 +68,14 @@ IF(MSVC)
SET(CMAKE_LIBRARY_PATH "${CMAKE_LIBRARY_PATH};${MSVC_LIB_DIR}")
ENDIF(MSVC)
IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic -Werror")
ENDIF()
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Werror")
ENDIF()
ADD_SUBDIRECTORY(BPTCEncoder)
ADD_SUBDIRECTORY(IO)
ADD_SUBDIRECTORY(Core)