Skip to content

Commit f146cf4

Browse files
committed
setup
1 parent 1069a49 commit f146cf4

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

.gitignore

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
app/
2-
.cache/
3-
kind.txt
4-
cmake_install.cmake
1+
bin/
2+
.cache
53

64
*.pyd
75
__pycache__/

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ matrix:
2424
- brew install hdf5 > /dev/null
2525

2626
install:
27-
- cd app
28-
- cmake ../src
27+
- cd bin
28+
- cmake ..
2929
- cmake --build .
3030

3131
script: ctest --output-on-failure

cmake/hdf5.cmake

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
find_package(HDF5 REQUIRED COMPONENTS Fortran Fortran_HL)
2+
3+
set(CMAKE_REQUIRED_INCLUDES ${HDF5_INCLUDE_DIRS} ${HDF5_Fortran_INCLUDE_DIRS})
4+
set(CMAKE_REQUIRED_LIBRARIES ${HDF5_Fortran_LIBRARIES} ${HDF5_Fortran_HL_LIBRARIES})
5+
check_fortran_source_compiles("
6+
program a
7+
use h5lt
8+
end"
9+
hasHDF5
10+
SRC_EXT f90)
11+
12+
if(NOT hasHDF5)
13+
message(FATAL_ERROR "HDF5 library not working with ${CMAKE_Fortran_COMPILER_ID} ${CMAKE_Fortran_COMPILER_VERSION}")
14+
endif()

0 commit comments

Comments
 (0)