Skip to content

Commit f265b15

Browse files
authored
Merge pull request #6157 from hjmjohnson/fix-issue-6133-march-regex-rel54
BUG: Allow . and + in -march/-mtune strip regex (issue #6133, backport to release-5.4)
2 parents ccb17dc + a6522f6 commit f265b15

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Wrapping/macro_files/itk_auto_load_submodules.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ function(generate_castxml_commandline_flags)
2525
set(_castxml_cc_flags "${_castxml_cc_flags} ${CMAKE_CXX${CMAKE_CXX_STANDARD}_STANDARD_COMPILE_OPTION}")
2626
endif()
2727

28-
# Aggressive optimization flags cause cast_xml to give invalid error conditions
29-
set(INVALID_OPTIMIZATION_FLAGS "-fopenmp;-march=[a-zA-Z0-9\-]*;-mtune=[a-zA-Z0-9\-]*;-mfma")
28+
# Aggressive optimization flags cause cast_xml to give invalid error conditions.
29+
# The -march=/-mtune= class must accept '.','+','_' to strip extended targets
30+
# like armv8.2-a+fp16 or znver3 as one token (issue #6133).
31+
set(INVALID_OPTIMIZATION_FLAGS "-fopenmp;-march=[A-Za-z0-9._+\-]*;-mtune=[A-Za-z0-9._+\-]*;-mfma")
3032
foreach(rmmatch ${INVALID_OPTIMIZATION_FLAGS})
3133
string(
3234
REGEX

0 commit comments

Comments
 (0)