• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) Facebook, Inc.
2# Licensed under the Apache License, Version 2.0 (the "License")
3
4include_directories(${CMAKE_SOURCE_DIR}/src/cc)
5include_directories(${CMAKE_SOURCE_DIR}/src/cc/api)
6
7option(INSTALL_CPP_EXAMPLES "Install C++ examples. Those binaries are statically linked and can take plenty of disk space" OFF)
8
9add_executable(HelloWorld HelloWorld.cc)
10target_link_libraries(HelloWorld bcc-static)
11
12add_executable(CPUDistribution CPUDistribution.cc)
13target_link_libraries(CPUDistribution bcc-static)
14
15add_executable(RecordMySQLQuery RecordMySQLQuery.cc)
16target_link_libraries(RecordMySQLQuery bcc-static)
17
18add_executable(TCPSendStack TCPSendStack.cc)
19target_link_libraries(TCPSendStack bcc-static)
20
21add_executable(RandomRead RandomRead.cc)
22target_link_libraries(RandomRead bcc-static)
23
24add_executable(LLCStat LLCStat.cc)
25target_link_libraries(LLCStat bcc-static)
26
27add_executable(FollyRequestContextSwitch FollyRequestContextSwitch.cc)
28target_link_libraries(FollyRequestContextSwitch bcc-static)
29
30add_executable(UseExternalMap UseExternalMap.cc)
31target_link_libraries(UseExternalMap bcc-static)
32
33if(INSTALL_CPP_EXAMPLES)
34  install (TARGETS HelloWorld DESTINATION share/bcc/examples/cpp)
35  install (TARGETS CPUDistribution DESTINATION share/bcc/examples/cpp)
36  install (TARGETS RecordMySQLQuery DESTINATION share/bcc/examples/cpp)
37  install (TARGETS TCPSendStack DESTINATION share/bcc/examples/cpp)
38  install (TARGETS RandomRead DESTINATION share/bcc/examples/cpp)
39  install (TARGETS LLCStat DESTINATION share/bcc/examples/cpp)
40  install (TARGETS FollyRequestContextSwitch DESTINATION share/bcc/examples/cpp)
41  install (TARGETS UseExternalMap DESTINATION share/bcc/examples/cpp)
42endif(INSTALL_CPP_EXAMPLES)
43