oce changes for cgm (#4514)
* oce changes for cgm cgm can be configured with oce, but oce needs to have X11 enabled, because some libraries (like TKCAF in occ/oce) gets built only of X11 is NOT disabled so introduce a variant +X11 for oce, which is needed when configuring cgm with oce(+X11) * follow up review simplify by removing the patch and different url paths use append instead of extend, when necessary make mpi true by default X11 dependency is still to be addressed; it pulls in some opengl library (on laptop nvidia seem to work, on virtual linux machine mesa was good enough)
This commit is contained in:
parent
790b06e0c3
commit
fe7bf77afe
2 changed files with 31 additions and 18 deletions
|
@ -25,30 +25,40 @@
|
||||||
from spack import *
|
from spack import *
|
||||||
|
|
||||||
|
|
||||||
class Cgm(Package):
|
class Cgm(AutotoolsPackage):
|
||||||
"""The Common Geometry Module, Argonne (CGMA) is a code library
|
"""The Common Geometry Module, Argonne (CGMA) is a code library
|
||||||
which provides geometry functionality used for mesh generation and
|
which provides geometry functionality used for mesh generation and
|
||||||
other applications."""
|
other applications."""
|
||||||
homepage = "http://trac.mcs.anl.gov/projects/ITAPS/wiki/CGM"
|
homepage = "http://sigma.mcs.anl.gov/cgm-library"
|
||||||
url = "http://ftp.mcs.anl.gov/pub/fathom/cgm13.1.1.tar.gz"
|
url = "http://ftp.mcs.anl.gov/pub/fathom/cgm-16.0.tar.gz"
|
||||||
|
|
||||||
|
version('16.0', 'a68aa5954d82502ff75d5eb91a29a01c')
|
||||||
version('13.1.1', '4e8dbc4ba8f65767b29f985f7a23b01f')
|
version('13.1.1', '4e8dbc4ba8f65767b29f985f7a23b01f')
|
||||||
version('13.1.0', 'a6c7b22660f164ce893fb974f9cb2028')
|
version('13.1.0', 'a6c7b22660f164ce893fb974f9cb2028')
|
||||||
version('13.1', '95f724bda04919fc76818a5b7bc0b4ed')
|
version('13.1', '95f724bda04919fc76818a5b7bc0b4ed')
|
||||||
|
|
||||||
depends_on("mpi")
|
variant("mpi", default=True, description='enable mpi support')
|
||||||
|
variant("oce", default=False, description='enable oce geometry kernel')
|
||||||
|
|
||||||
def patch(self):
|
depends_on('mpi', when='+mpi')
|
||||||
filter_file('^(#include "CGMParallelConventions.h")',
|
depends_on('oce+X11', when='+oce')
|
||||||
'//\1',
|
|
||||||
'geom/parallel/CGMReadParallel.cpp')
|
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def configure_args(self):
|
||||||
configure("--with-mpi",
|
spec = self.spec
|
||||||
"--prefix=%s" % prefix,
|
args = []
|
||||||
"CFLAGS=-static",
|
|
||||||
"CXXFLAGS=-static",
|
|
||||||
"FCFLAGS=-static")
|
|
||||||
|
|
||||||
make()
|
if '+mpi' in spec:
|
||||||
make("install")
|
args.extend([
|
||||||
|
"--with-mpi",
|
||||||
|
"CC={0}".format(spec['mpi'].mpicc),
|
||||||
|
"CXX={0}".format(spec['mpi'].mpicxx)
|
||||||
|
])
|
||||||
|
else:
|
||||||
|
args.append("--without-mpi")
|
||||||
|
|
||||||
|
if '+oce' in spec:
|
||||||
|
args.append("--with-occ={0}".format(spec['oce'].prefix))
|
||||||
|
else:
|
||||||
|
args.append("--without-occ")
|
||||||
|
|
||||||
|
return args
|
||||||
|
|
|
@ -44,6 +44,8 @@ class Oce(Package):
|
||||||
|
|
||||||
variant('tbb', default=True,
|
variant('tbb', default=True,
|
||||||
description='Build with Intel Threading Building Blocks')
|
description='Build with Intel Threading Building Blocks')
|
||||||
|
variant('X11', default=False,
|
||||||
|
description='Build with X11 enabled')
|
||||||
|
|
||||||
depends_on('cmake@2.8:', type='build')
|
depends_on('cmake@2.8:', type='build')
|
||||||
depends_on('tbb', when='+tbb')
|
depends_on('tbb', when='+tbb')
|
||||||
|
@ -70,7 +72,8 @@ def install(self, spec, prefix):
|
||||||
'-DOCE_BUILD_SHARED_LIB:BOOL=ON',
|
'-DOCE_BUILD_SHARED_LIB:BOOL=ON',
|
||||||
'-DCMAKE_BUILD_TYPE:STRING=Release',
|
'-DCMAKE_BUILD_TYPE:STRING=Release',
|
||||||
'-DOCE_DATAEXCHANGE:BOOL=ON',
|
'-DOCE_DATAEXCHANGE:BOOL=ON',
|
||||||
'-DOCE_DISABLE_X11:BOOL=ON',
|
'-DOCE_DISABLE_X11:BOOL=%s' % (
|
||||||
|
'OFF' if '+X11' in spec else 'ON'),
|
||||||
'-DOCE_DRAW:BOOL=OFF',
|
'-DOCE_DRAW:BOOL=OFF',
|
||||||
'-DOCE_MODEL:BOOL=ON',
|
'-DOCE_MODEL:BOOL=ON',
|
||||||
'-DOCE_MULTITHREAD_LIBRARY:STRING=%s' % (
|
'-DOCE_MULTITHREAD_LIBRARY:STRING=%s' % (
|
||||||
|
|
Loading…
Reference in a new issue