Skip to content

Commit 6bdb8d5

Browse files
committed
add h5fortran_BUILD_TESTING option for external project
1 parent 61738cc commit 6bdb8d5

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,18 @@ endif()
1010

1111
project(h5fortran
1212
LANGUAGES C Fortran
13-
VERSION 3.2.1
13+
VERSION 3.2.2
1414
DESCRIPTION "thin, light object-oriented HDF5 Fortran interface"
1515
HOMEPAGE_URL https://github.com/geospace-code/h5fortran)
1616

1717
include(CTest)
1818

1919
option(autobuild "autobuild HDF5 if missing or broken" on)
2020

21+
if(NOT DEFINED ${PROJECT_NAME}_BUILD_TESTING)
22+
set(${PROJECT_NAME}_BUILD_TESTING ${BUILD_TESTING})
23+
endif()
24+
2125
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
2226
# set(HDF5_FIND_DEBUG true)
2327

@@ -50,7 +54,7 @@ add_library(h5fortran::h5fortran ALIAS h5fortran)
5054

5155
add_subdirectory(src)
5256

53-
if(BUILD_TESTING)
57+
if(${PROJECT_NAME}_BUILD_TESTING)
5458
add_subdirectory(src/tests)
5559
endif()
5660

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
project('h5fortran', 'fortran',
22
meson_version : '>=0.52.0',
3-
version : '3.2.1',
3+
version : '3.2.2',
44
default_options : ['default_library=static', 'buildtype=release', 'warning_level=3'])
55

66
subdir('meson')

0 commit comments

Comments
 (0)