cmake_minimum_required(VERSION 3.10) set(CMAKE_C_COMPILER gcc) set(CMAKE_Fortran_COMPILER gfortran) foreach(cver 8 9 7 6 5) find_program(gcc_EXECUTABLE gcc-${cver}) if(gcc_EXECUTABLE) set(CMAKE_C_COMPILER gcc-${cver}) set(CMAKE_Fortran_COMPILER gfortran-${cver}) break() endif() endforeach() set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(SHARE_DIRECTORY ${CMAKE_BINARY_DIR}/share) set(PKG "$ENV{PKG}") if(PKG) add_compile_options(-O4 -cpp -ffast-math -m64) else() add_compile_options(-O4 -cpp -ffast-math -march=native) endif() enable_language(Fortran) string(APPEND CMAKE_Fortran_FLAGS " -fno-automatic -fno-align-commons -std=legacy") project(guisdap) add_subdirectory(models/iri2016) add_subdirectory(models/nrlmsis2.0) add_subdirectory(models/irbem/source) add_subdirectory(models/irbem) add_subdirectory(source)