From c94fe71278ad31606a84699f33832779a38f2520 Mon Sep 17 00:00:00 2001 From: Hank Anderson Date: Wed, 11 Feb 2015 10:54:14 -0600 Subject: [PATCH] Removed incoming-stack-boundary for MSVC. Made float type optional for GenerateNamedObjects. Called GenerateNamedObjects for a couple of driver/others files that needed NAME/CNAME set. --- cmake/os.cmake | 4 +++- cmake/utils.cmake | 8 ++++++-- driver/others/CMakeLists.txt | 8 +++++--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/cmake/os.cmake b/cmake/os.cmake index cf36ef62f..eb7df31ed 100644 --- a/cmake/os.cmake +++ b/cmake/os.cmake @@ -57,7 +57,9 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") # Ensure the correct stack alignment on Win32 # http://permalink.gmane.org/gmane.comp.lib.openblas.general/97 if (${ARCH} STREQUAL "x86") - set(CCOMMON_OPT "${CCOMMON_OPT} -mincoming-stack-boundary=2") + if (NOT MSVC) + set(CCOMMON_OPT "${CCOMMON_OPT} -mincoming-stack-boundary=2") + endif () set(FCOMMON_OPT "${FCOMMON_OPT} -mincoming-stack-boundary=2") endif () diff --git a/cmake/utils.cmake b/cmake/utils.cmake index 672dcad33..715f298b7 100644 --- a/cmake/utils.cmake +++ b/cmake/utils.cmake @@ -70,7 +70,11 @@ endfunction () # e.g. with DOUBLE set, "i*max" will generate the name "idmax", and "max" will be "dmax" # @param replace_last_with replaces the last character in the filename with this string (e.g. symm_k should be symm_TU) # @param append_with appends the filename with this string (e.g. trmm_R should be trmm_RTUU or some other combination of characters) -function(GenerateNamedObjects sources_in float_type_in) +function(GenerateNamedObjects sources_in) + + if (DEFINED ARGV1) + set(float_type_in ${ARGV1}) + endif () if (DEFINED ARGV2) set(defines_in ${ARGV2}) @@ -97,7 +101,7 @@ function(GenerateNamedObjects sources_in float_type_in) set(OBJ_LIST_OUT "") foreach (source_file ${sources_in}) - if (NOT float_type_in STREQUAL "") + if (DEFINED float_type_in AND NOT float_type_in STREQUAL "") string(SUBSTRING ${float_type_in} 0 1 float_char) string(TOLOWER ${float_char} float_char) endif () diff --git a/driver/others/CMakeLists.txt b/driver/others/CMakeLists.txt index e14a916b2..7f8672eb2 100644 --- a/driver/others/CMakeLists.txt +++ b/driver/others/CMakeLists.txt @@ -31,13 +31,15 @@ endif () set(COMMON_SOURCES xerbla.c - abs.c # TODO: this is split into c_abs (DOUBLE unset) and z_abs (DOUBLE set) in the Makefile openblas_set_num_threads.c - openblas_get_config.c - openblas_get_parallel.c openblas_error_handle.c ) +# these need to have NAME/CNAME set, so use GenerateNamedObjects +GenerateNamedObjects("abs.c" "" "" "c_abs") +GenerateNamedObjects("abs.c" "" "DOUBLE" "z_abs") +GenerateNamedObjects("openblas_get_config.c;openblas_get_parallel.c") + if (DYNAMIC_ARCH) list(APPEND COMMON_SOURCES dynamic.c) else ()