Skip to content
Snippets Groups Projects
Unverified Commit b88c66cb authored by Robert Blake's avatar Robert Blake Committed by GitHub
Browse files

Adding an option to build the C api for Umpire. (#15238)

* Adding an option to build the C api for Umpire.

This is useful if you need to link to a C code and you're using
a compiler suite that doesn't support fortran.

* Also updating the versions while I'm here.

* Adding conflict: Fortran requires C.

To ease transition and confusion, default to C-bindings being
present.  This shouldn't hurt anyone who is upgrading an existing
installation.
parent 4d5e75d8
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,13 @@ class Umpire(CMakePackage):
version('develop', branch='develop', submodules='True')
version('master', branch='master', submodules='True')
version('2.1.0', tag='v2.1.0', submodules='True')
version('2.0.0', tag='v2.0.0', submodules='True')
version('1.1.0', tag='v1.1.0', submodules='True')
version('1.0.1', tag='v1.0.1', submodules='True')
version('1.0.0', tag='v1.0.0', submodules='True')
version('0.3.5', tag='v0.3.5', submodules='True')
version('0.3.4', tag='v0.3.4', submodules='True')
version('0.3.3', tag='v0.3.3', submodules='True')
version('0.3.2', tag='v0.3.2', submodules='True')
version('0.3.1', tag='v0.3.1', submodules='True')
......@@ -29,7 +36,8 @@ class Umpire(CMakePackage):
version('0.1.3', tag='v0.1.3', submodules='True')
variant('cuda', default=False, description='Build with CUDA support')
variant('fortran', default=False, description='Build C/Fortran API')
variant('fortran', default=False, description='Build Fortran API')
variant('c', default=True, description='Build C API')
variant('numa', default=False, description='Enable NUMA support')
depends_on('cuda', when='+cuda')
......@@ -37,6 +45,7 @@ class Umpire(CMakePackage):
depends_on('cmake@3.9:', when='+cuda', type='build')
conflicts('+numa', when='@:0.3.2')
conflicts('~c', when='+fortran', msg='Fortran API requires C API')
def cmake_args(self):
spec = self.spec
......@@ -50,6 +59,9 @@ def cmake_args(self):
else:
options.append('-DENABLE_CUDA=Off')
if '+c' in spec:
options.append('-DENABLE_C=On')
if '+fortran' in spec:
options.append('-DENABLE_FORTRAN=On')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment