File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -9,9 +9,14 @@ option(hdf5_parallel "build HDF5 parallel MPI")
9
9
option (zlib_legacy "use legacy zlib 1.x" )
10
10
11
11
# --- system checks
12
- if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT )
13
- message (FATAL_ERROR "please specify where to install HDF5 under, like
14
- cmake -B build -DCMAKE_INSTALL_PREFIX=~/hdf5" )
12
+ message (STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX} " )
13
+ file (MAKE_DIRECTORY ${CMAKE_INSTALL_PREFIX} )
14
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.29 )
15
+ if (NOT IS_WRITABLE ${CMAKE_INSTALL_PREFIX} )
16
+ message (FATAL_ERROR "CMAKE_INSTALL_PREFIX is not writable: ${CMAKE_INSTALL_PREFIX} " )
17
+ endif ()
18
+ else ()
19
+ file (TOUCH ${CMAKE_INSTALL_PREFIX} /.cmake_writable "" )
15
20
endif ()
16
21
17
22
if (hdf5_parallel )
You can’t perform that action at this time.
0 commit comments