Skip to content

Commit

Permalink
Merge pull request #40 from pinotree/disable-werror
Browse files Browse the repository at this point in the history
cmake: add option to disable -Werror
  • Loading branch information
arximboldi authored Aug 21, 2023
2 parents 5ff444b + b37e941 commit 1123bff
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 @@ -6,7 +6,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
project(zug VERSION 0.1.0)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
set(CMAKE_EXPORT_COMPILE_COMMANDS on)
set(CMAKE_CXX_EXTENSIONS off)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
Expand All @@ -15,10 +15,16 @@ endif()

include(GNUInstallDirs)

option(DISABLE_WERROR "enable --werror")

option(zug_BUILD_TESTS "Build tests" ON)
option(zug_BUILD_EXAMPLES "Build examples" ON)
option(zug_BUILD_DOCS "Build docs" ON)

if (NOT MSVC AND NOT DISABLE_WERROR)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
endif()

# Targets
# =======

Expand Down

0 comments on commit 1123bff

Please sign in to comment.