# Can h4fc and h5pfc be built with CMake?

**URL:** <https://forum.hdfgroup.org/t/can-h4fc-and-h5pfc-be-built-with-cmake/8825>\
**Category:** HDF5 Library\
**Created:** [August 4, 2021, 5:43pm UTC](https://forum.hdfgroup.org/t/can-h4fc-and-h5pfc-be-built-with-cmake/8825 "2021-08-04T17:43:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthew.thompson](https://forum.hdfgroup.org/user_avatar/forum.hdfgroup.org/matthew.thompson/32/1745_2.png) [@matthew.thompson](https://forum.hdfgroup.org/u/matthew.thompson)\
**Post date:** [August 4, 2021, 5:43pm UTC](https://forum.hdfgroup.org/t/can-h4fc-and-h5pfc-be-built-with-cmake/8825/1 "2021-08-04T17:43:25Z")

</div>

I made a [GitHub issue about this](https://github.com/HDFGroup/hdf4/issues/4) but I thought I’d ask here. Namely, can you ever get `h4fc` from the CMake build of hdf4? I see [some CMake code for `h4cc`](https://github.com/HDFGroup/hdf4/blob/master/mfhdf/libsrc/CMakeLists.txt):

```auto
if (NOT WIN32)
  set (_PKG_CONFIG_COMPILER ${CMAKE_C_COMPILER})
  configure_file (
      ${HDF_RESOURCES_DIR}/libh4cc.in
      ${HDF4_BINARY_DIR}/CMakeFiles/h4cc
      @ONLY
  )
  install (
      FILES ${HDF4_BINARY_DIR}/CMakeFiles/h4cc
      DESTINATION ${HDF4_INSTALL_BIN_DIR}
      PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
      COMPONENT libraries
  )
endif ()

```

but none for `h4fc`. Is there some flag I’m not passing to CMake? I do get, say, `libmfhdf_fortran.a` in my install dir, so I think I’ve enabled Fortran support.

---

<div class="post-metadata">

**Author:** ![matthew.thompson](https://forum.hdfgroup.org/user_avatar/forum.hdfgroup.org/matthew.thompson/32/1745_2.png) [@matthew.thompson](https://forum.hdfgroup.org/u/matthew.thompson)\
**Post date:** [August 5, 2021, 6:01pm UTC](https://forum.hdfgroup.org/t/can-h4fc-and-h5pfc-be-built-with-cmake/8825/2 "2021-08-05T18:01:41Z")

</div>

More info. I tried building HDF5 with CMake and even after moving up to `develop`, I find I can’t build `h5pfc`. I do see `h5fc` and `h5pcc` but the parallel Fortran wrapper is not-to-be-found. ☹

---

<div class="post-metadata">

**Author:** ![byrn](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/b/85f322/32.png) [@byrn](https://forum.hdfgroup.org/u/byrn)\
**Post date:** [August 5, 2021, 6:13pm UTC](https://forum.hdfgroup.org/t/can-h4fc-and-h5pfc-be-built-with-cmake/8825/3 "2021-08-05T18:13:19Z")

</div>

there is no need for a parallel version, because h5fc will use the same compiler as used to build the library.

---

<div class="post-metadata">

**Author:** ![matthew.thompson](https://forum.hdfgroup.org/user_avatar/forum.hdfgroup.org/matthew.thompson/32/1745_2.png) [@matthew.thompson](https://forum.hdfgroup.org/u/matthew.thompson)\
**Post date:** [August 5, 2021, 6:19pm UTC](https://forum.hdfgroup.org/t/can-h4fc-and-h5pfc-be-built-with-cmake/8825/4 "2021-08-05T18:19:27Z")

</div>

Interesting. But `h5cc`/`h5pcc` does not do that?

---

<div class="post-metadata">

**Author:** ![byrn](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/b/85f322/32.png) [@byrn](https://forum.hdfgroup.org/u/byrn)\
**Post date:** [August 5, 2021, 6:21pm UTC](https://forum.hdfgroup.org/t/can-h4fc-and-h5pfc-be-built-with-cmake/8825/5 "2021-08-05T18:21:55Z")

</div>

Actually they are the same, but because of legacy usage, we created a second version. I suppose if it is needed we can do the same for h5fc. A bit redundant though.

Allen
