openPMD-api: JSON Always On (#13641)

JSON is not a compile-time variant anymore and a mandatory
dependency from now on.
This commit is contained in:
Axel Huebl 2019-11-08 09:00:10 -08:00 committed by Adam J. Stewart
parent 3c2542f387
commit c1ee069d1b

View File

@ -26,8 +26,6 @@ class OpenpmdApi(CMakePackage):
description='Enable ADIOS1 support')
variant('adios2', default=False,
description='Enable ADIOS2 support')
variant('json', default=True,
description='Enable JSON support')
variant('python', default=False,
description='Enable Python bindings')
@ -44,7 +42,7 @@ class OpenpmdApi(CMakePackage):
depends_on('adios2@2.4.0:', when='+adios2')
depends_on('adios2@2.4.0: ~mpi', when='~mpi +adios2')
depends_on('adios2@2.4.0: +mpi', when='+mpi +adios2')
depends_on('nlohmann-json@3.7.0:', when='+json')
depends_on('nlohmann-json@3.7.0:')
depends_on('py-pybind11@2.3.0:', when='+python', type='link')
depends_on('py-numpy@1.15.1:', when='+python', type=['test', 'run'])
depends_on('py-mpi4py@2.1.0:', when='+python +mpi', type=['test', 'run'])
@ -67,8 +65,6 @@ def cmake_args(self):
'ON' if '+adios1' in spec else 'OFF'),
'-DopenPMD_USE_ADIOS2:BOOL={0}'.format(
'ON' if '+adios2' in spec else 'OFF'),
'-DopenPMD_USE_JSON:BOOL={0}'.format(
'ON' if '+json' in spec else 'OFF'),
'-DopenPMD_USE_PYTHON:BOOL={0}'.format(
'ON' if '+python' in spec else 'OFF'),
# tests and examples
@ -84,10 +80,10 @@ def cmake_args(self):
args.append('-DPYTHON_EXECUTABLE:FILEPATH={0}'.format(
self.spec['python'].command.path))
if spec.satisfies('+json'):
args.append('-DopenPMD_USE_INTERNAL_JSON:BOOL=OFF')
args.append('-DopenPMD_USE_INTERNAL_VARIANT:BOOL=OFF')
args.extend([
'-DopenPMD_USE_INTERNAL_JSON:BOOL=OFF',
'-DopenPMD_USE_INTERNAL_VARIANT:BOOL=OFF'
])
if self.run_tests:
args.append('-DopenPMD_USE_INTERNAL_CATCH:BOOL=OFF')