-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
52 lines (40 loc) · 1.33 KB
/
CMakeLists.txt
File metadata and controls
52 lines (40 loc) · 1.33 KB
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
cmake_minimum_required(VERSION 3.26)
project(exodusIIcpp
VERSION 3.1.0
LANGUAGES CXX C
)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
include(FetchContent)
include(CMakePackageConfigHelpers)
include(GNUInstallDirs)
include(CodeCoverage)
include(Sanitization)
set(LibraryTypeValues "SHARED;STATIC")
if(NOT EXODUSIICPP_LIBRARY_TYPE)
set(EXODUSIICPP_LIBRARY_TYPE "SHARED" CACHE STRING "Build as a shared or static library." FORCE)
endif()
set_property(CACHE EXODUSIICPP_LIBRARY_TYPE PROPERTY STRINGS ${LibraryTypeValues})
option(EXODUSIICPP_BUILD_TESTS "Build tests" NO)
option(EXODUSIICPP_BUILD_TOOLS "Build tools" YES)
option(EXODUSIICPP_INSTALL "Install the library" ON)
option(EXODUSIICPP_WITH_PYTHON "Build python wrapper" NO)
mark_as_advanced(FORCE EXODUSIICPP_INSTALL)
find_package(fmt 11 REQUIRED)
find_package(NetCDF 4.9 REQUIRED)
find_package(HDF5 1.10 REQUIRED COMPONENTS C)
find_package(ExodusII REQUIRED)
add_subdirectory(src)
if (EXODUSIICPP_BUILD_TOOLS)
add_subdirectory(tools)
endif()
if (EXODUSIICPP_WITH_PYTHON)
add_subdirectory(python)
endif()
# Tests
if (EXODUSIICPP_BUILD_TESTS)
set(EXODUSIICPP_UNIT_TEST_ASSETS ${CMAKE_SOURCE_DIR}/test/assets CACHE PATH "" FORCE)
mark_as_advanced(FORCE EXODUSIICPP_UNIT_TEST_ASSETS)
enable_testing()
add_subdirectory(test)
endif()
add_subdirectory(docs)