[C] Treat compiler warnings as errors

This commit is contained in:
seleznevae 2018-09-01 20:14:38 +03:00
parent 6b9d495168
commit 12050adcc0

View File

@ -48,8 +48,8 @@ if("${FORT_COMPILER}" STREQUAL "MSVC")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -W4") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -W4")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W4") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W4")
else("${FORT_COMPILER}" STREQUAL "MSVC") else("${FORT_COMPILER}" STREQUAL "MSVC")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -Wextra -std=c99 -Wpedantic") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -Wextra -Werror -std=c99 -Wpedantic")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g -Wextra -std=c++11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g -Wextra -Werror -std=c++11")
endif("${FORT_COMPILER}" STREQUAL "MSVC") endif("${FORT_COMPILER}" STREQUAL "MSVC")