elektronikworkshop / cocopa

Compiler Command Parser - Parser to extract include directories, defines, arguments from compiler command line invocations
Other
0 stars 3 forks source link

Return last -std argument from parseCppStd #14

Open colincross opened 1 year ago

colincross commented 1 year ago

gcc uses the last -std argument found on the command line:

$ g++ -std=gnu++11 -std=gnu++17 -dM -E -x c++ - < /dev/null | grep __cplusplus
#define __cplusplus 201703L

Modify parseCppStd to continue searching after finding the first -std argument.