Added CMakeLists.txt for the first of the BLAS folders.
authorHank Anderson <hank.p.anderson@gmail.com>
Tue, 27 Jan 2015 22:17:17 +0000 (16:17 -0600)
committerHank Anderson <hank.p.anderson@gmail.com>
Tue, 27 Jan 2015 22:17:17 +0000 (16:17 -0600)
It only does the double precision compile currently.

I realized I didn't finish converting Makefile.system yet, so I made
a note of that.

.gitignore
CMakeLists.txt
cmake/system.cmake
interface/CMakeLists.txt [new file with mode: 0644]

index bae3d05..3e163ab 100644 (file)
@@ -66,3 +66,4 @@ test/zblat1
 test/zblat2
 test/zblat3
 build
+build.*
index 6bca189..25b88d5 100644 (file)
@@ -56,3 +56,25 @@ foreach (BLAS_DIR ${BLASDIRS})
   add_subdirectory(${BLAS_DIR})
 endforeach ()
 
+#Save the config files for installation
+#      @cp Makefile.conf Makefile.conf_last
+#      @cp config.h config_last.h
+#ifdef QUAD_PRECISION
+#      @echo "#define QUAD_PRECISION">> config_last.h
+#endif
+#ifeq ($(EXPRECISION), 1)
+#      @echo "#define EXPRECISION">> config_last.h
+#endif
+###
+#ifeq ($(DYNAMIC_ARCH), 1)
+#      @$(MAKE) -C kernel commonlibs || exit 1
+#      @for d in $(DYNAMIC_CORE) ; \
+#      do  $(MAKE) GOTOBLAS_MAKEFILE= -C kernel TARGET_CORE=$$d kernel || exit 1 ;\
+#      done
+#      @echo DYNAMIC_ARCH=1 >> Makefile.conf_last
+#endif
+#ifdef USE_THREAD
+#      @echo USE_THREAD=$(USE_THREAD) >>  Makefile.conf_last
+#endif
+#      @touch lib.grd
+
index dc5aec2..11f0c5c 100644 (file)
@@ -128,3 +128,5 @@ set(DLLWRAP "$(CROSS_SUFFIX)dllwrap")
 set(OBJCOPY "$(CROSS_SUFFIX)objcopy")
 set(OBJCONV "$(CROSS_SUFFIX)objconv")
 
+# TODO: convert rest of Makefile.system, left off at "OS dependent settings"
+
diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt
new file mode 100644 (file)
index 0000000..62a889f
--- /dev/null
@@ -0,0 +1,46 @@
+\r
+include_directories(${CMAKE_SOURCE_DIR})\r
+\r
+# TODO: Need to generate object files for S, D, C, Q and X - start with D for now.\r
+#       The sources are the same, but there are additional preprocessor definitions depending on the precision (see Makefile.tail).\r
+\r
+add_library(DBLAS1OBJS OBJECT\r
+  axpy.c swap.c \r
+  copy.c scal.c \r
+  dot.c\r
+  asum.c nrm2.c \r
+  max.c # amax/min/amin compiled later from same source\r
+  rot.c rotg.c rotm.c rotmg.c \r
+  axpby.c\r
+)\r
+\r
+# N.B. The original Makefile passed in -UUSE_MIN and -UUSE_ABS (where appropriate), no way to do that at a source-level in cmake. REMOVE_DEFINITIONS removes a definition for the rest of the compilation.\r
+add_library(AMAX_OBJ OBJECT max.c)\r
+set_target_properties(AMAX_OBJ PROPERTIES COMPILE_DEFINITIONS USE_ABS)\r
+add_library(AMIN_OBJ OBJECT max.c)\r
+set_target_properties(AMIN_OBJ PROPERTIES COMPILE_DEFINITIONS USE_ABS)\r
+set_target_properties(AMIN_OBJ PROPERTIES COMPILE_DEFINITIONS USE_MIN)\r
+add_library(MIN_OBJ OBJECT max.c)\r
+set_target_properties(MIN_OBJ PROPERTIES COMPILE_DEFINITIONS USE_MIN)\r
+\r
+# TODO: USE_NETLIB_GEMV shoudl switch gemv.c to netlib/*gemv.f\r
+add_library(DBLAS2OBJS OBJECT\r
+  gemv.c ger.c \r
+  trsv.c trmv.c symv.c \r
+  syr.c  syr2.c gbmv.c \r
+  sbmv.c spmv.c \r
+  spr.c  spr2.c \r
+  tbsv.c tbmv.c \r
+  tpsv.c tpmv.c\r
+)\r
+\r
+add_library(DBLAS3OBJS OBJECT\r
+  gemm.c symm.c\r
+  trsm.c syrk.c syr2k.c \r
+  omatcopy.c imatcopy.c\r
+)\r
+\r
+# trmm is trsm with a compiler flag set\r
+add_library(TRMM_OBJ OBJECT trsm.c)\r
+set_target_properties(TRMM_OBJ PROPERTIES COMPILE_DEFINITIONS TRMM)\r
+\r