Skip to content

Commit c02e156

Browse files
authored
Merge pull request #17222 from JuliaLang/kf/suitesparsewinclang
Add patch to fix SuiteSparse-Clang-Win64 build
2 parents 0b9364d + c63c169 commit c02e156

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
--- SuiteSparse_config/SuiteSparse_config.h 2015-07-15 03:26:41.000000000 +0000
2+
+++ SuiteSparse_config/SuiteSparse_config.h 2016-07-01 00:55:57.157465600 +0000
3+
@@ -54,7 +54,11 @@
4+
#ifdef _WIN64
5+
6+
#define SuiteSparse_long __int64
7+
+#ifdef _MSVC_VER
8+
#define SuiteSparse_long_max _I64_MAX
9+
+#else
10+
+#define SuiteSparse_long_max LLONG_MAX
11+
+#endif
12+
#define SuiteSparse_long_idd "I64d"
13+
14+
#else

deps/suitesparse.mk

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ $(BUILDDIR)/SuiteSparse-$(SUITESPARSE_VER)/Makefile: $(SRCDIR)/srccache/SuiteSpa
3737
$(TAR) -C $(dir $@) --strip-components 1 -zxf $<
3838
touch -c $@
3939

40+
$(BUILDDIR)/SuiteSparse-$(SUITESPARSE_VER)/SuiteSparse-winclang.patch-applied: $(BUILDDIR)/SuiteSparse-$(SUITESPARSE_VER)/Makefile
41+
cd $(dir $@) && patch -p0 < $(SRCDIR)/patches/SuiteSparse-winclang.patch
42+
echo 1 > $@
43+
4044
ifeq ($(USE_ATLAS), 1)
4145
$(SUITESPARSE_OBJ_SOURCE): | $(ATLAS_OBJ_TARGET)
4246
endif
@@ -46,7 +50,7 @@ $(SUITESPARSE_OBJ_SOURCE): | $(OPENBLAS_OBJ_TARGET)
4650
else ifeq ($(USE_SYSTEM_LAPACK), 0)
4751
$(SUITESPARSE_OBJ_SOURCE): | $(LAPACK_OBJ_TARGET)
4852
endif
49-
$(SUITESPARSE_OBJ_SOURCE): $(BUILDDIR)/SuiteSparse-$(SUITESPARSE_VER)/Makefile
53+
$(SUITESPARSE_OBJ_SOURCE): $(BUILDDIR)/SuiteSparse-$(SUITESPARSE_VER)/Makefile $(BUILDDIR)/SuiteSparse-$(SUITESPARSE_VER)/SuiteSparse-winclang.patch-applied
5054
$(MAKE) -C $(dir $<) library $(SUITESPARSE_MFLAGS)
5155
touch -c $@
5256
$(BUILDDIR)/SuiteSparse-$(SUITESPARSE_VER)/checked: $(SUITESPARSE_OBJ_SOURCE)

0 commit comments

Comments
 (0)