blob: 94bf47e778ed5d7633b3074222a188ac9d40542c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
From d63ab98b0722022ab8b71424f9fe44ad0104ac50 Mon Sep 17 00:00:00 2001
From: Sebastian Pipping <sebastian@pipping.org>
Date: Thu, 27 Mar 2025 01:07:01 +0100
Subject: [PATCH] Respect custom CFLAGS and CXXFLAGS
---
CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ec9e914..5bfa912 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -114,9 +114,9 @@ if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW)
endif()
-set(CMAKE_C_FLAGS "-Wall -Wextra -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wbad-function-cast -Wformat=2 -Wundef -pedantic -Wno-long-long")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wbad-function-cast -Wformat=2 -Wundef -pedantic -Wno-long-long")
-set(CMAKE_CXX_FLAGS "-std=c++20 -Wall -Wextra -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wredundant-decls -Wformat=2 -Wundef -pedantic -Wno-long-long")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20 -Wall -Wextra -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wredundant-decls -Wformat=2 -Wundef -pedantic -Wno-long-long")
if(DEVELOPER_MODE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -pedantic-errors")
--
2.48.1
|