diff --git a/var/spack/repos/builtin/packages/nlopt/package.py b/var/spack/repos/builtin/packages/nlopt/package.py index 3beb7d9966..5b8dac7c6d 100644 --- a/var/spack/repos/builtin/packages/nlopt/package.py +++ b/var/spack/repos/builtin/packages/nlopt/package.py @@ -55,6 +55,10 @@ def cmake_args(self): if '-shared' in spec: args.append('-DBUILD_SHARED_LIBS:Bool=OFF') + # On is default + if '-octave' in spec: + args.append('-DNLOPT_OCTAVE:Bool=OFF') + if '+cxx' in spec: args.append('-DNLOPT_CXX:BOOL=ON')