| # Copyright 2014 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| assert(!is_ios) |
| |
| import("//testing/test.gni") |
| import("//third_party/WebKit/Source/config.gni") |
| |
| visibility = [ |
| "//mojo/public/cpp/bindings/*", |
| "//third_party/WebKit/*", |
| ] |
| |
| config("wtf_config") { |
| configs = [ "//third_party/WebKit/Source/platform/wtf:wtf_config" ] |
| } |
| |
| component("wtf") { |
| sources = [ |
| "ASCIICType.h", |
| "AddressSanitizer.h", |
| "Alignment.h", |
| "Allocator.h", |
| "Assertions.h", |
| "Atomics.h", |
| "AutoReset.h", |
| "BitVector.h", |
| "BitwiseOperations.h", |
| "BloomFilter.h", |
| "ByteOrder.h", |
| "ByteSwap.h", |
| "CPU.h", |
| "CheckedNumeric.h", |
| "Compiler.h", |
| "ConditionalDestructor.h", |
| "ContainerAnnotations.h", |
| "CryptographicallyRandomNumber.h", |
| "CurrentTime.h", |
| "DataLog.h", |
| "DateMath.h", |
| "Deque.h", |
| "Dummy.cpp", |
| "DoublyLinkedList.h", |
| "DynamicAnnotations.h", |
| "FilePrintStream.h", |
| "Forward.h", |
| "Functional.h", |
| "GetPtr.h", |
| "HashCountedSet.h", |
| "HashFunctions.h", |
| "HashIterators.h", |
| "HashMap.h", |
| "HashSet.h", |
| "HashTable.h", |
| "HashTableDeletedValueType.h", |
| "HashTraits.h", |
| "HexNumber.h", |
| "InstanceCounter.h", |
| "LeakAnnotations.h", |
| "ListHashSet.h", |
| "Locker.h", |
| "MathExtras.h", |
| "NonCopyingSort.h", |
| "Noncopyable.h", |
| "NotFound.h", |
| "Optional.h", |
| "PassRefPtr.h", |
| "PrintStream.h", |
| "PtrUtil.h", |
| "RefCounted.h", |
| "RefPtr.h", |
| "RefVector.h", |
| "RetainPtr.h", |
| "SaturatedArithmetic.h", |
| "SizeAssertions.h", |
| "SpinLock.h", |
| "StackUtil.h", |
| "StaticConstructors.h", |
| "StdLibExtras.h", |
| "StringExtras.h", |
| "StringHasher.h", |
| "TerminatedArray.h", |
| "TerminatedArrayBuilder.h", |
| "ThreadRestrictionVerifier.h", |
| "ThreadSafeRefCounted.h", |
| "ThreadSpecific.h", |
| "Threading.h", |
| "ThreadingPrimitives.h", |
| "Time.h", |
| "TreeNode.h", |
| "TypeTraits.h", |
| "Vector.h", |
| "VectorTraits.h", |
| "WTF.h", |
| "WTFExport.h", |
| "WTFThreadData.h", |
| "WeakPtr.h", |
| "allocator/PartitionAllocator.h", |
| "allocator/Partitions.h", |
| "build_config.h", |
| "debug/Alias.h", |
| "debug/CrashLogging.h", |
| "dtoa.h", |
| "dtoa/bignum-dtoa.h", |
| "dtoa/bignum.h", |
| "dtoa/cached-powers.h", |
| "dtoa/diy-fp.h", |
| "dtoa/double-conversion.h", |
| "dtoa/double.h", |
| "dtoa/fast-dtoa.h", |
| "dtoa/fixed-dtoa.h", |
| "dtoa/strtod.h", |
| "dtoa/utils.h", |
| "text/ASCIIFastPath.h", |
| "text/AtomicString.h", |
| "text/AtomicStringHash.h", |
| "text/AtomicStringTable.h", |
| "text/Base64.h", |
| "text/CString.h", |
| "text/CharacterNames.h", |
| "text/Collator.h", |
| "text/IntegerToStringConversion.h", |
| "text/ParsingUtilities.h", |
| "text/StringBuffer.h", |
| "text/StringBuilder.h", |
| "text/StringConcatenate.h", |
| "text/StringHash.h", |
| "text/StringImpl.h", |
| "text/StringOperators.h", |
| "text/StringToNumber.h", |
| "text/StringUTF8Adaptor.h", |
| "text/StringView.h", |
| "text/TextCodec.h", |
| "text/TextCodecASCIIFastPath.h", |
| "text/TextCodecLatin1.h", |
| "text/TextCodecReplacement.h", |
| "text/TextCodecUTF16.h", |
| "text/TextCodecUTF8.h", |
| "text/TextCodecUserDefined.h", |
| "text/TextEncoding.h", |
| "text/TextEncodingRegistry.h", |
| "text/TextPosition.h", |
| "text/UTF8.h", |
| "text/Unicode.h", |
| "text/WTFString.h", |
| "text/icu/UnicodeIcu.h", |
| "typed_arrays/ArrayBuffer.h", |
| "typed_arrays/ArrayBufferBuilder.h", |
| "typed_arrays/ArrayBufferContents.h", |
| "typed_arrays/ArrayBufferView.h", |
| "typed_arrays/ArrayPiece.h", |
| "typed_arrays/Float32Array.h", |
| "typed_arrays/Float64Array.h", |
| "typed_arrays/Int16Array.h", |
| "typed_arrays/Int32Array.h", |
| "typed_arrays/Int8Array.h", |
| "typed_arrays/IntegralTypedArrayBase.h", |
| "typed_arrays/TypedArrayBase.h", |
| "typed_arrays/Uint16Array.h", |
| "typed_arrays/Uint32Array.h", |
| "typed_arrays/Uint8Array.h", |
| "typed_arrays/Uint8ClampedArray.h", |
| ] |
| |
| configs += [ |
| "//third_party/WebKit/Source:config", |
| "//third_party/WebKit/Source:non_test_config", |
| "//third_party/WebKit/Source:blink_pch", |
| ] |
| |
| defines = [ "WTF_IMPLEMENTATION=1" ] |
| |
| public_configs = [ |
| ":wtf_config", |
| |
| # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| "//build/config/compiler:no_size_t_to_int_warning", |
| "//third_party/WebKit/Source:features", |
| ] |
| |
| public_deps = [ |
| "//base", |
| "//third_party/WebKit/Source/platform/wtf:platform_wtf", |
| "//third_party/icu", |
| ] |
| |
| if (is_android) { |
| libs = [ "log" ] |
| } |
| if (is_linux) { |
| libs = [ "dl" ] |
| } |
| |
| if (is_mac) { |
| libs = [ |
| "CoreFoundation.framework", |
| "Foundation.framework", |
| ] |
| } |
| |
| if (remove_webcore_debug_symbols) { |
| configs -= [ "//build/config/compiler:default_symbols" ] |
| configs += [ "//build/config/compiler:no_symbols" ] |
| } |
| } |
| |
| test("wtf_unittests") { |
| visibility = [] # Allow re-assignment of list. |
| visibility = [ "*" ] |
| |
| sources = [ |
| "ASCIICTypeTest.cpp", |
| "AssertionsTest.cpp", |
| "DequeTest.cpp", |
| "FunctionalTest.cpp", |
| "HashMapTest.cpp", |
| "HashSetTest.cpp", |
| "ListHashSetTest.cpp", |
| "MathExtrasTest.cpp", |
| "OptionalTest.cpp", |
| "PassRefPtrTest.cpp", |
| "RefPtrTest.cpp", |
| "StringExtrasTest.cpp", |
| "StringHasherTest.cpp", |
| "TimeTest.cpp", |
| "TreeNodeTest.cpp", |
| "TypeTraitsTest.cpp", |
| "VectorTest.cpp", |
| "dtoa_test.cpp", |
| "testing/RunAllTests.cpp", |
| "text/AtomicStringTest.cpp", |
| "text/CStringTest.cpp", |
| "text/IntegerToStringConversionTest.cpp", |
| "text/StringBufferTest.cpp", |
| "text/StringBuilderTest.cpp", |
| "text/StringImplTest.cpp", |
| "text/StringOperatorsTest.cpp", |
| "text/StringToNumberTest.cpp", |
| "text/StringViewTest.cpp", |
| "text/TextCodecICUTest.cpp", |
| "text/TextCodecLatin1Test.cpp", |
| "text/TextCodecReplacementTest.cpp", |
| "text/TextCodecTest.cpp", |
| "text/TextCodecUTF8Test.cpp", |
| "text/TextCodecUserDefinedTest.cpp", |
| "text/TextEncodingTest.cpp", |
| "text/WTFStringTest.cpp", |
| "typed_arrays/ArrayBufferBuilderTest.cpp", |
| ] |
| |
| # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| |
| if (is_win) { |
| cflags = [ "/wd4068" ] # Unknown pragma. |
| } |
| |
| configs += [ |
| "//third_party/WebKit/Source:config", |
| "//third_party/WebKit/Source:blink_pch", |
| ] |
| |
| deps = [ |
| ":wtf", |
| "//base", |
| "//base/test:test_support", |
| "//testing/gmock", |
| "//testing/gtest", |
| ] |
| } |