GEOS-ESM / ESMA_cmake

Custom CMake macros for the GEOS Earth System Model
Apache License 2.0
4 stars 9 forks source link

Save BASELIBS in cache after initial cmake #216

Closed tclune closed 3 years ago

tclune commented 3 years ago

When BASEDIR is determined from the environment ala:

export BASEDIR=...
$ cmake ..

and then one comes back in another session where BASEDIR has not been set, CMake will complain:

-- WARNING: BASEDIR not specified. Please use cmake ... -DBASEDIR=<path>.

Basically, CMake should only check for the env variable if the variable has not already been set. And then cache it after it has been found.