In the CMAKe file the piece
if(EXISTS "/opt/local/bin/h5pcc")
set(CMAKE_CXX_COMPILER /opt/local/bin/h5pcc)
endif()
overwrites the CMAKE_CXX_COMPILER for a very specific installation. This is not the problem if CMAKE is called with the -DCMAKE_CXX_COMPILER=h5pcc directive but
the following code
if (CMAKE_CXX_COMPILER MATCHES "/opt/local/bin/h5pcc")
Message(STATUS "h5pcc compiler wrapper found - No additional libraries needed")
else()
causes that only installation at the location will be use the h5pcc flags. Since MATCHES uses regular expression it should be sufficient just to use
if (CMAKE_CXX_COMPILER MATCHES "h5pcc")
...
to allow other installation paths for h5pcc
In the CMAKe file the piece if(EXISTS "/opt/local/bin/h5pcc") set(CMAKE_CXX_COMPILER /opt/local/bin/h5pcc) endif() overwrites the CMAKE_CXX_COMPILER for a very specific installation. This is not the problem if CMAKE is called with the -DCMAKE_CXX_COMPILER=h5pcc directive but the following code if (CMAKE_CXX_COMPILER MATCHES "/opt/local/bin/h5pcc") Message(STATUS "h5pcc compiler wrapper found - No additional libraries needed") else()
causes that only installation at the location will be use the h5pcc flags. Since MATCHES uses regular expression it should be sufficient just to use if (CMAKE_CXX_COMPILER MATCHES "h5pcc") ... to allow other installation paths for h5pcc