From d2758afc0949b89c1a38cd40373feb40044e42dd Mon Sep 17 00:00:00 2001 From: Nuno Nobre Date: Wed, 18 Dec 2024 18:52:28 +0000 Subject: [PATCH] Fix compiler ids regex matching --- Tools/CMake/AMReXGenexHelpers.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tools/CMake/AMReXGenexHelpers.cmake b/Tools/CMake/AMReXGenexHelpers.cmake index 42070b8da31..f1f5023bb71 100644 --- a/Tools/CMake/AMReXGenexHelpers.cmake +++ b/Tools/CMake/AMReXGenexHelpers.cmake @@ -279,7 +279,7 @@ function ( eval_genex _list _lang _comp ) string(REGEX REPLACE "\\$" "0" _in "${_in}") # Genex in the form $<*_COMPILER_ID:compiler_ids> - string(REGEX REPLACE "\\$<${_lang}_COMPILER_ID:[^>]*${_comp}[^>]*>" "1" _in "${_in}") + string(REGEX REPLACE "\\$<${_lang}_COMPILER_ID[^>]*[:,]${_comp}[>,]" "1" _in "${_in}") string(REGEX REPLACE "\\$<[A-Za-z]*_COMPILER_ID:[A-Za-z]*>" "0" _in "${_in}") # Genex in the form $<*_COMPILER_VERSION:version> @@ -290,7 +290,7 @@ function ( eval_genex _list _lang _comp ) string(REGEX REPLACE "\\$<[A-Za-z]*_COMPILER_VERSION:[^\$>]*>" "0" _in "${_in}") # Genex in the form $ - string(REGEX REPLACE "\\$]*${_comp}[^\$>]*>" "1" _in "${_in}") + string(REGEX REPLACE "\\$]*,${_comp}[>,]" "1" _in "${_in}") string(REGEX REPLACE "\\$" "0" _in "${_in}") # Genex in the form $ @@ -298,7 +298,7 @@ function ( eval_genex _list _lang _comp ) string(REGEX REPLACE "\\$" "0" _in "${_in}") # Genex in the form $ - string(REGEX REPLACE "\\$]*${_comp}[^\$>]*>" "1" _in "${_in}") + string(REGEX REPLACE "\\$]*,${_comp}[>,]" "1" _in "${_in}") string(REGEX REPLACE "\\$" "0" _in "${_in}") # Genex in the form $