Skip to content

Commit 4cdf3bb

Browse files
authored
Merge pull request #130 from symengine/feat/bump-symengine-cpp-and-fix-cran
feat: fix cran issues and bump to 0.2.11
2 parents 4dc269a + 1e1838e commit 4cdf3bb

3 files changed

Lines changed: 41 additions & 58 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: symengine
22
Title: Interface to the 'SymEngine' Library
3-
Version: 0.2.10
3+
Version: 0.2.11
44
Authors@R: c(person("Jialin", "Ma", email="marlin@inventati.org", role = c("cre", "aut")),
55
person("Isuru", "Fernando", email="isuruf@gmail.com", role = c("aut")),
66
person("Xin", "Chen", email="xinchen.tju@gmail.com", role = c("aut")))

tools/bundle_symengine_source.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fi
1717
PKG_DIR=`pwd`
1818

1919
SYMENGINE_REPO="symengine/symengine"
20-
SYMENGINE_COMMIT=c1fc32cf0902ecd7b1a0e5369c38dd22ad75c726
20+
SYMENGINE_COMMIT=aba42d5b24248c71d5fd86139fabb3127e963707
2121

2222
echo === Bundle source from commit: $SYMENGINE_COMMIT
2323

@@ -48,7 +48,6 @@ rm -r src/upstream/benchmarks
4848
rm -r src/upstream/bin
4949
rm -r src/upstream/docs
5050
rm -r src/upstream/binder
51-
rm src/upstream/appveyor.yml
5251
rm src/upstream/codecov.yml
5352

5453
set +x

tools/symengine_patch.diff

Lines changed: 39 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
diff --git src/upstream/CMakeLists.txt src/upstream/CMakeLists.txt
2-
index c9f4b8b..43b6394 100644
2+
index 467a589..f15af08 100644
33
--- src/upstream/CMakeLists.txt
44
+++ src/upstream/CMakeLists.txt
55
@@ -1,4 +1,4 @@
6-
-cmake_minimum_required(VERSION 2.8.12)
6+
-cmake_minimum_required(VERSION 3.18...4.2.0)
77
+cmake_minimum_required(VERSION 3.5..4.0)
88

9-
if (POLICY CMP0074)
10-
cmake_policy(SET CMP0074 NEW)
11-
@@ -539,10 +539,6 @@ if (WITH_OPENMP)
9+
set(CMAKE_USER_MAKE_RULES_OVERRIDE ${CMAKE_CURRENT_SOURCE_DIR}/cmake/UserOverride.cmake)
10+
11+
@@ -504,10 +504,6 @@ if (WITH_OPENMP)
1212
set(WITH_SYMENGINE_THREAD_SAFE yes)
1313
endif()
1414
elseif (CMAKE_CXX_COMPILER_ID MATCHES Clang|GNU)
@@ -20,18 +20,18 @@ index c9f4b8b..43b6394 100644
2020

2121
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
2222
diff --git src/upstream/cmake/SymEngineConfig.cmake.in src/upstream/cmake/SymEngineConfig.cmake.in
23-
index dbfc80b..8f4ef85 100644
23+
index 43d9c62..7a480b1 100644
2424
--- src/upstream/cmake/SymEngineConfig.cmake.in
2525
+++ src/upstream/cmake/SymEngineConfig.cmake.in
26-
@@ -31,7 +31,7 @@
27-
# target_link_libraries(example ${SYMENGINE_LIBRARIES})
28-
#
26+
@@ -33,7 +33,7 @@
2927

30-
-cmake_minimum_required(VERSION 2.8.12)
28+
# We are compatible with 3.18, but also updated to support policies
29+
# in 4.0.0
30+
-cmake_minimum_required(VERSION 3.18...4.0.0)
3131
+cmake_minimum_required(VERSION 3.5..4.0)
3232

