Skip to content

Commit 41226d0

Browse files
author
bjjwwang
committed
add -Werror
1 parent 9ced2f4 commit 41226d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ if (DEFINED ENV{LLVM_DIR})
2323
# Set the C++ standard to C++17 and configure compiler flags based on the build type
2424
set(CMAKE_CXX_STANDARD 17)
2525
if(CMAKE_BUILD_TYPE MATCHES "Debug")
26-
set(CMAKE_CXX_FLAGS "-fPIC -std=gnu++17 -O0 -fno-rtti -Wno-deprecated")
26+
set(CMAKE_CXX_FLAGS "-fPIC -std=gnu++17 -O0 -fno-rtti -Wno-deprecated -Werror")
2727
else()
28-
set(CMAKE_CXX_FLAGS "-fPIC -std=gnu++17 -O3 -fno-rtti -Wno-deprecated")
28+
set(CMAKE_CXX_FLAGS "-fPIC -std=gnu++17 -O3 -fno-rtti -Wno-deprecated -Werror")
2929
endif()
3030
set(CMAKE_C_FLAGS "-fPIC")
3131
# Check if compiler is GNU and version is less than 9

0 commit comments

Comments
 (0)