forked from facebook/fboss
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
702 lines (656 loc) · 21.8 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
cmake_minimum_required(VERSION 2.8)
set(CMAKE_MODULE_PATH
# For in-fbsource builds on mac
"${CMAKE_CURRENT_SOURCE_DIR}/../opensource/fbcode_builder/CMake"
# For shipit-transformed builds
"${CMAKE_CURRENT_SOURCE_DIR}/build/fbcode_builder/CMake"
${CMAKE_MODULE_PATH})
if (POLICY CMP0054)
# Enable CMP0054 to indicate that we want the new safer if() argument behavior
cmake_policy(SET CMP0054 NEW)
endif()
project(FBOSS)
include(CheckCXXCompilerFlag)
include(CMakeParseArguments)
# Check the version
CHECK_CXX_COMPILER_FLAG("-std=gnu++1y" COMPILER_SUPPORTS_CXX14)
if(NOT COMPILER_SUPPORTS_CXX14)
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++14 support.")
endif()
# Ideally, we would use
# set_property(TARGET fboss_agent PROPERTY CXX_STANDARD 11)
# to define the C++ version, but we don't want to depend on
# cmake 3.1, as it's not currently widely available. We only support
# building on Linux under GCC right now, so we might as well just hard
# code the flags.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++1y")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-sign-compare -Wno-bool-compare")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-variable -Woverloaded-virtual -Wnon-virtual-dtor")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-maybe-uninitialized -Wdeprecated-declarations")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=deprecated-declarations")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DINCLUDE_L3 -DLONGS_ARE_64BITS")
include_directories(${CMAKE_SOURCE_DIR})
include_directories(${CMAKE_BUILD_DIR})
find_package(GTest REQUIRED)
include_directories(
${GTEST_INCLUDE_DIRS}
)
find_package(GMock MODULE REQUIRED)
find_package(Gflags CONFIG REQUIRED)
find_package(Glog REQUIRED)
find_package(folly CONFIG REQUIRED)
find_package(yarpl CONFIG REQUIRED)
find_package(rsocket CONFIG)
find_package(fizz CONFIG REQUIRED)
find_package(fmt CONFIG REQUIRED)
find_package(wangle CONFIG REQUIRED)
find_package(FBThrift CONFIG REQUIRED)
find_library(OPENNSL opennsl)
find_path(OPENNSL_INCLUDE_DIR NAMES opennsl/tx.h)
include_directories(${OPENNSL_INCLUDE_DIR})
find_library(LIBNL nl-3)
find_path(LIBNL_INCLUDE_DIR NAMES libnl3/netlink/socket.h)
include_directories(${LIBNL_INCLUDE_DIR})
include_directories(${LIBNL_INCLUDE_DIR}/libnl3)
find_library(IPROUTE2 netlink)
find_path(IPROUTE2_INCLUDE_DIR NAMES libnetlink.h)
include_directories(${IPROUTE2_INCLUDE_DIR})
# Generate thrift deps and libraries
include(${CMAKE_SOURCE_DIR}/ThriftCppLibrary.cmake)
# Thrift libraries
add_thrift_cpp2_library(
fb303_cpp2
common/fb303/if/fb303.thrift
SERVICES
FacebookService
)
add_thrift_cpp2_library(
network_address_cpp2
common/network/if/Address.thrift
)
add_thrift_cpp2_library(
mpls_cpp2
fboss/agent/if/mpls.thrift
OPTIONS
json
)
add_thrift_cpp2_library(
switch_config_cpp2
fboss/agent/switch_config.thrift
OPTIONS
json
DEPENDS
mpls_cpp2
)
add_thrift_cpp2_library(
agent_config_cpp2
fboss/agent/agent_config.thrift
OPTIONS
json
DEPENDS
platform_config_cpp2
switch_config_cpp2
)
add_thrift_cpp2_library(
platform_config_cpp2
fboss/agent/platform_config.thrift
OPTIONS
json
DEPENDS
bcm_config_cpp2
phy_cpp2
)
add_thrift_cpp2_library(
switch_state_cpp2
fboss/agent/switch_state.thrift
OPTIONS
json
optionals
DEPENDS
switch_config_cpp2
)
add_thrift_cpp2_library(
phy_cpp2
fboss/lib/phy/phy.thrift
OPTIONS
json
DEPENDS
switch_config_cpp2
)
add_thrift_cpp2_library(
transceiver_cpp2
fboss/qsfp_service/if/transceiver.thrift
)
add_thrift_cpp2_library(
optic_cpp2
fboss/agent/if/optic.thrift
DEPENDS
transceiver_cpp2
)
add_thrift_cpp2_library(
fboss_cpp2
fboss/agent/if/fboss.thrift
)
add_thrift_cpp2_library(
sflow_cpp2
fboss/agent/if/sflow.thrift
)
add_thrift_cpp2_library(
ctrl_cpp2
fboss/agent/if/ctrl.thrift
SERVICES
FbossCtrl
NeighborListenerClient
DEPENDS
fboss_cpp2
fb303_cpp2
mpls_cpp2
network_address_cpp2
optic_cpp2
transceiver_cpp2
)
add_thrift_cpp2_library(
sim_ctrl_cpp2
fboss/agent/hw/sim/sim_ctrl.thrift
SERVICES
SimCtrl
DEPENDS
fboss_cpp2
ctrl_cpp2
)
add_thrift_cpp2_library(
bcm_config_cpp2
fboss/agent/hw/bcm/bcm_config.thrift
OPTIONS
json
)
add_thrift_cpp2_library(
packettrace_cpp2
fboss/agent/hw/bcm/packettrace.thrift
)
add_thrift_cpp2_library(
bcmswitch_cpp2
fboss/agent/hw/bcm/bcmswitch.thrift
)
add_thrift_cpp2_library(
hardware_stats_cpp2
fboss/agent/hw/hardware_stats.thrift
)
add_thrift_cpp2_library(
pcap_pubsub_cpp2
fboss/pcap_distribution_service/if/pcap_pubsub.thrift
SERVICES
PcapPushSubscriber
PcapSubscriber
)
add_thrift_cpp2_library(
qsfp_cpp2
fboss/qsfp_service/if/qsfp.thrift
SERVICES
QsfpService
DEPENDS
fb303_cpp2
ctrl_cpp2
fboss_cpp2
transceiver_cpp2
switch_config_cpp2
mpls_cpp2
)
add_thrift_cpp2_library(
netlink_manager_service_cpp2
fboss/netlink_manager/if/netlink_manager_service.thrift
SERVICES
NetlinkManagerService
DEPENDS
fb303_cpp2
ctrl_cpp2
)
find_library(USB usb-1.0)
find_path(USB_INCLUDE_DIR NAMES libusb-1.0/libusb.h)
include_directories(${USB_INCLUDE_DIR})
find_library(NETLINK3 nl-3)
find_library(NETLINKROUTE3 libnl-route-3.a nl-route-3)
find_library(CURL curl)
find_path(CURL_INCLUDE_DIR NAMES curl/curl.h)
include_directories(${CURL_INCLUDE_DIR})
find_library(MNL mnl)
find_library(SODIUM sodium)
add_executable(wedge_agent
fboss/agent/platforms/wedge/WedgePlatform.cpp
fboss/agent/platforms/common/PlatformProductInfo.cpp
fboss/agent/platforms/wedge/WedgePort.cpp
fboss/agent/platforms/wedge/wedge_agent.cpp
fboss/agent/platforms/wedge/oss/WedgePort.cpp
fboss/agent/platforms/wedge/oss/WedgePlatform.cpp
)
add_executable(netlink_manager
fboss/netlink_manager/NlResources.cpp
fboss/netlink_manager/NetlinkManager.cpp
fboss/netlink_manager/NetlinkPoller.cpp
fboss/netlink_manager/main.cpp
fboss/netlink_manager/utils/AddressUtils.cpp
fboss/netlink_manager/NetlinkManagerHandler.cpp
)
add_executable(qsfp_service
fboss/qsfp_service/oss/QsfpServer.cpp
fboss/qsfp_service/Main.cpp
fboss/qsfp_service/QsfpServiceHandler.cpp
fboss/qsfp_service/sff/QsfpModule.cpp
fboss/qsfp_service/sff/SffFieldInfo.cpp
fboss/qsfp_service/sff/oss/QsfpModule.cpp
fboss/qsfp_service/platforms/wedge/WedgeManager.cpp
fboss/qsfp_service/platforms/wedge/WedgeQsfp.cpp
fboss/qsfp_service/platforms/wedge/Wedge100Manager.cpp
fboss/qsfp_service/platforms/wedge/GalaxyManager.cpp
fboss/qsfp_service/platforms/wedge/Wedge40Manager.cpp
fboss/qsfp_service/platforms/wedge/WedgeManagerInit.cpp
fboss/qsfp_service/platforms/wedge/oss/WedgeManagerInit.cpp
)
add_executable(bcm_test
fboss/agent/hw/test/HwSwitchEnsemble.cpp
fboss/agent/hw/test/HwLinkStateToggler.cpp
fboss/agent/hw/test/HwTest.cpp
fboss/agent/hw/test/HwTestStatUtils.cpp
fboss/agent/hw/test/ConfigFactory.cpp
fboss/agent/hw/bcm/tests/BcmSwitchEnsemble.cpp
fboss/agent/hw/test/Main.cpp
fboss/agent/hw/bcm/tests/BcmTest.cpp
fboss/agent/hw/bcm/tests/BcmPortUtils.cpp
fboss/agent/hw/bcm/tests/BcmVlanTests.cpp
fboss/agent/hw/bcm/tests/BcmColdBootStateTests.cpp
fboss/agent/hw/bcm/tests/BcmQueueStatCollectionTests.cpp
fboss/agent/hw/bcm/tests/oss/BcmSwitchEnsemble.cpp
fboss/agent/hw/bcm/tests/oss/BcmTest.cpp
fboss/agent/hw/bcm/tests/oss/BcmPortUtils.cpp
fboss/agent/platforms/test_platforms/BcmTestPort.cpp
fboss/agent/platforms/test_platforms/BcmTestPlatform.cpp
fboss/agent/platforms/test_platforms/BcmTestWedgePlatform.cpp
fboss/agent/platforms/test_platforms/BcmTestWedge40Platform.cpp
fboss/agent/platforms/test_platforms/BcmTestWedge40Port.cpp
fboss/agent/platforms/test_platforms/BcmTestWedge100Platform.cpp
fboss/agent/platforms/test_platforms/BcmTestWedge100Port.cpp
fboss/agent/platforms/test_platforms/BcmTestGalaxyPlatform.cpp
fboss/agent/platforms/test_platforms/BcmTestGalaxyPort.cpp
fboss/agent/platforms/test_platforms/BcmTestMinipackPlatform.cpp
fboss/agent/platforms/test_platforms/BcmTestYampPlatform.cpp
fboss/agent/platforms/test_platforms/BcmTestWedge400DQPlatform.cpp
fboss/agent/platforms/test_platforms/FakeBcmTestPlatform.cpp
fboss/agent/platforms/test_platforms/FakeBcmTestPort.cpp
fboss/agent/platforms/test_platforms/BcmTestPlatform.cpp
fboss/agent/platforms/test_platforms/BcmTestPort.cpp
fboss/agent/platforms/test_platforms/CreateTestPlatform.cpp
fboss/agent/platforms/test_platforms/oss/BcmTestWedgeTomahawkPlatform.cpp
fboss/agent/platforms/test_platforms/oss/BcmTestWedgeTomahawk3Platform.cpp
fboss/agent/platforms/test_platforms/oss/BcmTestWedge40Platform.cpp
fboss/agent/platforms/test_platforms/oss/FakeBcmTestPlatform.cpp
)
add_library(fboss_agent STATIC
common/stats/ServiceData.cpp
fboss/agent/AgentConfig.cpp
fboss/agent/AggregatePortStats.cpp
fboss/agent/AlpmUtils.cpp
fboss/agent/ApplyThriftConfig.cpp
fboss/agent/ArpCache.cpp
fboss/agent/ArpHandler.cpp
fboss/agent/capture/PcapFile.cpp
fboss/agent/capture/PcapPkt.cpp
fboss/agent/capture/PcapQueue.cpp
fboss/agent/capture/PcapWriter.cpp
fboss/agent/capture/PktCapture.cpp
fboss/agent/capture/PktCaptureManager.cpp
fboss/agent/DHCPv4Handler.cpp
fboss/agent/DHCPv6Handler.cpp
fboss/agent/hw/BufferStatsLogger.cpp
fboss/agent/hw/bcm/BcmAclTable.cpp
fboss/agent/hw/bcm/BcmAPI.cpp
fboss/agent/hw/bcm/BcmConfig.cpp
fboss/agent/hw/bcm/BcmControlPlane.cpp
fboss/agent/hw/bcm/BcmControlPlaneQueueManager.cpp
fboss/agent/hw/bcm/BcmCosQueueManager.cpp
fboss/agent/hw/bcm/BcmEgress.cpp
fboss/agent/hw/bcm/BcmHost.cpp
fboss/agent/hw/bcm/BcmHostKey.cpp
fboss/agent/hw/bcm/BcmIntf.cpp
fboss/agent/hw/bcm/BcmMirrorTable.cpp
fboss/agent/hw/bcm/BcmLabeledTunnel.cpp
fboss/agent/hw/bcm/BcmPortDescriptor.cpp
fboss/agent/hw/bcm/BcmPlatform.cpp
fboss/agent/hw/bcm/BcmPort.cpp
fboss/agent/hw/bcm/BcmPortGroup.cpp
fboss/agent/hw/bcm/BcmPortQueueManager.cpp
fboss/agent/hw/bcm/BcmPortTable.cpp
fboss/agent/hw/bcm/BcmQosMap.cpp
fboss/agent/hw/bcm/BcmQosPolicy.cpp
fboss/agent/hw/bcm/BcmQosPolicyTable.cpp
fboss/agent/hw/bcm/BcmRoute.cpp
fboss/agent/hw/bcm/BcmRtag7LoadBalancer.cpp
fboss/agent/hw/bcm/BcmRtag7Module.cpp
fboss/agent/hw/bcm/BcmRxPacket.cpp
fboss/agent/hw/bcm/BcmSflowExporter.cpp
fboss/agent/hw/bcm/BcmStats.cpp
fboss/agent/hw/bcm/BcmStatUpdater.cpp
fboss/agent/hw/bcm/BcmSwitch.cpp
fboss/agent/hw/bcm/BcmSwitchEventUtils.cpp
fboss/agent/hw/bcm/BcmTrunk.cpp
fboss/agent/hw/bcm/BcmTrunkStats.cpp
fboss/agent/hw/bcm/BcmTrunkTable.cpp
fboss/agent/hw/bcm/BcmTxPacket.cpp
fboss/agent/hw/bcm/BcmUnit.cpp
fboss/agent/hw/bcm/BcmWarmBootCache.cpp
fboss/agent/hw/bcm/BcmWarmBootHelper.cpp
fboss/agent/hw/bcm/BcmWarmBootState.cpp
fboss/agent/hw/bcm/CounterUtils.cpp
fboss/agent/hw/bcm/PortAndEgressIdsMap.cpp
fboss/agent/hw/bcm/BcmEgressManager.cpp
fboss/agent/hw/bcm/BcmNextHop.cpp
fboss/agent/hw/bcm/BcmMultiPathNextHop.cpp
fboss/agent/hw/bcm/BcmLabeledEgress.cpp
fboss/agent/hw/bcm/BcmLabeledTunnelEgress.cpp
fboss/agent/hw/bcm/oss/BcmAclEntry.cpp
fboss/agent/hw/bcm/oss/BcmAclStat.cpp
fboss/agent/hw/bcm/oss/BcmAPI.cpp
fboss/agent/hw/bcm/oss/BcmControlPlane.cpp
fboss/agent/hw/bcm/oss/BcmControlPlaneQueueManager.cpp
fboss/agent/hw/bcm/oss/BcmCosQueueManager.cpp
fboss/agent/hw/bcm/oss/BcmEgress.cpp
fboss/agent/hw/bcm/oss/BcmHost.cpp
fboss/agent/hw/bcm/oss/BcmIntf.cpp
fboss/agent/hw/bcm/oss/BcmMirror.cpp
fboss/agent/hw/bcm/oss/BcmLabelMap.cpp
fboss/agent/hw/bcm/oss/BcmLabeledTunnel.cpp
fboss/agent/hw/bcm/oss/BcmPort.cpp
fboss/agent/hw/bcm/oss/BcmPortGroup.cpp
fboss/agent/hw/bcm/oss/BcmPortQueueManager.cpp
fboss/agent/hw/bcm/oss/BcmPortTable.cpp
fboss/agent/hw/bcm/oss/BcmQosMap.cpp
fboss/agent/hw/bcm/oss/BcmRtag7LoadBalancer.cpp
fboss/agent/hw/bcm/oss/BcmRtag7Module.cpp
fboss/agent/hw/bcm/oss/BcmStatUpdater.cpp
fboss/agent/hw/bcm/oss/BcmSwitch.cpp
fboss/agent/hw/bcm/oss/BcmSwitchEventCallback.cpp
fboss/agent/hw/bcm/oss/BcmTrunk.cpp
fboss/agent/hw/bcm/oss/BcmUnit.cpp
fboss/agent/hw/bcm/oss/BcmWarmBootCache.cpp
fboss/agent/hw/bcm/oss/BcmWarmBootHelper.cpp
fboss/agent/hw/bcm/oss/BcmTableStats.cpp
fboss/agent/hw/bcm/oss/BcmBstStatsMgr.cpp
fboss/agent/hw/bcm/oss/BcmLabeledEgress.cpp
fboss/agent/hw/bcm/oss/BcmLabeledTunnelEgress.cpp
fboss/agent/hw/bcm/oss/BcmTypesImpl.cpp
fboss/agent/hw/bcm/BcmAddressFBConvertors.cpp
fboss/agent/hw/mock/MockHwSwitch.cpp
fboss/agent/hw/mock/MockPlatform.cpp
fboss/agent/hw/mock/MockRxPacket.cpp
fboss/agent/hw/mock/MockTxPacket.cpp
fboss/agent/hw/mock/MockTestHandle.cpp
fboss/agent/hw/sim/SimHandler.cpp
fboss/agent/hw/sim/SimSwitch.cpp
fboss/agent/lldp/LinkNeighbor.cpp
fboss/agent/lldp/LinkNeighborDB.cpp
fboss/agent/ndp/IPv6RouteAdvertiser.cpp
fboss/agent/HwSwitch.cpp
fboss/agent/IPHeaderV4.cpp
fboss/agent/IPv4Handler.cpp
fboss/agent/IPv6Handler.cpp
fboss/agent/lldp/LinkNeighbor.cpp
fboss/agent/lldp/LinkNeighborDB.cpp
fboss/agent/LacpController.cpp
fboss/agent/LacpMachines.cpp
fboss/agent/LacpTypes.cpp
fboss/agent/LinkAggregationManager.cpp
fboss/agent/LldpManager.cpp
fboss/agent/LoadBalancerConfigApplier.cpp
fboss/agent/Main.cpp
fboss/agent/SetupThrift.cpp
fboss/agent/MirrorManager.cpp
fboss/agent/MirrorManagerImpl.cpp
fboss/agent/ndp/IPv6RouteAdvertiser.cpp
fboss/agent/NdpCache.cpp
fboss/agent/NeighborListenerClient.cpp
fboss/agent/NeighborUpdater.cpp
fboss/agent/oss/AggregatePortStats.cpp
fboss/agent/oss/Main.cpp
fboss/agent/oss/SetupThrift.cpp
fboss/agent/oss/RouteUpdateLogger.cpp
fboss/agent/oss/SwSwitch.cpp
fboss/agent/oss/Utils.cpp
fboss/agent/packet/ArpHdr.cpp
fboss/agent/packet/DHCPv4Packet.cpp
fboss/agent/packet/DHCPv6Packet.cpp
fboss/agent/packet/EthHdr.cpp
fboss/agent/packet/ICMPHdr.cpp
fboss/agent/packet/IPv4Hdr.cpp
fboss/agent/packet/IPv6Hdr.cpp
fboss/agent/packet/LlcHdr.cpp
fboss/agent/packet/NDP.cpp
fboss/agent/packet/NDPRouterAdvertisement.cpp
fboss/agent/packet/PktUtil.cpp
fboss/agent/packet/SflowStructs.cpp
fboss/agent/packet/UDPHeader.cpp
fboss/agent/Platform.cpp
fboss/agent/PlatformPort.cpp
fboss/agent/platforms/wedge/oss/GalaxyPlatform.cpp
fboss/agent/platforms/wedge/oss/GalaxyPort.cpp
fboss/agent/platforms/wedge/oss/WedgePlatform.cpp
fboss/agent/platforms/wedge/oss/Wedge40Platform.cpp
fboss/agent/platforms/wedge/oss/Wedge100Platform.cpp
fboss/agent/platforms/wedge/oss/WedgePort.cpp
fboss/agent/platforms/wedge/oss/Wedge40Port.cpp
fboss/agent/platforms/wedge/oss/Wedge100Port.cpp
fboss/agent/platforms/wedge/oss/WedgePlatformInit.cpp
fboss/agent/platforms/common/oss/PlatformProductInfo.cpp
fboss/agent/platforms/wedge/oss/WedgeTomahawkPlatform.cpp
fboss/agent/platforms/wedge/wedge_agent.cpp
fboss/agent/platforms/wedge/WedgePlatform.cpp
fboss/agent/platforms/wedge/Wedge40Platform.cpp
fboss/agent/platforms/wedge/FakeWedge40Platform.cpp
fboss/agent/platforms/wedge/Wedge100Platform.cpp
fboss/agent/platforms/wedge/GalaxyLCPlatform.cpp
fboss/agent/platforms/wedge/GalaxyFCPlatform.cpp
fboss/agent/platforms/wedge/WedgePort.cpp
fboss/agent/platforms/wedge/Wedge100Port.cpp
fboss/agent/platforms/common/PlatformProductInfo.cpp
fboss/agent/platforms/wedge/WedgePlatformInit.cpp
fboss/agent/PortStats.cpp
fboss/agent/PortUpdateHandler.cpp
fboss/agent/RouteUpdateLogger.cpp
fboss/agent/RouteUpdateLoggingPrefixTracker.cpp
fboss/agent/state/AclEntry.cpp
fboss/agent/state/AclMap.cpp
fboss/agent/state/AggregatePort.cpp
fboss/agent/state/AggregatePortMap.cpp
fboss/agent/state/ArpEntry.cpp
fboss/agent/state/ArpResponseTable.cpp
fboss/agent/state/ArpTable.cpp
fboss/agent/state/ControlPlane.cpp
fboss/agent/state/ForwardingInformationBase.cpp
fboss/agent/state/ForwardingInformationBaseContainer.cpp
fboss/agent/state/ForwardingInformationBaseDelta.cpp
fboss/agent/state/ForwardingInformationBaseMap.cpp
fboss/agent/state/Interface.cpp
fboss/agent/state/InterfaceMap.cpp
fboss/agent/state/LabelForwardingAction.cpp
fboss/agent/state/LabelForwardingEntry.cpp
fboss/agent/state/LabelForwardingInformationBase.cpp
fboss/agent/state/LoadBalancer.cpp
fboss/agent/state/LoadBalancerMap.cpp
fboss/agent/state/Mirror.cpp
fboss/agent/state/MirrorMap.cpp
fboss/agent/state/MatchAction.cpp
fboss/agent/state/NdpEntry.cpp
fboss/agent/state/NdpResponseTable.cpp
fboss/agent/state/NdpTable.cpp
fboss/agent/state/NeighborResponseTable.cpp
fboss/agent/state/NodeBase.cpp
fboss/agent/state/Port.cpp
fboss/agent/state/PortMap.cpp
fboss/agent/state/PortQueue.cpp
fboss/agent/state/QosPolicy.cpp
fboss/agent/state/QosPolicyMap.cpp
fboss/agent/state/Route.cpp
fboss/agent/state/RouteDelta.cpp
fboss/agent/state/RouteNextHop.cpp
fboss/agent/state/RouteNextHopEntry.cpp
fboss/agent/state/RouteNextHopsMulti.cpp
fboss/agent/state/RouteTable.cpp
fboss/agent/state/RouteTableMap.cpp
fboss/agent/state/RouteTableRib.cpp
fboss/agent/state/RouteTypes.cpp
fboss/agent/state/RouteUpdater.cpp
fboss/agent/state/SflowCollector.cpp
fboss/agent/state/SflowCollectorMap.cpp
fboss/agent/state/StateDelta.cpp
fboss/agent/state/StateUtils.cpp
fboss/agent/state/SwitchState.cpp
fboss/agent/state/Vlan.cpp
fboss/agent/state/VlanMap.cpp
fboss/agent/state/VlanMapDelta.cpp
fboss/agent/types.cpp
fboss/agent/RestartTimeTracker.cpp
fboss/agent/SwitchStats.cpp
fboss/agent/SwSwitch.cpp
fboss/agent/ThriftHandler.cpp
fboss/agent/ThreadHeartbeat.cpp
fboss/agent/TunIntf.cpp
fboss/agent/TunManager.cpp
fboss/agent/Utils.cpp
fboss/agent/rib/ConfigApplier.cpp
fboss/agent/rib/ForwardingInformationBaseUpdater.cpp
fboss/agent/rib/Route.cpp
fboss/agent/rib/RouteNextHop.cpp
fboss/agent/rib/RouteNextHopEntry.cpp
fboss/agent/rib/RouteNextHopsMulti.cpp
fboss/agent/rib/RouteTypes.cpp
fboss/agent/rib/RouteUpdater.cpp
fboss/agent/rib/RoutingInformationBase.cpp
fboss/lib/usb/GalaxyI2CBus.cpp
fboss/lib/usb/BaseWedgeI2CBus.cpp
fboss/lib/usb/BaseWedgeI2CBus.h
fboss/lib/RestClient.cpp
fboss/lib/BmcRestClient.cpp
fboss/lib/usb/CP2112.cpp
fboss/lib/usb/CP2112.h
fboss/lib/usb/PCA9548.cpp
fboss/lib/usb/PCA9548MultiplexedBus.cpp
fboss/lib/usb/PCA9548MuxedBus.cpp
fboss/lib/usb/TransceiverI2CApi.h
fboss/lib/usb/UsbDevice.cpp
fboss/lib/usb/UsbDevice.h
fboss/lib/usb/UsbError.h
fboss/lib/usb/UsbHandle.cpp
fboss/lib/usb/UsbHandle.h
fboss/lib/usb/Wedge100I2CBus.cpp
fboss/lib/usb/Wedge100I2CBus.h
fboss/lib/usb/WedgeI2CBus.cpp
fboss/lib/usb/WedgeI2CBus.h
fboss/lib/LogThriftCall.cpp
fboss/qsfp_service/oss/StatsPublisher.cpp
fboss/qsfp_service/platforms/wedge/WedgeI2CBusLock.cpp
fboss/qsfp_service/lib/QsfpClient.cpp
fboss/qsfp_service/lib/QsfpCache.cpp
)
target_link_libraries(
fboss_agent PUBLIC
agent_config_cpp2
switch_config_cpp2
switch_state_cpp2
sflow_cpp2
ctrl_cpp2
sim_ctrl_cpp2
packettrace_cpp2
bcmswitch_cpp2
hardware_stats_cpp2
mpls_cpp2
pcap_pubsub_cpp2
qsfp_cpp2
netlink_manager_service_cpp2
Folly::folly
wangle::wangle
FBThrift::thriftcpp2
${OPENNSL}
${USB}
${IPROUTE2}
${NETLINK3}
${NETLINKROUTE3}
${CURL}
${SODIUM}
${MNL}
)
target_link_libraries(wedge_agent fboss_agent)
target_link_libraries(netlink_manager fboss_agent)
target_link_libraries(qsfp_service fboss_agent)
target_compile_definitions(bcm_test
PUBLIC
${LIBGMOCK_DEFINES}
)
target_include_directories(bcm_test
PUBLIC
${LIBGMOCK_INCLUDE_DIR}
)
target_link_libraries(bcm_test
PUBLIC
fboss_agent
${GTEST}
${LIBGMOCK_LIBRARIES}
)
# TODO(rsher)
# depends on agent/hw/bcm/facebook/bcm_config.thrift
# investigate open sourcing
# add_executable(lldp_tool
# fboss/util/lldp_tool.cpp
# )
#
# target_link_libraries(lldp_tool fboss-agent)
add_executable(cp2112_util
fboss/util/cp2112_util.cpp
)
target_link_libraries(cp2112_util fboss_agent)
add_executable(wedge_qsfp_util
fboss/util/wedge_qsfp_util.cpp
fboss/util/oss/wedge_qsfp_util.cpp
)
target_link_libraries(wedge_qsfp_util fboss_agent)
# Unit Testing
add_definitions (-DIS_OSS=true)
find_package(Threads REQUIRED)
enable_testing()
# Don't include fboss/agent/test/ArpBenchmark.cpp
# It depends on the Sim implementation and needs its own target
add_executable(agent_test
fboss/agent/test/TestUtils.cpp
fboss/agent/test/ArpTest.cpp
fboss/agent/test/CounterCache.cpp
fboss/agent/test/DHCPv4HandlerTest.cpp
fboss/agent/test/EcmpSetupHelper.cpp
fboss/agent/test/ICMPTest.cpp
fboss/agent/test/IPv4Test.cpp
fboss/agent/test/LldpManagerTest.cpp
fboss/agent/test/MockTunManager.cpp
fboss/agent/test/NDPTest.cpp
fboss/agent/test/RouteUpdateLoggerTest.cpp
fboss/agent/test/RouteUpdateLoggingTrackerTest.cpp
fboss/agent/test/StaticRoutes.cpp
fboss/agent/test/TestPacketFactory.cpp
fboss/agent/test/ThriftTest.cpp
fboss/agent/test/TunInterfaceTest.cpp
fboss/agent/test/UDPTest.cpp
fboss/agent/test/oss/Main.cpp
)
target_compile_definitions(agent_test
PUBLIC
${LIBGMOCK_DEFINES}
)
target_include_directories(agent_test
PUBLIC
${LIBGMOCK_INCLUDE_DIR}
)
target_link_libraries(agent_test
fboss_agent
${GTEST}
${CMAKE_THREAD_LIBS_INIT}
${LIBGMOCK_LIBRARIES}
)
add_test(test agent_test)
#TODO: Add tests from other folders aside from agent/test
install(TARGETS bcm_test)
install(TARGETS wedge_agent)