From a39470f45d63faff07dd60972901709755049db0 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Mon, 29 Apr 2024 15:30:00 +0200 Subject: ["CC", "defaults"] rule: Add "ADD_COMPILE_FLAGS" The C++ programming language is tightly related to the C programming language. Consequently, the command line interface for C and C++ are also related and share quite a number of compile flags. Honor this tight connection by have in our defaults a field allowing to extend both compile flags, those for C as well as those for C++. In this way, build defaults can be described in a more readable way. --- CC/RULES | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'CC') diff --git a/CC/RULES b/CC/RULES index 0c5021c..a5202cf 100644 --- a/CC/RULES +++ b/CC/RULES @@ -13,6 +13,7 @@ , "CFLAGS" , "CXXFLAGS" , "LDFLAGS" + , "ADD_COMPILE_FLAGS" , "ADD_CFLAGS" , "ADD_CXXFLAGS" , "ADD_LDFLAGS" @@ -55,12 +56,16 @@ [ "Linker flags for linking the final CC library. Specifying this field" , "overwrites values from \"base\"." ] + , "ADD_COMPILE_FLAGS": + [ "Additional compilation flags for C and C++. Specifying this field" + , "extends values from \"base\" for both, \"CFLAGS\" and \"CXXFLAGS\"." + ] , "ADD_CFLAGS": - [ "Additional compilation flags for C. Specifying this field" + [ "Additional compilation flags specific for C. Specifying this field" , "extends values from \"base\"." ] , "ADD_CXXFLAGS": - [ "Additional compilation flags for C++. Specifying this field" + [ "Additional compilation flags specific for C++. Specifying this field" , "extends values from \"base\"." ] , "ADD_LDFLAGS": @@ -259,6 +264,7 @@ , { "type": "++" , "$1": [ {"type": "var", "name": "CFLAGS"} + , {"type": "FIELD", "name": "ADD_COMPILE_FLAGS"} , {"type": "FIELD", "name": "ADD_CFLAGS"} ] } @@ -267,6 +273,7 @@ , { "type": "++" , "$1": [ {"type": "var", "name": "CXXFLAGS"} + , {"type": "FIELD", "name": "ADD_COMPILE_FLAGS"} , {"type": "FIELD", "name": "ADD_CXXFLAGS"} ] } -- cgit v1.2.3