Skip to content

Commit b2ffa94

Browse files
committed
option -Dh5fortran_find
1 parent f757c81 commit b2ffa94

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ include(options.cmake)
3838
include(cmake/compilers.cmake)
3939
include(cmake/CheckHDF5.cmake)
4040

41-
if(NOT TARGET HDF5::HDF5 AND (find OR CRAY))
41+
if(NOT TARGET HDF5::HDF5 AND (h5fortran_find OR CRAY))
4242
find_package(HDF5 COMPONENTS Fortran)
4343
endif()
4444

@@ -82,11 +82,11 @@ file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include)
8282

8383
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/include/h5fortran.mod DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
8484

85-
install(TARGETS h5fortran EXPORT ${PROJECT_NAME}-targets)
85+
install(TARGETS h5fortran EXPORT h5fortran-targets)
8686

8787
add_subdirectory(src)
8888

89-
if(${PROJECT_NAME}_BUILD_TESTING)
89+
if(h5fortran_BUILD_TESTING)
9090
add_subdirectory(test)
9191
endif()
9292

cmake/pkgconf.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set(pc_requires "hdf5 >= 1.8.7")
44

5-
set(pc_filename ${PROJECT_NAME}.pc)
5+
set(pc_filename h5fortran.pc)
66
configure_file(${CMAKE_CURRENT_LIST_DIR}/pkgconf.pc.in ${pc_filename} @ONLY)
77

88
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${pc_filename} DESTINATION pkgconfig)

options.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ message(STATUS "${PROJECT_NAME} ${PROJECT_VERSION} CMake ${CMAKE_VERSION} Toolch
22

33
include(GNUInstallDirs)
44

5-
option(find "try to find libraries" on)
5+
option(h5fortran_find "try to find libraries" on)
66

77
option(h5fortran_COVERAGE "Code coverage tests")
88
option(tidy "Run clang-tidy on the code")

test/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ set_property(TEST deflate_write PROPERTY FIXTURES_SETUP deflate_files)
7979
set_property(TEST deflate_props deflate_read PROPERTY FIXTURES_REQUIRED deflate_files)
8080
set_property(TEST deflate_props deflate_read PROPERTY REQUIRED_FILES ${CMAKE_CURRENT_BINARY_DIR}/deflate1.h5)
8181

82-
if(${PROJECT_NAME}_COVERAGE)
82+
if(h5fortran_COVERAGE)
8383
setup_target_for_coverage_gcovr_html(
8484
NAME coverage
8585
EXECUTABLE ${CMAKE_CTEST_COMMAND}

0 commit comments

Comments
 (0)