diff --git a/deps/patches/SuiteSparse-winclang.patch b/deps/patches/SuiteSparse-winclang.patch new file mode 100644 index 0000000000000..8bfb64dc27839 --- /dev/null +++ b/deps/patches/SuiteSparse-winclang.patch @@ -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 diff --git a/deps/suitesparse.mk b/deps/suitesparse.mk index c8974b19fa47c..975572e762466 100644 --- a/deps/suitesparse.mk +++ b/deps/suitesparse.mk @@ -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 @@ -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)