File tree Expand file tree Collapse file tree 10 files changed +28
-14
lines changed Expand file tree Collapse file tree 10 files changed +28
-14
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,18 @@ DESCRIPTION "Lightweight object-oriented HDF5 MPI parallel Fortran interface"
1919HOMEPAGE_URL https://github.com/geospace-code/h5fortran-mpi
2020)
2121
22- include (CTest)
22+ enable_testing ()
23+
2324if (NOT DEFINED ${PROJECT_NAME} _BUILD_TESTING)
24- set (${PROJECT_NAME} _BUILD_TESTING ${BUILD_TESTING} )
25+ if (DEFINED BUILD_TESTING)
26+ set (${PROJECT_NAME} _BUILD_TESTING ${BUILD_TESTING} )
27+ else ()
28+ set (${PROJECT_NAME} _BUILD_TESTING true )
29+ endif ()
30+ endif ()
31+
32+ if (benchmark)
33+ set (${PROJECT_NAME} _BUILD_TESTING true )
2534endif ()
2635
2736if (${PROJECT_NAME} _BUILD_TESTING)
@@ -76,11 +85,10 @@ if(${PROJECT_NAME}_BUILD_TESTING)
7685 add_subdirectory (test )
7786endif ()
7887
79- if (ENABLE_BENCHMARKS )
88+ if (benchmark )
8089 add_subdirectory (benchmark)
8190endif ()
8291
83-
8492# additional Find*.cmake necessary
8593install (FILES
8694${CMAKE_CURRENT_SOURCE_DIR} /cmake/Modules/FindHDF5.cmake
Original file line number Diff line number Diff line change @@ -29,9 +29,9 @@ add_library(partition OBJECT partition.f90)
2929
3030add_library (cli OBJECT cli.f90)
3131
32- add_executable (runner frontend.f90 cpu_count.cpp )
32+ add_executable (runner frontend.f90)
3333target_include_directories (runner PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} )
34- target_link_libraries (runner PRIVATE partition cli)
34+ target_link_libraries (runner PRIVATE partition cli cpu_count )
3535if (CMAKE_Fortran_COMPILER_ID MATCHES "^Intel" )
3636 set_property (TARGET runner PROPERTY LINKER_LANGUAGE Fortran)
3737else ()
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ $<$<COMPILE_LANGUAGE:Fortran>:-fimplicit-none>
3737endif ()
3838
3939# --- code coverage
40- if (ENABLE_COVERAGE )
40+ if (coverage )
4141include (CodeCoverage)
4242append_coverage_compiler_flags()
4343set (COVERAGE_EXCLUDES ${PROJECT_SOURCE_DIR} /test )
Original file line number Diff line number Diff line change 11message (STATUS "${PROJECT_NAME} ${PROJECT_VERSION} CMake ${CMAKE_VERSION} " )
22
3- option (ENABLE_BENCHMARKS "write / read benchmarks" )
4- option (ENABLE_COVERAGE "Code coverage tests" )
3+ option (benchmark "Run benchmarks" )
4+ option (coverage "Code coverage tests" )
55option (hdf5_parallel "use HDF5-MPI layer" true )
66
77set (CMAKE_TLS_VERIFY true )
Original file line number Diff line number Diff line change 33 "@type" : " SoftwareSourceCode" ,
44 "codeRepository" : " https://github.com/geospace-code/h5fortran-mpi" ,
55 "contIntegration" : " https://github.com/geospace-code/h5fortran-mpi/actions" ,
6- "dateModified" : " 2022-07-28 " ,
6+ "dateModified" : " 2022-07-29 " ,
77 "downloadUrl" : " https://github.com/geospace-code/h5fortran-mpi/releases" ,
88 "issueTracker" : " https://github.com/geospace-code/h5fortran-mpi/issues" ,
99 "name" : " h5fortran-mpi" ,
10- "version" : " 2.0.1 " ,
10+ "version" : " 2.0.2 " ,
1111 "identifier" : " 10.5281/zenodo.5847354" ,
1212 "description" : " Lightweight object-oriented HDF5-MPI parallel Fortran interface" ,
1313 "applicationCategory" : " file I/O" ,
Original file line number Diff line number Diff line change 11name = " h5fortran-mpi"
22description = " Lightweight object-oriented HDF5 MPI parallel interface"
33categories = " io"
4- version = " 2.0.0 "
4+ version = " 2.0.2 "
55
66[build ]
77auto-tests = false
Original file line number Diff line number Diff line change 1+ add_library (cpu_count OBJECT cpu_count.cpp)
2+ target_compile_features (cpu_count PRIVATE cxx_std_11)
3+ target_compile_definitions (cpu_count PRIVATE $<$<BOOL :${MSVC} >:_CRT_SECURE_NO_WARNINGS>)
4+ target_include_directories (cpu_count PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} )
5+
16# --- Python h5py
27find_package (Python COMPONENTS Interpreter)
38if (NOT DEFINED h5py_ok)
@@ -29,7 +34,7 @@ if(hdf5_parallel)
2934 add_subdirectory (mpi)
3035endif ()
3136
32- if (ENABLE_COVERAGE )
37+ if (coverage )
3338 setup_target_for_coverage_gcovr_html(
3439 NAME coverage
3540 EXECUTABLE ${CMAKE_CTEST_COMMAND}
Original file line number Diff line number Diff line change 1919#include < thread>
2020
2121#ifdef _WIN32
22+ #define NOMINMAX
2223#include < windows.h>
2324#elif defined (__APPLE__)
2425#include < sys/sysctl.h>
File renamed without changes.
Original file line number Diff line number Diff line change @@ -32,11 +32,11 @@ endfunction(mpi_test)
3232# --- test files
3333
3434add_executable (test_runner runner.f90
35- ${PROJECT_SOURCE_DIR} /benchmark/cpu_count.cpp
3635${PROJECT_SOURCE_DIR} /benchmark/partition.f90
3736${PROJECT_SOURCE_DIR} /benchmark/cli.f90
3837)
3938target_include_directories (test_runner PRIVATE ${PROJECT_SOURCE_DIR} /benchmark)
39+ target_link_libraries (test_runner PRIVATE cpu_count)
4040# not linked as libraries in case benchmarks aren't built
4141if (CMAKE_Fortran_COMPILER_ID MATCHES "^Intel" )
4242 set_property (TARGET test_runner PROPERTY LINKER_LANGUAGE Fortran)
You can’t perform that action at this time.
0 commit comments