diff --git a/CMakeLists.txt b/CMakeLists.txt index b585a0b6de9..fb0bd18da6e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1204,7 +1204,7 @@ configure_file (${HDF_RESOURCES_DIR}/H5pubconf.h.in ${HDF5_SRC_BINARY_DIR}/H5pub #----------------------------------------------------------------------------- if (EXISTS "${HDF5_SOURCE_DIR}/HDF5Examples" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/HDF5Examples") option (HDF5_BUILD_EXAMPLES "Build HDF5 Library Examples" ON) - if (HDF5_BUILD_EXAMPLES) + if (HDF5_BUILD_EXAMPLES AND NOT USE_SANITIZER) include (${HDF_RESOURCES_DIR}/HDF5ExampleCache.cmake) set (HDF5_VERSION ${HDF5_PACKAGE_VERSION}) add_subdirectory (HDF5Examples)