Skip to content

Navigation Menu

Sign in
Sign up

How to represent C++ compiler flags? #38

Unanswered
Discussion options

C++ compiler flags have a very special format, such as -D[FLAG] or -D[FLAG] = VALUE.
How do you think this should be represented?

References:
https://learn.microsoft.com/en-us/cpp/build/reference/d-preprocessor-definitions?view=msvc-170
https://caiorss.github.io/C-Cpp-Notes/compiler-flags-options.html

You must be logged in to vote

Replies: 1 comment

Comment options

I'm late to this thread and project, but find this space fascinating, and the timing for this project seems perfect!

Off the top of my uncreative head, JSON schema's patternProperties seems to fit the bill:

{
 "type": "object",
 "patternProperties": {
 "D\S+": { "type": "string", "description": "Compiler flags" }
 }
}

(pardon the bad regex if i screwed that up, but I think the idea is clear)

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /