def cmake_args(self):
        args = []
        spec = self.spec

        args.append(self.define_from_variant('ENABLE_SHARED', 'shared'))
        args.append(self.define_from_variant('USE_OPENMP', 'openmp'))
        args.append(self.define_from_variant('USE_READLINE', 'readline'))
        args.append(self.define_from_variant('USE_HDF5', 'hdf5'))
        args.append(self.define_from_variant('USE_ADIOS2', 'adios2'))
        args.append(self.define_from_variant('USE_MPI', 'adios2'))
        if spec.satisfies('+adios2'):
            args.append(self.define('ENABLE_TABLELOCKING', False))

        # fftw3 is required by casacore starting with v3.4.0, but the
        # old fftpack is still available. For v3.4.0 and later, we
        # always require FFTW3 dependency with the optional addition
        # of FFTPack. In older casacore versions, only one of FFTW3 or
        # FFTPack can be selected.
        if spec.satisfies('@3.4.0:'):
            if spec.satisfies('+fftpack'):
                args.append('-DBUILD_FFTPACK_DEPRECATED=YES')
            args.append(self.define('USE_FFTW3', True))
        else:
            args.append(self.define('USE_FFTW3', spec.satisfies('~fftpack')))

        # Python2 and Python3 binding
        if spec.satisfies('~python'):
            args.extend(['-DBUILD_PYTHON=NO', '-DBUILD_PYTHON3=NO'])
        elif spec.satisfies('^python@3.0.0:'):
            args.extend(['-DBUILD_PYTHON=NO', '-DBUILD_PYTHON3=YES'])
        else:
            args.extend(['-DBUILD_PYTHON=YES', '-DBUILD_PYTHON3=NO'])

        args.append('-DBUILD_TESTING=OFF')
        return args