From 5140f8f91a6211653015a2e4a52215389ea340a7 Mon Sep 17 00:00:00 2001 From: Mohammed Nurul Hoque Date: Wed, 22 Nov 2023 14:29:27 +0000 Subject: [PATCH] exclude erroring flags by regex --- SingleSource/Regression/DgOptions.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SingleSource/Regression/DgOptions.txt b/SingleSource/Regression/DgOptions.txt index 935899dfcb..d0306834b6 100644 --- a/SingleSource/Regression/DgOptions.txt +++ b/SingleSource/Regression/DgOptions.txt @@ -222,7 +222,9 @@ function(gcc_torture_dg_options_cflags Variable DG_DO DG_SRC File) # Remove any flags that will make clang error if (DG_CFLAGS) - list(REMOVE_ITEM DG_CFLAGS ${CLANG_ERRORING_CFLAGS}) + foreach(ERROR_CFLAG ${CLANG_ERRORING_CFLAGS}) + list(FILTER DG_CFLAGS EXCLUDE REGEX "^${ERROR_CFLAG}.*") + endforeach() endif() # Set the parent scope variable