Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Spack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eic_tools
Spack
Commits
416e52c1
Commit
416e52c1
authored
8 years ago
by
Jean-Paul Pelteret
Committed by
Todd Gamblin
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Update SymEngine package (#2919)
Take advantage of new configuration options in the @develop branch
parent
db7a786d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
var/spack/repos/builtin/packages/symengine/package.py
+48
-34
48 additions, 34 deletions
var/spack/repos/builtin/packages/symengine/package.py
with
48 additions
and
34 deletions
var/spack/repos/builtin/packages/symengine/package.py
+
48
−
34
View file @
416e52c1
...
...
@@ -23,9 +23,10 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from
spack
import
*
import
sys
class
Symengine
(
Package
):
class
Symengine
(
CMake
Package
):
"""
SymEngine is a fast symbolic manipulation library, written in C++.
"""
homepage
=
"
https://github.com/symengine/symengine
"
...
...
@@ -35,7 +36,9 @@ class Symengine(Package):
version
(
'
0.1.0
'
,
'
41ad7daed61fc5a77c285eb6c7303425
'
)
version
(
'
develop
'
,
git
=
'
https://github.com/symengine/symengine.git
'
)
variant
(
'
flint
'
,
default
=
True
,
variant
(
'
boostmp
'
,
default
=
False
,
description
=
'
Compile with Boost multi-precision integer library
'
)
variant
(
'
flint
'
,
default
=
False
,
description
=
'
Compile with Flint integer library
'
)
variant
(
'
mpc
'
,
default
=
True
,
description
=
'
Compile with MPC library
'
)
...
...
@@ -54,20 +57,22 @@ class Symengine(Package):
depends_on
(
'
cmake
'
,
type
=
'
build
'
)
# Other dependencies
depends_on
(
'
gmp
'
)
# mpir is a drop-in replacement for this
depends_on
(
'
mpc
'
,
when
=
'
+mpc
'
)
# Could also be built against mpir
depends_on
(
'
mpfr
'
,
when
=
'
+mpfr
'
)
# Could also be built against mpir
depends_on
(
'
flint
'
,
when
=
'
+flint
'
)
# Could also be built against mpir
depends_on
(
'
piranha
'
,
when
=
'
+piranha~flint
'
)
# Could also be built against mpir # NOQA
# NOTE: mpir is a drop-in replacement for gmp
# NOTE: [mpc,mpfr,flint,piranha] could also be built against mpir
depends_on
(
'
boost
'
,
when
=
'
+boostmp
'
)
depends_on
(
'
gmp
'
,
when
=
'
~boostmp
'
)
depends_on
(
'
mpc
'
,
when
=
'
+mpc~boostmp
'
)
depends_on
(
'
mpfr
'
,
when
=
'
+mpfr~boostmp
'
)
depends_on
(
'
flint
'
,
when
=
'
+flint~boostmp
'
)
depends_on
(
'
piranha
'
,
when
=
'
+piranha~flint~boostmp
'
)
def
install
(
self
,
spec
,
prefix
):
options
=
[]
options
.
extend
(
std_cmake_args
)
def
build_type
(
self
):
# CMAKE_BUILD_TYPE should be Debug | Release
return
'
Release
'
# CMAKE_BUILD_TYPE should be Debug | Release
for
word
in
options
[:]:
if
word
.
startswith
(
'
-DCMAKE_BUILD_TYPE
'
):
options
.
remove
(
word
)
def
cmake_args
(
self
):
spec
=
self
.
spec
options
=
[]
# See https://github.com/symengine/symengine/blob/master/README.md
# for build options
...
...
@@ -76,38 +81,47 @@ def install(self, spec, prefix):
'
-DWITH_SYMENGINE_RCP:BOOL=ON
'
,
'
-DWITH_SYMENGINE_THREAD_SAFE:BOOL=%s
'
%
(
'
ON
'
if
(
'
+thread_safe
'
or
'
+openmp
'
)
in
spec
else
'
OFF
'
),
'
-DBUILD_TESTS:BOOL=ON
'
,
'
-DBUILD_TESTS:BOOL=%s
'
%
(
'
ON
'
if
self
.
run_tests
else
'
OFF
'
),
'
-DBUILD_BENCHMARKS:BOOL=ON
'
,
'
-DWITH_MPC:BOOL=%s
'
%
(
'
ON
'
if
'
+mpc
'
in
spec
else
'
OFF
'
),
'
-DWITH_MPFR:BOOL=%s
'
%
(
'
ON
'
if
'
+mpfr
'
in
spec
else
'
OFF
'
),
'
-DINTEGER_CLASS:STRING=gmp
'
,
'
-DWITH_OPENMP:BOOL=%s
'
%
(
'
ON
'
if
'
+openmp
'
in
spec
else
'
OFF
'
),
'
-DBUILD_SHARED_LIBS:BOOL=%s
'
%
(
'
ON
'
if
'
+shared
'
in
spec
else
'
OFF
'
),
])
if
'
+flint
'
in
spec
:
if
sys
.
platform
==
'
darwin
'
:
options
.
extend
([
'
-DWITH_FLINT:BOOL=ON
'
,
'
-DINTEGER_CLASS:STRING=flint
'
'
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=on
'
])
elif
'
+piranha
'
in
spec
:
if
'
+boostmp
'
in
spec
:
options
.
extend
([
'
-DWITH_PIRANHA:BOOL=ON
'
,
'
-DINTEGER_CLASS:STRING=piranha
'
'
-DINTEGER_CLASS:STRING=boostmp
'
,
'
-DBoost_INCLUDE_DIR=%s
'
%
spec
[
'
boost
'
].
prefix
.
include
,
'
-DWITH_MPC:BOOL=OFF
'
,
'
-DWITH_MPFR:BOOL=OFF
'
,
])
else
:
options
.
extend
([
'
-DINTEGER_CLASS:STRING=gmp
'
'
-DWITH_MPC:BOOL=%s
'
%
(
'
ON
'
if
'
+mpc
'
in
spec
else
'
OFF
'
),
'
-DWITH_MPFR:BOOL=%s
'
%
(
'
ON
'
if
'
+mpfr
'
in
spec
else
'
OFF
'
),
])
if
'
+flint
'
in
spec
:
options
.
extend
([
'
-DWITH_FLINT:BOOL=ON
'
,
'
-DINTEGER_CLASS:STRING=flint
'
])
elif
'
+piranha
'
in
spec
:
options
.
extend
([
'
-DWITH_PIRANHA:BOOL=ON
'
,
'
-DINTEGER_CLASS:STRING=piranha
'
])
else
:
options
.
extend
([
'
-DINTEGER_CLASS:STRING=gmp
'
])
with
working_dir
(
'
spack-build
'
,
create
=
True
):
cmake
(
'
..
'
,
*
options
)
make
()
make
(
'
install
'
)
if
self
.
run_tests
:
ctest
()
return
options
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment