From 0c6d851d258bac2df1e21e2670e8baca1bb37771 Mon Sep 17 00:00:00 2001 From: Chris Johnson Date: Wed, 21 Dec 2022 11:56:07 -0800 Subject: UnitTestFrameworkPkg: Add subhook submodule required for gmock REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4389 Add subhook submodule that is required to hook internal functions when using gmock. https://github.com/Zeex/subhook Add SubhookLib library class and SubhookLib library instance. Include the SUBHOOK_STATIC define in the SubhookLib INF file so it builds as a static library. Also include the SUBHOOK_STATIC define in SubhookLib.h so all modules using SubhookLib properly link SubhookLib as a static library. Cc: Andrew Fish Cc: Leif Lindholm Cc: Michael D Kinney Cc: Michael Kubacki Cc: Sean Brogan Signed-off-by: Chris Johnson Reviewed-by: Leif Lindholm Reviewed-by: Michael Kubacki Reviewed-by: Oliver Smith-Denny Reviewed-by: Michael D Kinney --- UnitTestFrameworkPkg/Include/Library/SubhookLib.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 UnitTestFrameworkPkg/Include/Library/SubhookLib.h (limited to 'UnitTestFrameworkPkg/Include') diff --git a/UnitTestFrameworkPkg/Include/Library/SubhookLib.h b/UnitTestFrameworkPkg/Include/Library/SubhookLib.h new file mode 100644 index 0000000000..46783adfcc --- /dev/null +++ b/UnitTestFrameworkPkg/Include/Library/SubhookLib.h @@ -0,0 +1,15 @@ +/** @file + SubhookLib class with APIs from the subhook project + + Copyright (c) 2022, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef SUBHOOK_LIB_H_ +#define SUBHOOK_LIB_H_ + +#define SUBHOOK_STATIC +#include + +#endif -- cgit v1.2.3