Improve CMakeLists.txt behaviour when called from a parent project

When including EaFort in a project, the main CMakeLists.txt outputs a lot of information that may not be wanted.

Adding a check for whether EaFort is the tope-level project would allow to prevent this. For example, CMake 3.21 provides PROJECT_IS_TOP_LEVEL. Alternatively (if requiring CMake>=3.21 is not acceptable), one could use get_directory_property(hasParent PARENT_DIRECTORY).

Also, the call to project(<project-name>) should explicitely use the language as an option (here Fortran), otherwise CMake will look for C and C++ compilers which are not necessary.

Tasks:

  • Add CI/CD
  • Suppress output when building from another project: see #3
  • Standardise some build options
  • Remove default setting of build/install path (to let the user control this)
  • Use FetchContent to include third party code
  • Improve management of the LAPACK/MKL dependency
  • Remove some default flags when building from another project (e.g. IPO)
  • Build with mathPack in CI
  • (optional) Add a CMake config file for easier use from another project
  • (optional) Make the build/install modular
Edited by Moran Charlou