Added --pedandic-errors and -Werror to CMakeLists.txt

This commit is contained in:
John Wellbelove 2025-12-16 10:41:53 +00:00
parent d884719098
commit cb2b3fe6f4
2 changed files with 4 additions and 2 deletions

View File

@ -460,7 +460,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
PRIVATE
-fno-omit-frame-pointer
-fno-common
# -pedantic-errors
-pedantic-errors
-Wall
-Wextra
-Werror
@ -477,7 +477,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
PRIVATE
-fno-omit-frame-pointer
-fno-common
# -pedantic-errors
-pedantic-errors
-Wall
-Wextra
-Werror

View File

@ -40,6 +40,7 @@ target_compile_options(tests
PRIVATE
-fsyntax-only
-pedantic-errors
-Werror
-Wextra-semi
)
endif ()
@ -48,6 +49,7 @@ target_compile_options(tests
PRIVATE
-fsyntax-only
-pedantic-errors
-Werror
-Wextra-semi
-Wextra-semi-stmt
-Wc++11-extra-semi