forked from geospace-code/h5fortran
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptions.cmake
34 lines (23 loc) · 1.07 KB
/
options.cmake
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
message(STATUS "${PROJECT_NAME} ${PROJECT_VERSION} CMake ${CMAKE_VERSION} Toolchain ${CMAKE_TOOLCHAIN_FILE}")
include(GNUInstallDirs)
option(ENABLE_COVERAGE "Code coverage tests")
option(tidy "Run clang-tidy on the code")
option(matlab "check HDF5 file writes with Matlab")
option(concepts "conceptual testing, for devs only" off)
set(CMAKE_TLS_VERIFY true)
include(GNUInstallDirs)
if(BUILD_SHARED_LIBS AND MSVC)
message(WARNING "Intel oneAPI has trouble with shared libs in general on Windows, try
cmake -DBUILD_SHARED_LIBS=off")
endif()
# Rpath options necessary for shared library install to work correctly in user projects
set(CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_FULL_LIBDIR})
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR})
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH true)
# Necessary for shared library with Visual Studio / Windows oneAPI
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS true)
# allow CMAKE_PREFIX_PATH with ~ expand
if(CMAKE_PREFIX_PATH)
get_filename_component(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ABSOLUTE)
endif()
file(GENERATE OUTPUT .gitignore CONTENT "*")