1# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- 2# vim: set filetype=python: 3# This Source Code Form is subject to the terms of the Mozilla Public 4# License, v. 2.0. If a copy of the MPL was not distributed with this 5# file, You can obtain one at http://mozilla.org/MPL/2.0/. 6 7SOURCES += [ 8 'pkixbuild_tests.cpp', 9 'pkixcert_extension_tests.cpp', 10 'pkixcert_signature_algorithm_tests.cpp', 11 'pkixcheck_CheckExtendedKeyUsage_tests.cpp', 12 'pkixcheck_CheckIssuer_tests.cpp', 13 'pkixcheck_CheckKeyUsage_tests.cpp', 14 'pkixcheck_CheckSignatureAlgorithm_tests.cpp', 15 'pkixcheck_CheckValidity_tests.cpp', 16 'pkixcheck_ParseValidity_tests.cpp', 17 'pkixcheck_TLSFeaturesSatisfiedInternal_tests.cpp', 18 19 # The naming conventions are described in ./README.txt. 20 21 'pkixder_input_tests.cpp', 22 'pkixder_pki_types_tests.cpp', 23 'pkixder_universal_types_tests.cpp', 24 'pkixgtest.cpp', 25 'pkixnames_tests.cpp', 26 'pkixocsp_CreateEncodedOCSPRequest_tests.cpp', 27 'pkixocsp_VerifyEncodedOCSPResponse.cpp', 28] 29 30LOCAL_INCLUDES += [ 31 '../../include', 32 '../../lib', 33 '../lib', 34] 35 36FINAL_LIBRARY = 'xul-gtest' 37 38include('../../warnings.mozbuild') 39 40# GTest uses a variadic macro in a questionable way and it doesn't seem to be 41# possible to selectively disable just that error when -pedantic-errors is set. 42if CONFIG['CC_TYPE'] == 'gcc': 43 CXXFLAGS.remove('-pedantic-errors') 44 45# These warnings are disabled in order to minimize the amount of boilerplate 46# required to implement tests, and/or because they originate in the GTest 47# framework in a way we cannot otherwise work around. 48if CONFIG['CC_TYPE'] in ('clang', 'gcc'): 49 CXXFLAGS += [ 50 '-Wno-error=shadow', 51 '-Wno-old-style-cast', 52 ] 53 if CONFIG['CC_TYPE'] == 'clang': 54 CXXFLAGS += [ 55 '-Wno-exit-time-destructors', 56 '-Wno-global-constructors', 57 '-Wno-thread-safety', 58 '-Wno-used-but-marked-unused', 59 '-Wno-zero-as-null-pointer-constant', 60 ] 61elif CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'): 62 CXXFLAGS += [ 63 '-wd4350', # behavior change: 'std::_Wrap_alloc<std::allocator<_Ty>>::... 64 '-wd4275', # non dll-interface class used as base for dll-interface class 65 '-wd4548', # Expression before comma has no effect 66 '-wd4625', # copy constructor could not be generated. 67 '-wd4626', # assugment operator could not be generated. 68 '-wd4640', # construction of local static object is not thread safe. 69 70 # This is intended as a temporary hack to support building with VS2015. 71 # declaration of '*' hides class member 72 '-wd4458', 73 ] 74