Skip to content

Commit

Permalink
Hide -Werror behind -DDEV_MODE cmake argument
Browse files Browse the repository at this point in the history
DEV_MODE currently enables -Werror on linux
  • Loading branch information
Waqar144 committed Aug 8, 2024
1 parent 21ab3cb commit dcfba9a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)

# BEGIN options
option(QON_QT6_BUILD "Build QOwnNotes with Qt6" OFF)
option(DEV_MODE "Build QOwnNotes in developer mode" OFF)
# END options

if (QON_QT6_BUILD)
Expand Down Expand Up @@ -44,7 +45,7 @@ set_target_properties(QOwnNotes PROPERTIES
AUTORCC ON
)

if (UNIX)
if (UNIX AND DEV_MODE)
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(QOwnNotes PRIVATE
-Wall -Wextra -pedantic -Wno-gnu-zero-variadic-macro-arguments -Wno-error=deprecated-declarations
Expand Down

0 comments on commit dcfba9a

Please sign in to comment.