summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorElizabeth Fischer <rpf2116@columbia.edu>2016-10-12 16:02:06 -0400
committerTodd Gamblin <tgamblin@llnl.gov>2016-10-12 13:02:06 -0700
commit67ef6df4db0be09d60ceb1120971a381c4638ec7 (patch)
treedf6f4f2d6ffa791d0f8563ff6cc5e0cc3a80d1bc /var
parentb369be65d778cdc634d777c1a0c59f1fd1e070e4 (diff)
downloadspack-67ef6df4db0be09d60ceb1120971a381c4638ec7.tar.gz
spack-67ef6df4db0be09d60ceb1120971a381c4638ec7.tar.bz2
spack-67ef6df4db0be09d60ceb1120971a381c4638ec7.tar.xz
spack-67ef6df4db0be09d60ceb1120971a381c4638ec7.zip
Made optional CGAL dependencies optional. (#2006)
* Made optional CGAL dependencies optional. * cgal: Added note explaining that the CORE library is not the same as core CGAL functionality. * Bug fix and flake8 * flake8
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/cgal/package.py51
1 files changed, 34 insertions, 17 deletions
diff --git a/var/spack/repos/builtin/packages/cgal/package.py b/var/spack/repos/builtin/packages/cgal/package.py
index ebfd3f9250..a16572246b 100644
--- a/var/spack/repos/builtin/packages/cgal/package.py
+++ b/var/spack/repos/builtin/packages/cgal/package.py
@@ -44,13 +44,31 @@ class Cgal(Package):
variant('debug', default=False,
description='Builds a debug version of the libraries')
+ # ---- See "7 CGAL Libraries" at:
+ # http://doc.cgal.org/latest/Manual/installation.html
+
+ # The CORE library provides exact arithmetic for geometric computations.
+ # See: http://cs.nyu.edu/exact/core_pages/
+ # http://cs.nyu.edu/exact/core_pages/svn-core.html
+ variant('core', default=False,
+ description='Build the CORE library for algebraic numbers')
+ variant('imageio', default=False,
+ description='Build utilities to read/write image files')
+ variant('demos', default=False,
+ description='Build CGAL demos')
+
# Essential Third Party Libraries
- depends_on('boost')
+ depends_on('boost+thread+system')
depends_on('gmp')
depends_on('mpfr')
+
+ # Required for CGAL_ImageIO
+ # depends_on('opengl', when='+imageio') # not yet in Spack
depends_on('zlib')
- # depends_on('opengl')
- depends_on('qt@5:')
+
+ # Optional to build CGAL_Qt5 (demos)
+ # depends_on('opengl', when='+demos') # not yet in Spack
+ depends_on('qt@5:', when='+demos')
# Optional Third Party Libraries
# depends_on('leda')
@@ -70,20 +88,19 @@ class Cgal(Package):
# Installation instructions:
# http://doc.cgal.org/latest/Manual/installation.html
- options = []
- options.extend(std_cmake_args)
-
- # CGAL supports only Release and Debug build type. Any other build type
- # will raise an error at configure time
- if '+debug' in spec:
- options.append('-DCMAKE_BUILD_TYPE:STRING=Debug')
- else:
- options.append('-DCMAKE_BUILD_TYPE:STRING=Release')
-
- if '+shared' in spec:
- options.append('-DBUILD_SHARED_LIBS:BOOL=ON')
- else:
- options.append('-DBUILD_SHARED_LIBS:BOOL=OFF')
+ options = std_cmake_args + [
+ # CGAL supports only Release and Debug build type. Any
+ # other build type will raise an error at configure time
+ '-DCMAKE_BUILD_TYPE:STRING=%s' %
+ ('Debug' if '+debug' in spec else 'Release'),
+ '-DBUILD_SHARED_LIBS:BOOL=%s' %
+ ('ON' if '+shared' in spec else 'OFF'),
+ '-DWITH_CGAL_Core:BOOL=%s' %
+ ('YES' if '+core' in spec else 'NO'),
+ '-DWITH_CGAL_ImageIO:BOOL=%s' %
+ ('YES' if '+imageio' in spec else 'NO'),
+ '-DWITH_CGAL_Qt5:BOOL=%s' %
+ ('YES' if '+demos' in spec else 'NO')]
with working_dir('spack-build', create=True):
cmake('..', *options)