Skip to content

Commit

Permalink
Merge pull request #17222 from JuliaLang/kf/suitesparsewinclang
Browse files Browse the repository at this point in the history
Add patch to fix SuiteSparse-Clang-Win64 build
  • Loading branch information
Keno authored Jul 1, 2016
2 parents 0b9364d + c63c169 commit c02e156
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
14 changes: 14 additions & 0 deletions deps/patches/SuiteSparse-winclang.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- SuiteSparse_config/SuiteSparse_config.h 2015-07-15 03:26:41.000000000 +0000
+++ SuiteSparse_config/SuiteSparse_config.h 2016-07-01 00:55:57.157465600 +0000
@@ -54,7 +54,11 @@
#ifdef _WIN64

#define SuiteSparse_long __int64
+#ifdef _MSVC_VER
#define SuiteSparse_long_max _I64_MAX
+#else
+#define SuiteSparse_long_max LLONG_MAX
+#endif
#define SuiteSparse_long_idd "I64d"

#else
6 changes: 5 additions & 1 deletion deps/suitesparse.mk
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ $(BUILDDIR)/SuiteSparse-$(SUITESPARSE_VER)/Makefile: $(SRCDIR)/srccache/SuiteSpa
$(TAR) -C $(dir $@) --strip-components 1 -zxf $<
touch -c $@

$(BUILDDIR)/SuiteSparse-$(SUITESPARSE_VER)/SuiteSparse-winclang.patch-applied: $(BUILDDIR)/SuiteSparse-$(SUITESPARSE_VER)/Makefile
cd $(dir $@) && patch -p0 < $(SRCDIR)/patches/SuiteSparse-winclang.patch
echo 1 > $@

ifeq ($(USE_ATLAS), 1)
$(SUITESPARSE_OBJ_SOURCE): | $(ATLAS_OBJ_TARGET)
endif
Expand All @@ -46,7 +50,7 @@ $(SUITESPARSE_OBJ_SOURCE): | $(OPENBLAS_OBJ_TARGET)
else ifeq ($(USE_SYSTEM_LAPACK), 0)
$(SUITESPARSE_OBJ_SOURCE): | $(LAPACK_OBJ_TARGET)
endif
$(SUITESPARSE_OBJ_SOURCE): $(BUILDDIR)/SuiteSparse-$(SUITESPARSE_VER)/Makefile
$(SUITESPARSE_OBJ_SOURCE): $(BUILDDIR)/SuiteSparse-$(SUITESPARSE_VER)/Makefile $(BUILDDIR)/SuiteSparse-$(SUITESPARSE_VER)/SuiteSparse-winclang.patch-applied
$(MAKE) -C $(dir $<) library $(SUITESPARSE_MFLAGS)
touch -c $@
$(BUILDDIR)/SuiteSparse-$(SUITESPARSE_VER)/checked: $(SUITESPARSE_OBJ_SOURCE)
Expand Down

0 comments on commit c02e156

Please sign in to comment.