summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2023-04-13 16:17:27 (GMT)
committerGitHub <noreply@github.com>2023-04-13 16:17:27 (GMT)
commit9fff85d7e63d58a49dc6031b64bf965ab8f426b9 (patch)
tree3ad77bbf6306964eb88f9811a603dca7a549e405 /CMakeLists.txt
parent5b4df7b2cd08bdef177ee092d7e57097f8dc96f8 (diff)
downloadhdf5-9fff85d7e63d58a49dc6031b64bf965ab8f426b9.zip
hdf5-9fff85d7e63d58a49dc6031b64bf965ab8f426b9.tar.gz
hdf5-9fff85d7e63d58a49dc6031b64bf965ab8f426b9.tar.bz2
CMake - Match Autotools behavior for library instrumentation (#2648) (#2674)
Enable library instrumentation by default for parallel debug builds
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c418f34..69f891d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -611,9 +611,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 ()