From dc0dd996493311bf37d02736a74f9bf6716a9918 Mon Sep 17 00:00:00 2001 From: i-ky Date: Tue, 4 Apr 2023 19:50:55 +0000 Subject: [PATCH] Generalize compiler regex --- src/basset.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/basset.cpp b/src/basset.cpp index ae4e887..a6d13f3 100644 --- a/src/basset.cpp +++ b/src/basset.cpp @@ -307,7 +307,8 @@ int main(int argc, char *argv[]) { // signal to the child that everything is set up pipe << token{}; - Regex compiler("g(cc|\\+\\+)"); + Regex compiler( + R"REGEX(([^-]+-)*(c(c|\+\+)|(g(cc|\+\+)|clang(\+\+)?)(-[0-9]+(\.[0-9]+){0,2})?)$)REGEX"); CompilationDatabase cdb(output);