From 358f5bb022b94ea81ff7e6a53251b9b4c931e610 Mon Sep 17 00:00:00 2001 From: Edward Chen <18449977+edgchen1@users.noreply.github.com> Date: Mon, 29 Apr 2024 10:43:31 -0700 Subject: [PATCH] Update regex to match correct pattern. (#20483) In CMakeLists.txt:set_msvc_c_cpp_compiler_warning_level(), the regex should match the value that gets added by the function. The latter got updated, so this change updates the former to match. --- cmake/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 23657d3379..7efb8318bb 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -383,7 +383,7 @@ function(set_msvc_c_cpp_compiler_warning_level warning_level) get_property(opts DIRECTORY PROPERTY COMPILE_OPTIONS) # only match the generator expression added by this function list(FILTER opts - EXCLUDE REGEX "^\\$<\\$,\\$>:/W[0-4]>$") + EXCLUDE REGEX "^\\$<\\$:/W[0-4]>$") list(APPEND opts "$<$:${warning_flag}>") set_property(DIRECTORY PROPERTY COMPILE_OPTIONS "${opts}") endif()