OLD | NEW |
1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
2 # | 2 # |
3 # Use of this source code is governed by a BSD-style license | 3 # Use of this source code is governed by a BSD-style license |
4 # that can be found in the LICENSE file in the root of the source | 4 # that can be found in the LICENSE file in the root of the source |
5 # tree. An additional intellectual property rights grant can be found | 5 # tree. An additional intellectual property rights grant can be found |
6 # in the file PATENTS. All contributing project authors may | 6 # in the file PATENTS. All contributing project authors may |
7 # be found in the AUTHORS file in the root of the source tree. | 7 # be found in the AUTHORS file in the root of the source tree. |
8 | 8 |
9 import("//build/config/crypto.gni") | 9 import("//build/config/crypto.gni") |
10 import("//build/config/ui.gni") | 10 import("//build/config/ui.gni") |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 ] | 85 ] |
86 if (rtc_enable_protobuf) { | 86 if (rtc_enable_protobuf) { |
87 public_deps = [ | 87 public_deps = [ |
88 "//third_party/protobuf:protobuf_lite", | 88 "//third_party/protobuf:protobuf_lite", |
89 ] | 89 ] |
90 } | 90 } |
91 } | 91 } |
92 | 92 |
93 # The subset of rtc_base approved for use outside of libjingle. | 93 # The subset of rtc_base approved for use outside of libjingle. |
94 rtc_static_library("rtc_base_approved") { | 94 rtc_static_library("rtc_base_approved") { |
| 95 # TODO(kjellander): Remove (bugs.webrtc.org/7480) |
| 96 # Enabling GN check triggers a cyclic dependency caused by rate_limiter.cc: |
| 97 # :rtc_base_approved -> //webrtc/system_wrappers -> :rtc_base_approved |
| 98 check_includes = false |
95 defines = [] | 99 defines = [] |
96 libs = [] | 100 libs = [] |
97 deps = [] | 101 deps = [] |
98 all_dependent_configs = [ ":rtc_base_approved_all_dependent_config" ] | 102 all_dependent_configs = [ ":rtc_base_approved_all_dependent_config" ] |
99 | 103 |
100 sources = [ | 104 sources = [ |
101 "array_view.h", | 105 "array_view.h", |
102 "arraysize.h", | 106 "arraysize.h", |
103 "atomicops.h", | 107 "atomicops.h", |
104 "base64.cc", | 108 "base64.cc", |
(...skipping 24 matching lines...) Expand all Loading... |
129 "file.h", | 133 "file.h", |
130 "flags.cc", | 134 "flags.cc", |
131 "flags.h", | 135 "flags.h", |
132 "format_macros.h", | 136 "format_macros.h", |
133 "function_view.h", | 137 "function_view.h", |
134 "ignore_wundef.h", | 138 "ignore_wundef.h", |
135 "location.cc", | 139 "location.cc", |
136 "location.h", | 140 "location.h", |
137 "md5.cc", | 141 "md5.cc", |
138 "md5.h", | 142 "md5.h", |
139 "md5digest.cc", | |
140 "md5digest.h", | |
141 "mod_ops.h", | 143 "mod_ops.h", |
142 "onetimeevent.h", | 144 "onetimeevent.h", |
143 "optional.cc", | 145 "optional.cc", |
144 "optional.h", | 146 "optional.h", |
145 "pathutils.cc", | 147 "pathutils.cc", |
146 "pathutils.h", | 148 "pathutils.h", |
147 "platform_file.cc", | 149 "platform_file.cc", |
148 "platform_file.h", | 150 "platform_file.h", |
149 "platform_thread.cc", | 151 "platform_thread.cc", |
150 "platform_thread.h", | 152 "platform_thread.h", |
(...skipping 14 matching lines...) Expand all Loading... |
165 "safe_compare.h", | 167 "safe_compare.h", |
166 "safe_conversions.h", | 168 "safe_conversions.h", |
167 "safe_conversions_impl.h", | 169 "safe_conversions_impl.h", |
168 "safe_minmax.h", | 170 "safe_minmax.h", |
169 "sanitizer.h", | 171 "sanitizer.h", |
170 "scoped_ref_ptr.h", | 172 "scoped_ref_ptr.h", |
171 "string_to_number.cc", | 173 "string_to_number.cc", |
172 "string_to_number.h", | 174 "string_to_number.h", |
173 "stringencode.cc", | 175 "stringencode.cc", |
174 "stringencode.h", | 176 "stringencode.h", |
| 177 "stringize_macros.h", |
175 "stringutils.cc", | 178 "stringutils.cc", |
176 "stringutils.h", | 179 "stringutils.h", |
177 "swap_queue.h", | 180 "swap_queue.h", |
178 "template_util.h", | 181 "template_util.h", |
179 "thread_annotations.h", | 182 "thread_annotations.h", |
180 "thread_checker.h", | 183 "thread_checker.h", |
181 "thread_checker_impl.cc", | 184 "thread_checker_impl.cc", |
182 "thread_checker_impl.h", | 185 "thread_checker_impl.h", |
183 "timestampaligner.cc", | 186 "timestampaligner.cc", |
184 "timestampaligner.h", | 187 "timestampaligner.h", |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 651 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
649 } | 652 } |
650 } | 653 } |
651 | 654 |
652 rtc_source_set("gtest_prod") { | 655 rtc_source_set("gtest_prod") { |
653 sources = [ | 656 sources = [ |
654 "gtest_prod_util.h", | 657 "gtest_prod_util.h", |
655 ] | 658 ] |
656 } | 659 } |
657 | 660 |
| 661 config("rtc_base_tests_utils_exported_config") { |
| 662 defines = [ "GTEST_RELATIVE_PATH" ] |
| 663 } |
| 664 |
| 665 config("rtc_base_tests_utils_warnings_config") { |
| 666 if (is_win && is_clang) { |
| 667 cflags = [ |
| 668 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6270 |
| 669 "-Wno-reorder", |
| 670 "-Wno-sign-compare", |
| 671 ] |
| 672 } |
| 673 } |
| 674 |
| 675 rtc_source_set("rtc_base_tests_utils") { |
| 676 testonly = true |
| 677 sources = [ |
| 678 # Also use this as a convenient dumping ground for misc files that are |
| 679 # included by multiple targets below. |
| 680 "cpu_time.cc", |
| 681 "cpu_time.h", |
| 682 "fakeclock.cc", |
| 683 "fakeclock.h", |
| 684 "fakenetwork.h", |
| 685 "fakesslidentity.h", |
| 686 "firewallsocketserver.cc", |
| 687 "firewallsocketserver.h", |
| 688 "gunit.h", |
| 689 "httpserver.cc", |
| 690 "httpserver.h", |
| 691 "md5digest.cc", |
| 692 "md5digest.h", |
| 693 "memory_usage.cc", |
| 694 "memory_usage.h", |
| 695 "natserver.cc", |
| 696 "natserver.h", |
| 697 "natsocketfactory.cc", |
| 698 "natsocketfactory.h", |
| 699 "nattypes.cc", |
| 700 "nattypes.h", |
| 701 "proxyserver.cc", |
| 702 "proxyserver.h", |
| 703 "sigslottester.h", |
| 704 "sigslottester.h.pump", |
| 705 "testbase64.h", |
| 706 "testechoserver.h", |
| 707 "testutils.h", |
| 708 "timedelta.h", |
| 709 ] |
| 710 configs += [ ":rtc_base_tests_utils_warnings_config" ] |
| 711 public_configs = [ ":rtc_base_tests_utils_exported_config" ] |
| 712 deps = [ |
| 713 ":rtc_base", |
| 714 "../test:field_trial", |
| 715 "../test:test_support", |
| 716 ] |
| 717 public_deps = [ |
| 718 "//testing/gmock", |
| 719 "//testing/gtest", |
| 720 ] |
| 721 |
| 722 if (!build_with_chromium && is_clang) { |
| 723 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 724 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 725 } |
| 726 } |
| 727 |
658 if (rtc_include_tests) { | 728 if (rtc_include_tests) { |
659 config("rtc_base_tests_utils_exported_config") { | |
660 defines = [ "GTEST_RELATIVE_PATH" ] | |
661 } | |
662 | |
663 config("rtc_base_tests_utils_warnings_config") { | |
664 if (is_win && is_clang) { | |
665 cflags = [ | |
666 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6270 | |
667 "-Wno-reorder", | |
668 "-Wno-sign-compare", | |
669 ] | |
670 } | |
671 } | |
672 | |
673 rtc_source_set("rtc_base_tests_main") { | 729 rtc_source_set("rtc_base_tests_main") { |
674 testonly = true | 730 testonly = true |
675 sources = [ | 731 sources = [ |
676 "unittest_main.cc", | 732 "unittest_main.cc", |
677 ] | 733 ] |
678 public_configs = [ ":rtc_base_tests_utils_exported_config" ] | 734 public_configs = [ ":rtc_base_tests_utils_exported_config" ] |
679 deps = [ | 735 deps = [ |
| 736 ":rtc_base", |
| 737 ":rtc_base_approved", |
680 ":rtc_base_tests_utils", | 738 ":rtc_base_tests_utils", |
681 ] | |
682 public_deps = [ | |
683 "//testing/gmock", | |
684 "//testing/gtest", | |
685 ] | |
686 | |
687 if (!build_with_chromium && is_clang) { | |
688 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | |
689 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | |
690 } | |
691 } | |
692 | |
693 rtc_source_set("rtc_base_tests_utils") { | |
694 testonly = true | |
695 sources = [ | |
696 # Also use this as a convenient dumping ground for misc files that are | |
697 # included by multiple targets below. | |
698 "cpu_time.cc", | |
699 "cpu_time.h", | |
700 "fakeclock.cc", | |
701 "fakeclock.h", | |
702 "fakenetwork.h", | |
703 "fakesslidentity.h", | |
704 "firewallsocketserver.cc", | |
705 "firewallsocketserver.h", | |
706 "gunit.h", | |
707 "httpserver.cc", | |
708 "httpserver.h", | |
709 "memory_usage.cc", | |
710 "memory_usage.h", | |
711 "natserver.cc", | |
712 "natserver.h", | |
713 "natsocketfactory.cc", | |
714 "natsocketfactory.h", | |
715 "nattypes.cc", | |
716 "nattypes.h", | |
717 "proxyserver.cc", | |
718 "proxyserver.h", | |
719 "sigslottester.h", | |
720 "sigslottester.h.pump", | |
721 "testbase64.h", | |
722 "testechoserver.h", | |
723 "testutils.h", | |
724 "timedelta.h", | |
725 ] | |
726 configs += [ ":rtc_base_tests_utils_warnings_config" ] | |
727 public_configs = [ ":rtc_base_tests_utils_exported_config" ] | |
728 deps = [ | |
729 ":rtc_base", | |
730 "../test:field_trial", | 739 "../test:field_trial", |
731 "../test:test_support", | 740 "../test:test_support", |
732 ] | 741 ] |
733 public_deps = [ | 742 public_deps = [ |
734 "//testing/gmock", | 743 "//testing/gmock", |
735 "//testing/gtest", | 744 "//testing/gtest", |
736 ] | 745 ] |
737 | 746 |
738 if (!build_with_chromium && is_clang) { | 747 if (!build_with_chromium && is_clang) { |
739 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 748 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
(...skipping 16 matching lines...) Expand all Loading... |
756 "nullsocketserver_unittest.cc", | 765 "nullsocketserver_unittest.cc", |
757 "physicalsocketserver_unittest.cc", | 766 "physicalsocketserver_unittest.cc", |
758 "socket_unittest.cc", | 767 "socket_unittest.cc", |
759 "socket_unittest.h", | 768 "socket_unittest.h", |
760 "socketaddress_unittest.cc", | 769 "socketaddress_unittest.cc", |
761 "virtualsocket_unittest.cc", | 770 "virtualsocket_unittest.cc", |
762 ] | 771 ] |
763 deps = [ | 772 deps = [ |
764 ":rtc_base", | 773 ":rtc_base", |
765 ":rtc_base_tests_main", | 774 ":rtc_base_tests_main", |
| 775 ":rtc_base_tests_utils", |
| 776 "../system_wrappers:system_wrappers", |
| 777 "../test:test_support", |
766 "//testing/gtest", | 778 "//testing/gtest", |
767 ] | 779 ] |
768 if (is_win) { | 780 if (is_win) { |
769 sources += [ "win32socketserver_unittest.cc" ] | 781 sources += [ "win32socketserver_unittest.cc" ] |
770 } | 782 } |
771 | 783 |
772 if (!build_with_chromium && is_clang) { | 784 if (!build_with_chromium && is_clang) { |
773 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 785 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
774 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 786 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
775 } | 787 } |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
810 "platform_thread_unittest.cc", | 822 "platform_thread_unittest.cc", |
811 "random_unittest.cc", | 823 "random_unittest.cc", |
812 "rate_limiter_unittest.cc", | 824 "rate_limiter_unittest.cc", |
813 "rate_statistics_unittest.cc", | 825 "rate_statistics_unittest.cc", |
814 "ratetracker_unittest.cc", | 826 "ratetracker_unittest.cc", |
815 "refcountedobject_unittest.cc", | 827 "refcountedobject_unittest.cc", |
816 "safe_compare_unittest.cc", | 828 "safe_compare_unittest.cc", |
817 "safe_minmax_unittest.cc", | 829 "safe_minmax_unittest.cc", |
818 "string_to_number_unittest.cc", | 830 "string_to_number_unittest.cc", |
819 "stringencode_unittest.cc", | 831 "stringencode_unittest.cc", |
| 832 "stringize_macros_unittest.cc", |
820 "stringutils_unittest.cc", | 833 "stringutils_unittest.cc", |
821 "swap_queue_unittest.cc", | 834 "swap_queue_unittest.cc", |
822 "thread_annotations_unittest.cc", | 835 "thread_annotations_unittest.cc", |
823 "thread_checker_unittest.cc", | 836 "thread_checker_unittest.cc", |
824 "timestampaligner_unittest.cc", | 837 "timestampaligner_unittest.cc", |
825 "timeutils_unittest.cc", | 838 "timeutils_unittest.cc", |
826 ] | 839 ] |
827 deps = [ | 840 deps = [ |
| 841 ":rtc_base", |
828 ":rtc_base_approved", | 842 ":rtc_base_approved", |
829 ":rtc_base_tests_main", | 843 ":rtc_base_tests_main", |
| 844 ":rtc_base_tests_utils", |
| 845 ":rtc_task_queue", |
| 846 "../system_wrappers:system_wrappers", |
| 847 "../test:test_support", |
830 ] | 848 ] |
831 if (!build_with_chromium && is_clang) { | 849 if (!build_with_chromium && is_clang) { |
832 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 850 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
833 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 851 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
834 } | 852 } |
835 } | 853 } |
836 | 854 |
837 rtc_source_set("rtc_task_queue_unittests") { | 855 rtc_source_set("rtc_task_queue_unittests") { |
838 testonly = true | 856 testonly = true |
839 | 857 |
840 # Skip restricting visibility on mobile platforms since the tests on those | 858 # Skip restricting visibility on mobile platforms since the tests on those |
841 # gets additional generated targets which would require many lines here to | 859 # gets additional generated targets which would require many lines here to |
842 # cover (which would be confusing to read and hard to maintain). | 860 # cover (which would be confusing to read and hard to maintain). |
843 if (!is_android && !is_ios) { | 861 if (!is_android && !is_ios) { |
844 visibility = [ "//webrtc:rtc_unittests" ] | 862 visibility = [ "//webrtc:rtc_unittests" ] |
845 } | 863 } |
846 sources = [ | 864 sources = [ |
847 "sequenced_task_checker_unittest.cc", | 865 "sequenced_task_checker_unittest.cc", |
848 "task_queue_unittest.cc", | 866 "task_queue_unittest.cc", |
849 "weak_ptr_unittest.cc", | 867 "weak_ptr_unittest.cc", |
850 ] | 868 ] |
851 deps = [ | 869 deps = [ |
852 ":rtc_base_tests_main", | 870 ":rtc_base_tests_main", |
| 871 ":rtc_base_tests_utils", |
853 ":rtc_task_queue", | 872 ":rtc_task_queue", |
| 873 "../test:test_support", |
854 ] | 874 ] |
855 if (!build_with_chromium && is_clang) { | 875 if (!build_with_chromium && is_clang) { |
856 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 876 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
857 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 877 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
858 } | 878 } |
859 } | 879 } |
860 | 880 |
861 rtc_source_set("rtc_numerics_unittests") { | 881 rtc_source_set("rtc_numerics_unittests") { |
862 testonly = true | 882 testonly = true |
863 | 883 |
864 # Skip restricting visibility on mobile platforms since the tests on those | 884 # Skip restricting visibility on mobile platforms since the tests on those |
865 # gets additional generated targets which would require many lines here to | 885 # gets additional generated targets which would require many lines here to |
866 # cover (which would be confusing to read and hard to maintain). | 886 # cover (which would be confusing to read and hard to maintain). |
867 if (!is_android && !is_ios) { | 887 if (!is_android && !is_ios) { |
868 visibility = [ "//webrtc:rtc_unittests" ] | 888 visibility = [ "//webrtc:rtc_unittests" ] |
869 } | 889 } |
870 sources = [ | 890 sources = [ |
871 "numerics/exp_filter_unittest.cc", | 891 "numerics/exp_filter_unittest.cc", |
872 "numerics/percentile_filter_unittest.cc", | 892 "numerics/percentile_filter_unittest.cc", |
873 ] | 893 ] |
874 deps = [ | 894 deps = [ |
| 895 ":rtc_base_approved", |
875 ":rtc_base_tests_main", | 896 ":rtc_base_tests_main", |
876 ":rtc_numerics", | 897 ":rtc_numerics", |
| 898 "../test:test_support", |
877 ] | 899 ] |
878 } | 900 } |
879 | 901 |
880 config("rtc_base_unittests_config") { | 902 config("rtc_base_unittests_config") { |
881 if (is_clang) { | 903 if (is_clang) { |
882 cflags = [ "-Wno-unused-const-variable" ] | 904 cflags = [ "-Wno-unused-const-variable" ] |
883 } | 905 } |
884 } | 906 } |
885 rtc_source_set("rtc_base_unittests") { | 907 rtc_source_set("rtc_base_unittests") { |
886 testonly = true | 908 testonly = true |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
932 } | 954 } |
933 if (is_posix) { | 955 if (is_posix) { |
934 sources += [ | 956 sources += [ |
935 "ssladapter_unittest.cc", | 957 "ssladapter_unittest.cc", |
936 "sslidentity_unittest.cc", | 958 "sslidentity_unittest.cc", |
937 "sslstreamadapter_unittest.cc", | 959 "sslstreamadapter_unittest.cc", |
938 ] | 960 ] |
939 } | 961 } |
940 deps = [ | 962 deps = [ |
941 ":rtc_base_tests_main", | 963 ":rtc_base_tests_main", |
| 964 ":rtc_base_tests_utils", |
| 965 "../test:test_support", |
942 ] | 966 ] |
943 public_deps = [ | 967 public_deps = [ |
944 ":rtc_base", | 968 ":rtc_base", |
945 ] | 969 ] |
946 configs += [ ":rtc_base_unittests_config" ] | 970 configs += [ ":rtc_base_unittests_config" ] |
947 if (!build_with_chromium && is_clang) { | 971 if (!build_with_chromium && is_clang) { |
948 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 972 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
949 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 973 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
950 } | 974 } |
951 } | 975 } |
952 } | 976 } |
953 | 977 |
954 if (is_android) { | 978 if (is_android) { |
955 android_library("base_java") { | 979 android_library("base_java") { |
956 java_files = [ | 980 java_files = [ |
957 "java/src/org/webrtc/Logging.java", | 981 "java/src/org/webrtc/Logging.java", |
958 "java/src/org/webrtc/Size.java", | 982 "java/src/org/webrtc/Size.java", |
959 "java/src/org/webrtc/ThreadUtils.java", | 983 "java/src/org/webrtc/ThreadUtils.java", |
960 ] | 984 ] |
961 } | 985 } |
962 } | 986 } |
OLD | NEW |