summaryrefslogtreecommitdiffstats
path: root/bin/cmakehdf5
diff options
context:
space:
mode:
authormattjala <124107509+mattjala@users.noreply.github.com>2023-06-15 17:20:10 (GMT)
committerGitHub <noreply@github.com>2023-06-15 17:20:10 (GMT)
commit966d7e1055e95cb63903489c0ef99ac0384e033b (patch)
tree2f0607af0a28918d63965350dd4e86ffd6c2aa2c /bin/cmakehdf5
parentfcdd0ab9dc93871fa600aface194b294947fad1b (diff)
downloadhdf5-966d7e1055e95cb63903489c0ef99ac0384e033b.zip
hdf5-966d7e1055e95cb63903489c0ef99ac0384e033b.tar.gz
hdf5-966d7e1055e95cb63903489c0ef99ac0384e033b.tar.bz2
Add java options to build scripts (#3127)
* Add java options to build scripts Previously, cmakehdf5 turned on compiling of the java interface by default due to a value set in cacheinit.cmake. Now, consistent with how Fortran and CPP interfaces are handled, the script overwrites this default value to disable the libraries, fixing #2958. I also implemented the --enable-java/--disable java options for cmakehdf5, and -java for buildhdf5. Allen said these scripts should mention that compilers are to be specified in environment variables, but missing compilers causes errors at the CMake level, and CMake's error messages are already pretty informative (See the one in #2958 about JAVA_COMPILER).
Diffstat (limited to 'bin/cmakehdf5')
-rwxr-xr-xbin/cmakehdf511
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/cmakehdf5 b/bin/cmakehdf5
index e59c772..f17b9c4 100755
--- a/bin/cmakehdf5
+++ b/bin/cmakehdf5
@@ -45,6 +45,7 @@ fi
cacheinit=$srcdir/config/cmake/cacheinit.cmake
build_cpp_lib=-DHDF5_BUILD_CPP_LIB:BOOL=OFF # C++ interface default off
build_fortran=-DHDF5_BUILD_FORTRAN:BOOL=OFF # Fortran interface default off
+build_java=-DHDF5_BUILD_JAVA:BOOL=OFF # Java interface default off
build_hl_lib=-DHDF5_BUILD_HL_LIB:BOOL=ON # High Level interface default on
build_threadsafe=-DHDF5_ENABLE_THREADSAFE:BOOL=OFF # Threadsafe feature default off
build_testing=-DBUILD_TESTING:BOOL=ON # Build tests default on
@@ -82,6 +83,8 @@ Usage: $progname [<options>]
enable or disable fortran API. Default is off.
--enable-cxx | --disable-cxx:
enable or disable c++ API. Default is off.
+ --enable-java | --disable-java:
+ enable or disable Java API. Default is off.
--enable-hl | --disable-hl:
enable or disable high level API. Default is on.
--enable-threadsafe | --disable-threadsafe:
@@ -210,6 +213,7 @@ fi
# XXX can be:
# fortran Fortran interface
# cxx C++ interface
+# java Java interface
# hl Highlevel interface
# testing Build tests
# tools Build tools
@@ -227,6 +231,12 @@ while [ $# -gt 0 ]; do
--disable-cxx)
build_cpp_lib=-DHDF5_BUILD_CPP_LIB:BOOL=OFF
;;
+ --enable-java)
+ build_java=-DHDF5_BUILD_JAVA:BOOL=ON
+ ;;
+ --disable-java)
+ build_java=-DHDF5_BUILD_JAVA:BOOL=OFF
+ ;;
--enable-hl)
build_hl_lib=-DHDF5_BUILD_HL_LIB:BOOL=ON
;;
@@ -345,6 +355,7 @@ STEP "Configure..." \
-C $cacheinit \
$build_cpp_lib \
$build_fortran \
+ $build_java \
$build_hl_lib \
$build_threadsafe \
$shared_lib \