Building HDF5 with Cmake on MacOS

I am trying to build the HDF5 library on my MacOS Big Sur 11.4. I have been following instructions as in: https://portal.hdfgroup.org/display/support/Building+HDF5+with+CMake
And used the following options in HDF5options.cmake file:

  1. Parallel option:
    set(ADD_BUILD_OPTIONS “${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PARALLEL:BOOL=ON”)
    set(ADD_BUILD_OPTIONS “${ADD_BUILD_OPTIONS} -DMPIEXEC_MAX_NUMPROCS:STRING=4”)

  2. set(CTEST_BUILD_CONFIGURATION “Release”)
    Then I run build-unix.sh file and it outputs the following failed configuration:

    CMake Error at CMakeLists.txt:996 (message):
    **** Parallel and C++ options are mutually exclusive, override with ALLOW_UNSUPPORTED option ****

    – Configuring incomplete, errors occurred!
    See also “/Users/macbookpro/hdf5cmake/CMake-hdf5-1.10.7/build/CMakeFiles/CMakeOutput.log”.
    See also “/Users/macbookpro/hdf5cmake/CMake-hdf5-1.10.7/build/CMakeFiles/CMakeError.log”.
    Command exited with the value: 1
    Error(s) when configuring the project
    SetCTestConfiguration:BuildDirectory:/Users/macbookpro/hdf5cmake/CMake-hdf5-1.10.7/build
    SetCTestConfiguration:SourceDirectory:/Users/macbookpro/hdf5cmake/CMake-hdf5-1.10.7/hdf5-1.10.7
    SetMakeCommand:/usr/local/Cellar/cmake/3.20.5/bin/cmake --build . --config “Release” – -j8
    SetCTestConfiguration:MakeCommand:/usr/local/Cellar/cmake/3.20.5/bin/cmake --build . --config “Release” – -j8
    SetCTestConfiguration:UseLaunchers:1
    Build project
    MakeCommand:/usr/local/Cellar/cmake/3.20.5/bin/cmake --build . --config “Release” – -j8
    Run command: “/usr/local/Cellar/cmake/3.20.5/bin/cmake” “–build” “.” “–config” “Release” “–” “-j8”
    gmake: Makefile: No such file or directory
    gmake: *** No rule to make target ‘Makefile’. Stop.
    Command exited with the value: 2
    MakeCommand:/usr/local/Cellar/cmake/3.20.5/bin/cmake --build . --config “Release” – -j8
    Error(s) when building project
    1 Compiler errors
    0 Compiler warnings
    SetCTestConfiguration:BuildDirectory:/Users/macbookpro/hdf5cmake/CMake-hdf5-1.10.7/build
    SetCTestConfiguration:SourceDirectory:/Users/macbookpro/hdf5cmake/CMake-hdf5-1.10.7/hdf5-1.10.7
    Test project /Users/macbookpro/hdf5cmake/CMake-hdf5-1.10.7/build
    Constructing a list of tests
    Updating test list for fixtures
    Added 0 tests to meet fixture requirements
    Checking test dependency graph…
    Checking test dependency graph end
    No tests were found!!!

I cannot attach error and output log files, so I am linking them here: https://drive.google.com/drive/folders/1OmPMiSiE5tCMw661I4GAtEm_DemeLs5u?usp=sharing. This is my first time downloading anything of this sort, so I would really appreciate some advice/help. Thanks!

This is the main issue, either turn off CPP
set (ADD_BUILD_OPTIONS “${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF”)
or enable ALLOW_UNSUPPORTED
set (ADD_BUILD_OPTIONS “${ADD_BUILD_OPTIONS} -DALLOW_UNSUPPORTED:BOOL=ON”)

Note also, that sometimes CMake will need the ENV VARS set for the mpi wrappers CC=path/mpicc