REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4683 Update MSFT CC_FLAGS for host-based unit tests to use /EHs instead of /EHsc to support building C functions with SEH (Structured Exception Handling) enabled. This is required to build UnitTestDebugAssertLibHost.inf. Update GCC CC_FLAGS for host-based unit tests to use -fexceptions to support catching exceptions. Update GoogleTestLib.h to include Throws() APIs that enable unit tests to use EXPECT_THAT() to check for expected ASSERT() conditions for a specific ASSERT() expression. Update GCC CC_FLAGS to add --coverage for host-based builds for all GCC tool chains. Cc: Michael Kubacki <mikuback@linux.microsoft.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com>
34 lines
980 B
INI
34 lines
980 B
INI
## @file
|
|
# This module provides GoogleTest Library implementation.
|
|
#
|
|
# Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
#
|
|
##
|
|
|
|
[Defines]
|
|
INF_VERSION = 0x00010018
|
|
BASE_NAME = GoogleTestLib
|
|
MODULE_UNI_FILE = GoogleTestLib.uni
|
|
FILE_GUID = A90E4751-AD30-43CC-980B-01E356B49ADF
|
|
MODULE_TYPE = HOST_APPLICATION
|
|
VERSION_STRING = 0.1
|
|
LIBRARY_CLASS = GoogleTestLib
|
|
|
|
#
|
|
# VALID_ARCHITECTURES = IA32 X64
|
|
#
|
|
|
|
[Sources]
|
|
googletest/googletest/src/gtest-all.cc
|
|
googletest/googlemock/src/gmock-all.cc
|
|
|
|
[Packages]
|
|
MdePkg/MdePkg.dec
|
|
UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
|
|
|
|
[BuildOptions]
|
|
MSFT:*_*_*_CC_FLAGS == /c /EHs /Zi /Od /MT
|
|
GCC:*_*_IA32_CC_FLAGS == -g -c -fshort-wchar -fexceptions -O0 -m32 -malign-double -fno-pie
|
|
GCC:*_*_X64_CC_FLAGS == -g -c -fshort-wchar -fexceptions -O0 -m64 -fno-pie "-DEFIAPI=__attribute__((ms_abi))"
|