BOUT-dev icon indicating copy to clipboard operation
BOUT-dev copied to clipboard

cmake: specify locations

Open dschwoerer opened this issue 4 years ago • 1 comments

Specifiying location with cmake is a bit messy:

I would prefer to pass the location after -DBOUT_USE_NETCDF - because I want BOUT++ to find it.

Also, right now I need to mix _ROOT and _DIR - while _ROOT is not even a tab-completing.

cmake .. -DBOUT_USE_NETCDF=ON -DnetCDF_ROOT=$BOUT_DEP -DnetCDFCxx_ROOT=$BOUT_DEP -DBOUT_USE_PETSC=ON -DPETSC_DIR=$BOUT_DEP -DBOUT_USE_FFTW=ON -DFFTW_ROOT=$BOUT_DEP -DBOUT_USE_SUNDIALS=ON -DSUNDIALS_ROOT=$BOUT_DEP -DBOUT_USE_LAPACK=OFF

dschwoerer avatar Jul 21 '21 08:07 dschwoerer

I think everything except PETSc should accept _ROOT, and that could be changed to accept _ROOT too, it's just PETSc is... well, PETSc. We'd probably check if PETSC_ROOT was set, and if so, set PETSC_DIR from that in FindPETSc.cmake

We might be able to do something like X_ROOT = BOUT_USE_X if X_ROOT isn't set.

ZedThree avatar Jul 21 '21 09:07 ZedThree