Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: webrtc/base/BUILD.gn

Issue 2840453004: Reland of Enable GN check for webrtc/base (Closed)
Patch Set: Rebasing again Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « .gn ('k') | webrtc/base/location.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 13 matching lines...) Expand all
164 "refcountedobject.h", 166 "refcountedobject.h",
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 "sanitizer.h", 170 "sanitizer.h",
169 "scoped_ref_ptr.h", 171 "scoped_ref_ptr.h",
170 "string_to_number.cc", 172 "string_to_number.cc",
171 "string_to_number.h", 173 "string_to_number.h",
172 "stringencode.cc", 174 "stringencode.cc",
173 "stringencode.h", 175 "stringencode.h",
176 "stringize_macros.h",
174 "stringutils.cc", 177 "stringutils.cc",
175 "stringutils.h", 178 "stringutils.h",
176 "swap_queue.h", 179 "swap_queue.h",
177 "template_util.h", 180 "template_util.h",
178 "thread_annotations.h", 181 "thread_annotations.h",
179 "thread_checker.h", 182 "thread_checker.h",
180 "thread_checker_impl.cc", 183 "thread_checker_impl.cc",
181 "thread_checker_impl.h", 184 "thread_checker_impl.h",
182 "timestampaligner.cc", 185 "timestampaligner.cc",
183 "timestampaligner.h", 186 "timestampaligner.h",
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 650 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
648 } 651 }
649 } 652 }
650 653
651 rtc_source_set("gtest_prod") { 654 rtc_source_set("gtest_prod") {
652 sources = [ 655 sources = [
653 "gtest_prod_util.h", 656 "gtest_prod_util.h",
654 ] 657 ]
655 } 658 }
656 659
660 config("rtc_base_tests_utils_exported_config") {
661 defines = [ "GTEST_RELATIVE_PATH" ]
662 }
663
664 config("rtc_base_tests_utils_warnings_config") {
665 if (is_win && is_clang) {
666 cflags = [
667 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6270
668 "-Wno-reorder",
669 "-Wno-sign-compare",
670 ]
671 }
672 }
673
674 rtc_source_set("rtc_base_tests_utils") {
675 testonly = true
676 sources = [
677 # Also use this as a convenient dumping ground for misc files that are
678 # included by multiple targets below.
679 "cpu_time.cc",
680 "cpu_time.h",
681 "fakeclock.cc",
682 "fakeclock.h",
683 "fakenetwork.h",
684 "fakesslidentity.h",
685 "firewallsocketserver.cc",
686 "firewallsocketserver.h",
687 "gunit.h",
688 "httpserver.cc",
689 "httpserver.h",
690 "md5digest.cc",
691 "md5digest.h",
692 "memory_usage.cc",
693 "memory_usage.h",
694 "natserver.cc",
695 "natserver.h",
696 "natsocketfactory.cc",
697 "natsocketfactory.h",
698 "nattypes.cc",
699 "nattypes.h",
700 "proxyserver.cc",
701 "proxyserver.h",
702 "sigslottester.h",
703 "sigslottester.h.pump",
704 "testbase64.h",
705 "testechoserver.h",
706 "testutils.h",
707 "timedelta.h",
708 ]
709 configs += [ ":rtc_base_tests_utils_warnings_config" ]
710 public_configs = [ ":rtc_base_tests_utils_exported_config" ]
711 deps = [
712 ":rtc_base",
713 "../test:field_trial",
714 "../test:test_support",
715 ]
716 public_deps = [
717 "//testing/gmock",
718 "//testing/gtest",
719 ]
720
721 if (!build_with_chromium && is_clang) {
722 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
723 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
724 }
725 }
726
657 if (rtc_include_tests) { 727 if (rtc_include_tests) {
658 config("rtc_base_tests_utils_exported_config") {
659 defines = [ "GTEST_RELATIVE_PATH" ]
660 }
661
662 config("rtc_base_tests_utils_warnings_config") {
663 if (is_win && is_clang) {
664 cflags = [
665 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6270
666 "-Wno-reorder",
667 "-Wno-sign-compare",
668 ]
669 }
670 }
671
672 rtc_source_set("rtc_base_tests_main") { 728 rtc_source_set("rtc_base_tests_main") {
673 testonly = true 729 testonly = true
674 sources = [ 730 sources = [
675 "unittest_main.cc", 731 "unittest_main.cc",
676 ] 732 ]
677 public_configs = [ ":rtc_base_tests_utils_exported_config" ] 733 public_configs = [ ":rtc_base_tests_utils_exported_config" ]
678 deps = [ 734 deps = [
735 ":rtc_base",
736 ":rtc_base_approved",
679 ":rtc_base_tests_utils", 737 ":rtc_base_tests_utils",
680 ]
681 public_deps = [
682 "//testing/gmock",
683 "//testing/gtest",
684 ]
685
686 if (!build_with_chromium && is_clang) {
687 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
688 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
689 }
690 }
691
692 rtc_source_set("rtc_base_tests_utils") {
693 testonly = true
694 sources = [
695 # Also use this as a convenient dumping ground for misc files that are
696 # included by multiple targets below.
697 "cpu_time.cc",
698 "cpu_time.h",
699 "fakeclock.cc",
700 "fakeclock.h",
701 "fakenetwork.h",
702 "fakesslidentity.h",
703 "firewallsocketserver.cc",
704 "firewallsocketserver.h",
705 "gunit.h",
706 "httpserver.cc",
707 "httpserver.h",
708 "memory_usage.cc",
709 "memory_usage.h",
710 "natserver.cc",
711 "natserver.h",
712 "natsocketfactory.cc",
713 "natsocketfactory.h",
714 "nattypes.cc",
715 "nattypes.h",
716 "proxyserver.cc",
717 "proxyserver.h",
718 "sigslottester.h",
719 "sigslottester.h.pump",
720 "testbase64.h",
721 "testechoserver.h",
722 "testutils.h",
723 "timedelta.h",
724 ]
725 configs += [ ":rtc_base_tests_utils_warnings_config" ]
726 public_configs = [ ":rtc_base_tests_utils_exported_config" ]
727 deps = [
728 ":rtc_base",
729 "../test:field_trial", 738 "../test:field_trial",
730 "../test:test_support", 739 "../test:test_support",
731 ] 740 ]
732 public_deps = [ 741 public_deps = [
733 "//testing/gmock", 742 "//testing/gmock",
734 "//testing/gtest", 743 "//testing/gtest",
735 ] 744 ]
736 745
737 if (!build_with_chromium && is_clang) { 746 if (!build_with_chromium && is_clang) {
738 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 747 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
(...skipping 16 matching lines...) Expand all
755 "nullsocketserver_unittest.cc", 764 "nullsocketserver_unittest.cc",
756 "physicalsocketserver_unittest.cc", 765 "physicalsocketserver_unittest.cc",
757 "socket_unittest.cc", 766 "socket_unittest.cc",
758 "socket_unittest.h", 767 "socket_unittest.h",
759 "socketaddress_unittest.cc", 768 "socketaddress_unittest.cc",
760 "virtualsocket_unittest.cc", 769 "virtualsocket_unittest.cc",
761 ] 770 ]
762 deps = [ 771 deps = [
763 ":rtc_base", 772 ":rtc_base",
764 ":rtc_base_tests_main", 773 ":rtc_base_tests_main",
774 ":rtc_base_tests_utils",
775 "../system_wrappers:system_wrappers",
776 "../test:test_support",
765 "//testing/gtest", 777 "//testing/gtest",
766 ] 778 ]
767 if (is_win) { 779 if (is_win) {
768 sources += [ "win32socketserver_unittest.cc" ] 780 sources += [ "win32socketserver_unittest.cc" ]
769 } 781 }
770 782
771 if (!build_with_chromium && is_clang) { 783 if (!build_with_chromium && is_clang) {
772 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 784 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
773 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 785 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
774 } 786 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 "pathutils_unittest.cc", 820 "pathutils_unittest.cc",
809 "platform_thread_unittest.cc", 821 "platform_thread_unittest.cc",
810 "random_unittest.cc", 822 "random_unittest.cc",
811 "rate_limiter_unittest.cc", 823 "rate_limiter_unittest.cc",
812 "rate_statistics_unittest.cc", 824 "rate_statistics_unittest.cc",
813 "ratetracker_unittest.cc", 825 "ratetracker_unittest.cc",
814 "refcountedobject_unittest.cc", 826 "refcountedobject_unittest.cc",
815 "safe_compare_unittest.cc", 827 "safe_compare_unittest.cc",
816 "string_to_number_unittest.cc", 828 "string_to_number_unittest.cc",
817 "stringencode_unittest.cc", 829 "stringencode_unittest.cc",
830 "stringize_macros_unittest.cc",
818 "stringutils_unittest.cc", 831 "stringutils_unittest.cc",
819 "swap_queue_unittest.cc", 832 "swap_queue_unittest.cc",
820 "thread_annotations_unittest.cc", 833 "thread_annotations_unittest.cc",
821 "thread_checker_unittest.cc", 834 "thread_checker_unittest.cc",
822 "timestampaligner_unittest.cc", 835 "timestampaligner_unittest.cc",
823 "timeutils_unittest.cc", 836 "timeutils_unittest.cc",
824 ] 837 ]
825 deps = [ 838 deps = [
839 ":rtc_base",
826 ":rtc_base_approved", 840 ":rtc_base_approved",
827 ":rtc_base_tests_main", 841 ":rtc_base_tests_main",
842 ":rtc_base_tests_utils",
843 ":rtc_task_queue",
844 "../system_wrappers:system_wrappers",
845 "../test:test_support",
828 ] 846 ]
829 if (!build_with_chromium && is_clang) { 847 if (!build_with_chromium && is_clang) {
830 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 848 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
831 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 849 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
832 } 850 }
833 } 851 }
834 852
835 rtc_source_set("rtc_task_queue_unittests") { 853 rtc_source_set("rtc_task_queue_unittests") {
836 testonly = true 854 testonly = true
837 855
838 # Skip restricting visibility on mobile platforms since the tests on those 856 # Skip restricting visibility on mobile platforms since the tests on those
839 # gets additional generated targets which would require many lines here to 857 # gets additional generated targets which would require many lines here to
840 # cover (which would be confusing to read and hard to maintain). 858 # cover (which would be confusing to read and hard to maintain).
841 if (!is_android && !is_ios) { 859 if (!is_android && !is_ios) {
842 visibility = [ "//webrtc:rtc_unittests" ] 860 visibility = [ "//webrtc:rtc_unittests" ]
843 } 861 }
844 sources = [ 862 sources = [
845 "sequenced_task_checker_unittest.cc", 863 "sequenced_task_checker_unittest.cc",
846 "task_queue_unittest.cc", 864 "task_queue_unittest.cc",
847 "weak_ptr_unittest.cc", 865 "weak_ptr_unittest.cc",
848 ] 866 ]
849 deps = [ 867 deps = [
850 ":rtc_base_tests_main", 868 ":rtc_base_tests_main",
869 ":rtc_base_tests_utils",
851 ":rtc_task_queue", 870 ":rtc_task_queue",
871 "../test:test_support",
852 ] 872 ]
853 if (!build_with_chromium && is_clang) { 873 if (!build_with_chromium && is_clang) {
854 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 874 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
855 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 875 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
856 } 876 }
857 } 877 }
858 878
859 rtc_source_set("rtc_numerics_unittests") { 879 rtc_source_set("rtc_numerics_unittests") {
860 testonly = true 880 testonly = true
861 881
862 # Skip restricting visibility on mobile platforms since the tests on those 882 # Skip restricting visibility on mobile platforms since the tests on those
863 # gets additional generated targets which would require many lines here to 883 # gets additional generated targets which would require many lines here to
864 # cover (which would be confusing to read and hard to maintain). 884 # cover (which would be confusing to read and hard to maintain).
865 if (!is_android && !is_ios) { 885 if (!is_android && !is_ios) {
866 visibility = [ "//webrtc:rtc_unittests" ] 886 visibility = [ "//webrtc:rtc_unittests" ]
867 } 887 }
868 sources = [ 888 sources = [
869 "numerics/exp_filter_unittest.cc", 889 "numerics/exp_filter_unittest.cc",
870 "numerics/percentile_filter_unittest.cc", 890 "numerics/percentile_filter_unittest.cc",
871 ] 891 ]
872 deps = [ 892 deps = [
893 ":rtc_base_approved",
873 ":rtc_base_tests_main", 894 ":rtc_base_tests_main",
874 ":rtc_numerics", 895 ":rtc_numerics",
896 "../test:test_support",
875 ] 897 ]
876 } 898 }
877 899
878 config("rtc_base_unittests_config") { 900 config("rtc_base_unittests_config") {
879 if (is_clang) { 901 if (is_clang) {
880 cflags = [ "-Wno-unused-const-variable" ] 902 cflags = [ "-Wno-unused-const-variable" ]
881 } 903 }
882 } 904 }
883 rtc_source_set("rtc_base_unittests") { 905 rtc_source_set("rtc_base_unittests") {
884 testonly = true 906 testonly = true
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 } 952 }
931 if (is_posix) { 953 if (is_posix) {
932 sources += [ 954 sources += [
933 "ssladapter_unittest.cc", 955 "ssladapter_unittest.cc",
934 "sslidentity_unittest.cc", 956 "sslidentity_unittest.cc",
935 "sslstreamadapter_unittest.cc", 957 "sslstreamadapter_unittest.cc",
936 ] 958 ]
937 } 959 }
938 deps = [ 960 deps = [
939 ":rtc_base_tests_main", 961 ":rtc_base_tests_main",
962 ":rtc_base_tests_utils",
963 "../test:test_support",
940 ] 964 ]
941 public_deps = [ 965 public_deps = [
942 ":rtc_base", 966 ":rtc_base",
943 ] 967 ]
944 configs += [ ":rtc_base_unittests_config" ] 968 configs += [ ":rtc_base_unittests_config" ]
945 if (!build_with_chromium && is_clang) { 969 if (!build_with_chromium && is_clang) {
946 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 970 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
947 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 971 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
948 } 972 }
949 } 973 }
950 } 974 }
951 975
952 if (is_android) { 976 if (is_android) {
953 android_library("base_java") { 977 android_library("base_java") {
954 java_files = [ 978 java_files = [
955 "java/src/org/webrtc/Logging.java", 979 "java/src/org/webrtc/Logging.java",
956 "java/src/org/webrtc/Size.java", 980 "java/src/org/webrtc/Size.java",
957 "java/src/org/webrtc/ThreadUtils.java", 981 "java/src/org/webrtc/ThreadUtils.java",
958 ] 982 ]
959 } 983 }
960 } 984 }
OLDNEW
« no previous file with comments | « .gn ('k') | webrtc/base/location.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698