Skip to content

Commit

Permalink
CMake - Match Autotools behavior for library instrumentation (#2648) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jhendersonHDF authored Apr 8, 2023
1 parent bc2517b commit de9fab1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -647,9 +647,15 @@ option (HDF5_BUILD_GENERATORS "Build Test Generators" OFF)
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_TRACE "Enable API tracing capability" OFF)
mark_as_advanced (HDF5_ENABLE_TRACE)
if (${HDF_CFG_NAME} MATCHES "Debug")
if (${HDF_CFG_NAME} MATCHES "Debug" OR ${HDF_CFG_NAME} MATCHES "Developer")
# Enable instrumenting of the library's internal operations
option (HDF5_ENABLE_INSTRUMENT "Instrument The library" OFF)

# Instrumenting is enabled by default for parallel debug builds
if (HDF5_ENABLE_PARALLEL)
set (HDF5_ENABLE_INSTRUMENT ON CACHE BOOL "Instrument The library" FORCE)
endif ()

if (HDF5_ENABLE_INSTRUMENT)
set (H5_HAVE_INSTRUMENTED_LIBRARY 1)
endif ()
Expand Down
9 changes: 8 additions & 1 deletion release_docs/RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,15 @@ New Features

Configuration:
-------------
-
- Enabled instrumentation of the library by default in CMake for parallel
debug builds

HDF5 can be configured to instrument portions of the parallel library to
aid in debugging. Autotools builds of HDF5 turn this capability on by
default for parallel debug builds and off by default for other build types.
CMake has been updated to match this behavior.

(JTH - 2023/03/29)

Library:
--------
Expand Down

0 comments on commit de9fab1

Please sign in to comment.