hiddenSymmetries / VMEC2000

MIT License
10 stars 4 forks source link

Autodetect libraries #6

Open landreman opened 3 years ago

landreman commented 3 years ago

Rather than manually specifying paths to netcdf, scalapack, and blacs in cmake_config_file.json, many of these libraries could likely be auto-detected by cmake as in https://github.com/hiddenSymmetries/booz_xform/blob/main/cmake/FindNetCDF.cmake#L39-L45

And/or, some of this configuration could be done for a few of the usual HPC systems we use as in https://github.com/hiddenSymmetries/booz_xform/blob/main/cmake/knownHosts.cmake

mbkumar commented 3 years ago

Thanks, Matt for the suggestion. I remember this approach you showed. But haven't given it much thought because it goes against my philosophy of keeping data separate from code. Another factor is NetCDF and hdf5 packages are evolving in terms of their support for CMake.

Let me compare the FindNetCDF.cmake in booz_xform with the official CMake module for finding NetCDF.