-
Notifications
You must be signed in to change notification settings - Fork 16
/
CMakeLists.txt
50 lines (37 loc) · 1.44 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
42
43
44
45
46
47
48
49
50
cmake_minimum_required(VERSION 3.5)
project(HarmonieDaTools LANGUAGES Fortran)
find_package (Python3 COMPONENTS Interpreter)
enable_testing()
if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
set(dialect "-ffree-form -fimplicit-none -fconvert=big-endian")
set(bounds "-fbounds-check")
endif()
if(CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
set(dialect "-free -implicitnone -convert big_endian")
set(bounds "-check bounds")
endif()
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} ${bounds}")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${dialect}")
#
# Compile.
#
add_executable(jbdiagnose.x src/jbdiagnose.F90)
add_executable(cv_header_list.x src/cv_header_list.F90)
add_executable(dfscomp.x src/dfscomp.F90)
add_executable(prepdiacov.x src/prepdiacov.F90)
# install executables and scripts
install (TARGETS jbdiagnose.x
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ
DESTINATION libexec)
install (TARGETS cv_header_list.x
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ
DESTINATION libexec)
install (TARGETS dfscomp.x
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ
DESTINATION libexec)
install (TARGETS prepdiacov.x
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ
DESTINATION libexec)
add_subdirectory (scripts)
add_subdirectory (share)
add_subdirectory (tests)