cmake_minimum_required(VERSION 2.8.12) project(FENNECS Fortran C) if(POLICY CMP0074) cmake_policy(SET CMP0074 NEW) endif() find_package(MPI COMPONENTS Fortran REQUIRED) find_package(OpenMP COMPONENTS Fortran C REQUIRED) find_package(HDF5 COMPONENTS Fortran C REQUIRED) #mark_as_advanced_prefix(HDF5_Fortran) #find_package(MPI REQUIRED) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake") include(CMakeFlagsHandling) # Compiler flags for debug/optimization if(${CMAKE_Fortran_COMPILER_ID} MATCHES "Intel") set(CMAKE_AR ${XIAR}) add_flags(LANG Fortran TYPE DEBUG -traceback "-check bounds" "-warn unused" -fpp -qopenmp -fpic) add_flags(LANG Fortran TYPE RELEASE -O3 -g -warn -fpp -qopenmp -fpic -traceback) elseif(${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU") add_flags(LANG Fortran TYPE DEBUG -fbounds-check -g -fbacktrace -fpic) add_flags(LANG Fortran "-fopenmp" "-cpp" "-ffree-line-length-none" "-fpic" "-std=legacy" "-fallow-argument-mismatch") endif() # Search and load the FUTILS configuration file if(NOT TARGET futils) find_package(futils PATHS ${futils_DIR}/lib/cmake REQUIRED) endif() # Search and load the bsplines configuration file if(NOT TARGET bsplines) find_package(bsplines PATHS ${bsplines_DIR}/lib/cmake REQUIRED) endif() #Search and load the bsplines configuration file if(NOT TARGET sisl) find_package(sisl MODULE REQUIRED) endif() if(NOT TARGET forsSISL) find_package(forSISL MODULE REQUIRED) endif() if(POLICY CMP0028) cmake_policy(SET CMP0028 OLD) endif() add_subdirectory(src)