-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathCMakeLists.txt
40 lines (32 loc) · 1.11 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
cmake_minimum_required(VERSION 3.24)
project(fusion_io VERSION 1.0.0 LANGUAGES C CXX Fortran)
enable_testing()
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
include(FindPkgConfig)
# set(PKG_CONFIG_ARGN "--static")
pkg_check_modules(HDF5 REQUIRED IMPORTED_TARGET hdf5)
option(FUSIONIO_ENABLE_PYTHON "Enable Python" ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
if (CMAKE_Fortran_COMPILER_ID MATCHES "Cray")
set(CMAKE_Fortran_FLAGS "-s real64")
elseif (CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
set(CMAKE_Fortran_FLAGS "-fdefault-real-8")
elseif (CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
set(CMAKE_Fortran_FLAGS "-real-size 64")
elseif (CMAKE_Fortran_COMPILER_ID MATCHES "NVHPC")
set(CMAKE_Fortran_FLAGS "-r8")
else()
set(CMAKE_Fortran_FLAGS "-r8")
endif()
include_directories(${PROJECT_SOURCE_DIR}/output_stream)
add_subdirectory(m3dc1_lib)
add_subdirectory(fusion_io)
option(FUSIONIO_ENABLE_TRACE "Enable Trace" ON)
if (FUSIONIO_ENABLE_TRACE)
add_subdirectory(trace)
endif()
option(FUSIONIO_BUILD_TESTING "Build for CTest" OFF)
if (FUSIONIO_BUILD_TESTING)
add_subdirectory(examples)
endif()