From a7843faa20d14a825e3c5d0ecba91112d697dbe6 Mon Sep 17 00:00:00 2001 From: "Igor S. Gerasimov" Date: Thu, 7 Oct 2021 11:08:16 +0900 Subject: FindLAPACK: Replace set(A val) with string(APPEND) --- Modules/FindLAPACK.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake index 32d15db..6801083 100644 --- a/Modules/FindLAPACK.cmake +++ b/Modules/FindLAPACK.cmake @@ -181,9 +181,9 @@ function(CHECK_LAPACK_LIBRARIES LIBRARIES _prefix _name _flags _list _deps _addl list(APPEND _libraries "${_library}") else() string(REGEX REPLACE "[^A-Za-z0-9]" "_" _lib_var "${_library}") - set(_combined_name ${_combined_name}_${_lib_var}) + string(APPEND _combined_name "_${_lib_var}") if(NOT "${_deps}" STREQUAL "") - set(_combined_name ${_combined_name}_deps) + string(APPEND _combined_name "_deps") endif() if(_libraries_work) find_library(${_prefix}_${_lib_var}_LIBRARY @@ -201,7 +201,7 @@ function(CHECK_LAPACK_LIBRARIES LIBRARIES _prefix _name _flags _list _deps _addl foreach(_flag ${_flags}) string(REGEX REPLACE "[^A-Za-z0-9]" "_" _flag_var "${_flag}") - set(_combined_name ${_combined_name}_${_flag_var}) + string(APPEND _combined_name "_${_flag_var}") endforeach() if(_libraries_work) # Test this combination of libraries. @@ -511,7 +511,7 @@ if(NOT LAPACK_NOT_FOUND_MESSAGE) # Check for OpenMP support, VIA BLA_VENDOR of Arm_mp or Arm_ipl64_mp if(BLA_VENDOR MATCHES "_mp") - set(LAPACK_armpl_LIB "${LAPACK_armpl_LIB}_mp") + string(APPEND LAPACK_armpl_LIB "_mp") endif() check_lapack_libraries( @@ -559,7 +559,7 @@ if(NOT LAPACK_NOT_FOUND_MESSAGE) endif() # Check for OpenMP support, VIA BLA_VENDOR of scs_mp if(BLA_VENDOR MATCHES "_mp") - set(_lapack_scsl_lib "${_lapack_scsl_lib}_mp") + string(APPEND _lapack_scsl_lib "_mp") endif() check_lapack_libraries( -- cgit v0.12 From 816dc1cb19a1ed1cd4aef1f4b06e9d57cce0d4e6 Mon Sep 17 00:00:00 2001 From: "Igor S. Gerasimov" Date: Thu, 7 Oct 2021 11:16:08 +0900 Subject: FindBLAS: Replace set(A val) with string(APPEND) --- Modules/FindBLAS.cmake | 14 +++++++------- Modules/FindLAPACK.cmake | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake index f16d176..89b347a 100644 --- a/Modules/FindBLAS.cmake +++ b/Modules/FindBLAS.cmake @@ -326,9 +326,9 @@ function(CHECK_BLAS_LIBRARIES LIBRARIES _prefix _name _flags _list _deps _addlib list(APPEND _libraries "${_library}") else() string(REGEX REPLACE "[^A-Za-z0-9]" "_" _lib_var "${_library}") - set(_combined_name ${_combined_name}_${_lib_var}) + string(APPEND _combined_name "_${_lib_var}") if(NOT "${_deps}" STREQUAL "") - set(_combined_name ${_combined_name}_deps) + string(APPEND _combined_name "_deps") endif() if(_libraries_work) find_library(${_prefix}_${_lib_var}_LIBRARY @@ -346,7 +346,7 @@ function(CHECK_BLAS_LIBRARIES LIBRARIES _prefix _name _flags _list _deps _addlib foreach(_flag ${_flags}) string(REGEX REPLACE "[^A-Za-z0-9]" "_" _flag_var "${_flag}") - set(_combined_name ${_combined_name}_${_flag_var}) + string(APPEND _combined_name "_${_flag_var}") endforeach() if(_libraries_work) # Test this combination of libraries. @@ -797,7 +797,7 @@ if(BLA_VENDOR MATCHES "Arm" OR BLA_VENDOR STREQUAL "All") # Check for OpenMP support, VIA BLA_VENDOR of Arm_mp or Arm_ipl64_mp if(BLA_VENDOR MATCHES "_mp") - set(_blas_armpl_lib "${_blas_armpl_lib}_mp") + string(APPEND _blas_armpl_lib "_mp") endif() if(NOT BLAS_LIBRARIES) @@ -942,7 +942,7 @@ if(BLA_VENDOR MATCHES "SCSL" OR BLA_VENDOR STREQUAL "All") string(APPEND _blas_scsl_lib "_i8") endif() if(BLA_VENDOR MATCHES "_mp") - set(_blas_scsl_lib "${_blas_scsl_lib}_mp") + string(APPEND _blas_scsl_lib "_mp") endif() if(NOT BLAS_LIBRARIES) @@ -982,7 +982,7 @@ if(BLA_VENDOR MATCHES "IBMESSL" OR BLA_VENDOR STREQUAL "All") set(_blas_essl_lib "essl") if(BLA_VENDOR MATCHES "_SMP") - set(_blas_essl_lib "${_blas_essl_lib}smp") + string(APPEND _blas_essl_lib "smp") endif() if(_blas_sizeof_integer EQUAL 8) string(APPEND _blas_essl_lib "6464") @@ -1204,7 +1204,7 @@ if(BLA_VENDOR MATCHES "EML" OR BLA_VENDOR STREQUAL "All") endif() # Check for OpenMP support, VIA BLA_VENDOR of eml_mt if(BLA_VENDOR MATCHES "_mt") - set(_blas_eml_lib "${_blas_eml_lib}_mt") + string(APPEND _blas_eml_lib "_mt") endif() if(NOT BLAS_LIBRARIES) diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake index 6801083..5540965 100644 --- a/Modules/FindLAPACK.cmake +++ b/Modules/FindLAPACK.cmake @@ -511,7 +511,7 @@ if(NOT LAPACK_NOT_FOUND_MESSAGE) # Check for OpenMP support, VIA BLA_VENDOR of Arm_mp or Arm_ipl64_mp if(BLA_VENDOR MATCHES "_mp") - string(APPEND LAPACK_armpl_LIB "_mp") + string(APPEND LAPACK_armpl_LIB "_mp") endif() check_lapack_libraries( -- cgit v0.12 From 635f2c87f5cc9249b5626df1aec76c43709d8223 Mon Sep 17 00:00:00 2001 From: "Igor S. Gerasimov" Date: Thu, 7 Oct 2021 12:15:44 +0900 Subject: FindBLAS: Fix EML and ArmPL indentations --- Modules/FindBLAS.cmake | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake index 89b347a..308138f 100644 --- a/Modules/FindBLAS.cmake +++ b/Modules/FindBLAS.cmake @@ -801,16 +801,16 @@ if(BLA_VENDOR MATCHES "Arm" OR BLA_VENDOR STREQUAL "All") endif() if(NOT BLAS_LIBRARIES) - check_blas_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "${_blas_armpl_lib}" - "" - "" - "" - ) + check_blas_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "${_blas_armpl_lib}" + "" + "" + "" + ) endif() unset(_blas_armpl_lib) endif() @@ -1197,17 +1197,17 @@ endif() # Elbrus Math Library? if(BLA_VENDOR MATCHES "EML" OR BLA_VENDOR STREQUAL "All") - set(_blas_eml_lib "eml") + set(_blas_eml_lib "eml") - if(_blas_sizeof_integer EQUAL 8) - string(APPEND _blas_eml_lib "_ilp64") - endif() - # Check for OpenMP support, VIA BLA_VENDOR of eml_mt - if(BLA_VENDOR MATCHES "_mt") - string(APPEND _blas_eml_lib "_mt") - endif() + if(_blas_sizeof_integer EQUAL 8) + string(APPEND _blas_eml_lib "_ilp64") + endif() + # Check for OpenMP support, VIA BLA_VENDOR of eml_mt + if(BLA_VENDOR MATCHES "_mt") + string(APPEND _blas_eml_lib "_mt") + endif() - if(NOT BLAS_LIBRARIES) + if(NOT BLAS_LIBRARIES) check_blas_libraries( BLAS_LIBRARIES BLAS -- cgit v0.12