-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
41 lines (29 loc) · 1.24 KB
/
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
39
40
41
############################################################################################
# etrans project
# Collection of stripped down libraries from Aladin
# - etrans
cmake_minimum_required( VERSION 3.12 FATAL_ERROR )
find_package( ecbuild 3.4 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild )
project( etrans LANGUAGES C Fortran )
#ecbuild_enable_fortran( REQUIRED NO_MODULE_DIRECTORY )
ecbuild_enable_fortran( REQUIRED MODULE_DIRECTORY ${PROJECT_BINARY_DIR}/module )
# dependencies:
ecbuild_find_package( fiat REQUIRED )
ecbuild_find_package( ectrans REQUIRED )
find_package( OpenACC REQUIRED )
enable_language( CUDA )
set( OpenACC_Fortran_FLAGS "-acc" )
set( OpenACC_Fortran_FLAGS "${OpenACC_Fortran_FLAGS} -ta=tesla:lineinfo,deepcopy,fastmath" )
set( OpenACC_Fortran_FLAGS "${OpenACC_Fortran_FLAGS} -Mcuda" )
############################################################################################
# build etrans library
add_subdirectory( src )
ecbuild_add_option( FEATURE DRIVER
DEFAULT ON
DESCRIPTION "Compile driver program for LAM transforms"
)
if( HAVE_DRIVER )
add_subdirectory( driver )
endif()
ecbuild_install_project( NAME etrans )
ecbuild_print_summary()