Skip to content

Commit

Permalink
CMakeLists.txt: add BUILD_WERROR option
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrice Fontaine <[email protected]>
  • Loading branch information
ffontaine committed Mar 10, 2024
1 parent c1981c9 commit c0f2260
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ include(CheckLibraryExists)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules/")

add_definitions(-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64)
add_compile_options(-O -Wall -Werror --std=gnu99)
add_compile_options(-O -Wall --std=gnu99)

option(BUILD_WERROR "Build with -Werror" ON)

if(BUILD_WERROR)
add_compile_options(-Werror)
endif()

option(BUILD_STATIC "Build static library" OFF)

Expand Down

0 comments on commit c0f2260

Please sign in to comment.