Removed incoming-stack-boundary for MSVC.
authorHank Anderson <hank.p.anderson@gmail.com>
Wed, 11 Feb 2015 16:54:14 +0000 (10:54 -0600)
committerHank Anderson <hank.p.anderson@gmail.com>
Wed, 11 Feb 2015 16:54:14 +0000 (10:54 -0600)
Made float type optional for GenerateNamedObjects.

Called GenerateNamedObjects for a couple of driver/others files that
needed NAME/CNAME set.

cmake/os.cmake
cmake/utils.cmake
driver/others/CMakeLists.txt

index cf36ef6..eb7df31 100644 (file)
@@ -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 ()
   
index 672dcad..715f298 100644 (file)
@@ -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 ()
index e14a916..7f8672e 100644 (file)
@@ -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 ()