Skip to content

Commit 683aeac

Browse files
authored
Merge pull request #24 from ffontaine/master
CMakeLists.txt: add BUILD_WERROR option
2 parents c1981c9 + c0f2260 commit 683aeac

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ include(CheckLibraryExists)
77
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules/")
88

99
add_definitions(-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64)
10-
add_compile_options(-O -Wall -Werror --std=gnu99)
10+
add_compile_options(-O -Wall --std=gnu99)
11+
12+
option(BUILD_WERROR "Build with -Werror" ON)
13+
14+
if(BUILD_WERROR)
15+
add_compile_options(-Werror)
16+
endif()
1117

1218
option(BUILD_STATIC "Build static library" OFF)
1319

0 commit comments

Comments
 (0)