Skip to content

Commit

Permalink
turn off compile warnings as error unless Debug build
Browse files Browse the repository at this point in the history
Related to #915. I do not want bug reports about compile errors for code
that we have little control over. Now, at least the user can
  • Loading branch information
ddennedy committed May 6, 2023
1 parent 1a222cd commit e456cb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
endif()
endif()

if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_BUILD_TYPE STREQUAL "Debug")
# Treat warnings as errors with some exceptions
set(GCC_FLAGS "-Wall -Werror -Wno-deprecated-declarations")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_FLAGS} -Wno-class-memaccess -Wno-array-compare -Wno-unused-result -Wno-maybe-uninitialized")
Expand Down

0 comments on commit e456cb3

Please sign in to comment.