-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathCMakeLists.txt
66 lines (53 loc) · 2.38 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
cmake_minimum_required(VERSION 3.12)
project(HDF5_VOL_CACHE VERSION 2.0)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
include(CTest)
enable_testing()
find_package(MPI REQUIRED)
find_package(ASYNC REQUIRED)
find_package(HDF5 REQUIRED COMPONENTS C)
include_directories(${MPI_INCLUDE_PATH})
include_directories(${HDF5_INCLUDE_DIRS})
include_directories(${ASYNC_INCLUDE_DIRS})
if(NOT HDF5_VOL_CACHE_INSTALL_BIN_DIR)
set(HDF5_VOL_CACHE_INSTALL_BIN_DIR ${CMAKE_INSTALL_PREFIX}/bin)
endif()
if(NOT HDF5_VOL_CACHE_INSTALL_LIB_DIR)
set(HDF5_VOL_CACHE_INSTALL_LIB_DIR ${CMAKE_INSTALL_PREFIX}/lib)
endif()
if(NOT HDF5_VOL_CACHE_INSTALL_INCLUDE_DIR)
set(HDF5_VOL_CACHE_INSTALL_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/include)
endif()
if(NOT HDF5_VOL_CACHE_INSTALL_DATA_DIR)
set(HDF5_VOL_CACHE_INSTALL_DATA_DIR ${CMAKE_INSTALL_PREFIX}/share)
endif()
set(HDF5_VOL_CACHE_PACKAGE "hdf5_vol_cache")
set(HDF5_VOL_CACHE_PACKAGE_NAME "HDF5_VOL_CACHE")
set(HDF5_VOL_CACHE_PACKAGE_DESCRIPTION "HDF5 VOL connector for CACHE")
set(HDF5_VOL_CACHE_PACKAGE_URL "https://github.com/hpc-io/vol-cache/")
set(HDF5_VOL_CACHE_PACKAGE_VENDOR "HPC IO")
message(STATUS "Configuring ${HDF5_VOL_CACHE_PACKAGE} ${PROJECT_VERSION}")
# Check if HDF5 version is 1.14 or greater
if(HDF5_FOUND)
if (HDF5_VERSION VERSION_LESS "1.14.0")
message (FATAL_ERROR "HDF5 ${HDF5_VERSION}: required HDF5 version is at least 1.14 ")
endif ()
endif ()
#-----------------------------------------------------------------------------
# Source
#-----------------------------------------------------------------------------
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_SOURCE_DIR}/utils)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src)
#-----------------------------------------------------------------------------
# Testing
#-----------------------------------------------------------------------------
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/tests)
#-----------------------------------------------------------------------------
# Benchmarking
#-----------------------------------------------------------------------------
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/benchmarks)
#-----------------------------------------------------------------------------
# Utilities
#-----------------------------------------------------------------------------
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/utils)