-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
executable file
·38 lines (28 loc) · 986 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
cmake_minimum_required(VERSION 3.12)
project (GORILLA
VERSION 1.0.0)
enable_language(Fortran)
include_directories(/usr/local/include)
if(UNIX AND NOT APPLE)
include_directories(/usr/include)
elseif(APPLE AND ${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "arm64")
include_directories(/opt/homebrew/include)
endif()
find_package(BLAS REQUIRED)
find_package(LAPACK REQUIRED)
find_package(netCDF REQUIRED)
if ("$ENV{GORILLA_COVERAGE}" STREQUAL "TRUE")
find_package(PFUNIT REQUIRED)
enable_testing()
endif()
add_compile_options(-g -fbacktrace -ffpe-trap=zero,overflow,invalid -fbounds-check -fopenmp)
add_link_options(-g -fbacktrace -ffpe-trap=zero,overflow,invalid -fbounds-check -fopenmp)
add_link_options(-L/usr/local/lib)
if(APPLE AND ${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "arm64")
add_link_options(-L/opt/homebrew/lib)
endif()
if ("$ENV{GORILLA_COVERAGE}" STREQUAL "TRUE")
add_link_options(--coverage)
endif()
add_subdirectory(SRC)
message(${CMAKE_HOST_SYSTEM_PROCESSOR})