Skip to content

Commit

Permalink
Cmake: Turn on -Werror for CI system
Browse files Browse the repository at this point in the history
For environments which have TRAVIS=1 and CI=1, add -Werrror to the
CFLAGS. This will ensure that any warnings are caught easier on the CI
system that we use. (At least with GCC).

Signed-off-by: Robin Getz <[email protected]>
  • Loading branch information
rgetz committed Apr 27, 2020
1 parent 8d7fd52 commit 0b3949d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ if (CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
endif()
endif()
if(DEFINED ENV{TRAVIS} AND DEFINED ENV{CI})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
endif()
endif()

if(APPLE)
Expand Down

0 comments on commit 0b3949d

Please sign in to comment.