Skip to content

Commit 681468b

Browse files
committed
Disable optional compiler errors
`-Wall -Werror` is fragile for released software, because any new version of the compiler can introduce new warnings, in which case the project will fail to build. These options should only be used by the project's developers.
1 parent 05d8f53 commit 681468b

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
4747
"None" "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
4848
endif ()
4949

50-
# Set -Wall -Wextra -Werror
51-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror")
52-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror")
53-
5450
# Do not disable assertions based on CMAKE_BUILD_TYPE.
5551
foreach (_build_type "Release" "MinSizeRel" "RelWithDebInfo")
5652
foreach (_lang C CXX)

GNUmakefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ ifeq ($(BUILD),yes)
8383
endif
8484

8585
PYTHON = python3
86-
C_FLAGS_OPT = -Wall -Wextra -Werror
87-
CXX_FLAGS_OPT = -Wall -Wextra -Werror
86+
C_FLAGS_OPT =
87+
CXX_FLAGS_OPT =
8888
export C_FLAGS_OPT
8989
export CXX_FLAGS_OPT
9090

0 commit comments

Comments
 (0)