Skip to content

Commit 7a2ca45

Browse files
committed
avoid FetchContent race
1 parent e1004d2 commit 7a2ca45

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ set_property(TARGET h5fortran PROPERTY VERSION ${PROJECT_VERSION})
6666
# GLOBAL needed for use by FetchContent
6767
add_library(h5fortran::h5fortran INTERFACE IMPORTED GLOBAL)
6868
target_link_libraries(h5fortran::h5fortran INTERFACE h5fortran)
69+
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include)
70+
# avoid race condition when used by FetchContent
6971

7072
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/include/h5fortran.mod DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
7173

0 commit comments

Comments
 (0)