Fix regex to match kernels suffixed with cpuname too
authorMartin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Thu, 22 Jul 2021 15:24:15 +0000 (17:24 +0200)
committerGitHub <noreply@github.com>
Thu, 22 Jul 2021 15:24:15 +0000 (17:24 +0200)
cmake/utils.cmake

index 2c1a1c763a286d05db09596d98a52d1460637680..6b54092eac8378a5251b83c8c70b3493a5aece5c 100644 (file)
@@ -313,10 +313,10 @@ function(GenerateNamedObjects sources_in)
       list(APPEND SRC_LIST_OUT ${new_source_file})
       message (STATUS ${new_source_file})
       if (DEFINED HAVE_FMA3)
-        if ( ${new_source_file} MATCHES "(s|d?)rot_k.c")
+        if ( ${new_source_file} MATCHES "(s|d?)rot_k.*c")
                set_source_files_properties(${new_source_file} PROPERTIES COMPILE_OPTIONS "-mfma")
         endif ()
-        if ( ${new_source_file} MATCHES "dgemv_t_k.c")
+        if ( ${new_source_file} MATCHES "dgemv_t_k.*c")
                set_source_files_properties(${new_source_file} PROPERTIES COMPILE_OPTIONS "-mfma")
         endif ()
       endif ()