forked from jbengtsson/thor-scsi-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
49 lines (36 loc) · 1.33 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
cmake_minimum_required(VERSION 3.0.0)
project("thor_scsi" LANGUAGES CXX Fortran)
# project("thor_scsi")
ENABLE_LANGUAGE(Fortran)
set(THOR_SCSI_VERSION 0.0.1)
# specify the C++ standard
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
if(CMAKE_COMPILER_IS_GNUCXX)
add_definitions(-g -ggdb -pedantic -Wall)
add_definitions(-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers)
# message(STATUS "Enabling gxx debug preprocessor flags")
# flame relies on boost ... have to search if ubuntu has a version which supports
# GNU extra flags ...
# add_definitions(-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC)
endif()
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE RELEASE) # default to debug build
message(STATUS "Default to DEBUG build")
endif()
find_package(Armadillo REQUIRED)
find_package(PythonInterp 3)
# include(CMakeAddFortranSubdirectory)
enable_testing()
# yes ... depends on flame ...
find_package(flame REQUIRED COMPONENTS core)
# Flame used by t
get_target_property(flame_CORE_LIBRARY flame::flame_core IMPORTED_LOCATION_RELEASE)
message(STATUS "Flame core library ${flame_CORE_LIBRARY}")
message(STATUS "Flame include dir ${flame_INCLUDE_DIR}")
# Fortran implementation part
add_subdirectory(TPSA)
# C++ implementation part
add_subdirectory(src)
# add_subdirectory(thor)
add_subdirectory(python)