33-
if (POLICY CMP0074)
34-
cmake_policy(SET CMP0074 NEW)
33+
include(CMakeFindDependencyMacro)
34+
3535
diff --git src/upstream/cmake/UserOverride.cmake src/upstream/cmake/UserOverride.cmake
3636
index 523ce49..3e27a3f 100644
3737
--- src/upstream/cmake/UserOverride.cmake
@@ -54,38 +54,22 @@ index 523ce49..3e27a3f 100644
5454
set(CMAKE_CXX_FLAGS_RELEASE_INIT "${common} -O3 -funroll-loops")
5555
set(CMAKE_CXX_FLAGS_DEBUG_INIT "${common} -g -ggdb")
5656
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "PGI")
57-
diff --git src/upstream/cmake/cotire.cmake src/upstream/cmake/cotire.cmake
58-
index 741d690..e29c180 100644
59-
--- src/upstream/cmake/cotire.cmake
60-
+++ src/upstream/cmake/cotire.cmake
61-
@@ -37,7 +37,7 @@ set(__COTIRE_INCLUDED TRUE)
62-
if (NOT CMAKE_SCRIPT_MODE_FILE)
63-
cmake_policy(PUSH)
64-
endif()
65-
-cmake_minimum_required(VERSION 2.8.12)
66-
+cmake_minimum_required(VERSION 3.5..4.0)
67-
if (NOT CMAKE_SCRIPT_MODE_FILE)
68-
cmake_policy(POP)
69-
endif()
57+
diff --git src/upstream/symengine/lambda_double.h src/upstream/symengine/lambda_double.h
58+
index bf6f00d..633605a 100644
59+
--- src/upstream/symengine/lambda_double.h
60+
+++ src/upstream/symengine/lambda_double.h
61+
@@ -562,7 +562,6 @@ public:
62+
}
63+
void bvisit(const NaN &nan)
64+
{
65+
- assert(&nan == &(*Nan) /* singleton, or do we support NaN quiet/singaling nan with payload? */);
66+
result_ = [](const double * /* x */) {
67+
return std::numeric_limits<double>::signaling_NaN();
68+
};
7069
diff --git src/upstream/symengine/mp_class.h src/upstream/symengine/mp_class.h
71-
index c42d368..12d103e 100644
70+
index 2cd9f4e..12d103e 100644
7271
--- src/upstream/symengine/mp_class.h
7372
+++ src/upstream/symengine/mp_class.h
74-
@@ -74,12 +74,12 @@ typedef mpq_class rational_class;
75-
inline namespace literals
76-
{
77-
//! Literal for creating multiple precision integers
78-
-inline integer_class operator"" _z(const char *str)
79-
+inline integer_class operator""_z(const char *str)
80-
{
81-
return integer_class(str);
82-
}
83-
84-
-inline rational_class operator"" _q(const char *str)
85-
+inline rational_class operator""_q(const char *str)
86-
{
87-
return rational_class(integer_class(str));
88-
}
8973
@@ -1222,6 +1222,9 @@ inline int mp_cmpabs(const integer_class &a, const integer_class &b)
9074
return mpz_cmpabs(get_mpz_t(a), get_mpz_t(b));
9175
}
@@ -106,20 +90,8 @@ index c42d368..12d103e 100644
10690
}
10791

10892
~mp_randstate()
109-
diff --git src/upstream/symengine/lambda_double.h src/upstream/symengine/lambda_double.h
110-
index bf6f00d..633605a 100644
111-
--- src/upstream/symengine/lambda_double.h
112-
+++ src/upstream/symengine/lambda_double.h
113-
@@ -562,7 +562,6 @@ public:
114-
}
115-
void bvisit(const NaN &nan)
116-
{
117-
- assert(&nan == &(*Nan) /* singleton, or do we support NaN quiet/singaling nan with payload? */);
118-
result_ = [](const double * /* x */) {
119-
return std::numeric_limits<double>::signaling_NaN();
120-
};
12193
diff --git src/upstream/symengine/parser/parser.tab.cc src/upstream/symengine/parser/parser.tab.cc
122-
index 24628d0..2be7083 100644
94+
index b5ce819..5e8179b 100644
12395
--- src/upstream/symengine/parser/parser.tab.cc
12496
+++ src/upstream/symengine/parser/parser.tab.cc
12597
@@ -1054,7 +1054,6 @@ namespace yy {
@@ -131,7 +103,7 @@ index 24628d0..2be7083 100644
131103
}
132104
#line 1061 "parser.tab.cc"
133105
diff --git src/upstream/symengine/parser/parser.yy src/upstream/symengine/parser/parser.yy
134-
index 7e106d0..10909bc 100644
106+
index 0657e7a..f20d870 100644
135107
--- src/upstream/symengine/parser/parser.yy
136108
+++ src/upstream/symengine/parser/parser.yy
137109
@@ -256,7 +256,6 @@ piecewise_list:
@@ -142,6 +114,18 @@ index 7e106d0..10909bc 100644
142114
$$ = piecewise(std::move($3));
143115
}
144116
;
117+
diff --git src/upstream/symengine/utilities/fast_float/include/fast_float/fast_float.h src/upstream/symengine/utilities/fast_float/include/fast_float/fast_float.h
118+
index e85220a..65c9446 100644
119+
--- src/upstream/symengine/utilities/fast_float/include/fast_float/fast_float.h
120+
+++ src/upstream/symengine/utilities/fast_float/include/fast_float/fast_float.h
121+
@@ -397,7 +397,6 @@ int leading_zeroes_generic(uint64_t input_num, int last_bit = 0) {
122+
/* result might be undefined when input_num is zero */
123+
fastfloat_really_inline FASTFLOAT_CONSTEXPR20
124+
int leading_zeroes(uint64_t input_num) {
125+
- assert(input_num > 0);
126+
if (cpp20_and_in_constexpr()) {
127+
return leading_zeroes_generic(input_num);
128+
}
145129
diff --git src/upstream/symengine/utilities/matchpycpp/substitution.h src/upstream/symengine/utilities/matchpycpp/substitution.h
146130
index 056e52a..b6e1760 100644
147131
--- src/upstream/symengine/utilities/matchpycpp/substitution.h

0 commit comments

Comments
 (0)