Skip to content

Commit

Permalink
Update regex to match correct pattern. (#20483)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
edgchen1 authored Apr 29, 2024
1 parent 49b2beb commit 358f5bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 "^\\$<\\$<OR:\\$<COMPILE_LANGUAGE:C>,\\$<COMPILE_LANGUAGE:CXX>>:/W[0-4]>$")
EXCLUDE REGEX "^\\$<\\$<COMPILE_LANGUAGE:CXX,C>:/W[0-4]>$")
list(APPEND opts "$<$<COMPILE_LANGUAGE:CXX,C>:${warning_flag}>")
set_property(DIRECTORY PROPERTY COMPILE_OPTIONS "${opts}")
endif()
Expand Down

0 comments on commit 358f5bb

Please sign in to comment.