move api and create dependent option
authorBrenden Blanco <bblanco@gmail.com>
Thu, 29 Jun 2017 00:37:06 +0000 (17:37 -0700)
committerBrenden Blanco <bblanco@gmail.com>
Fri, 25 Aug 2017 23:41:36 +0000 (16:41 -0700)
commit71fc3d5c890f57fb7f979c6176d97da0f04d0801
treecd24d732b38451f5e2d54ace5ab3f5ae12eeadd3
parent1614ce77b505eca0440ead0b80558c86a36d17ba
move api and create dependent option

Move the C++ api files under a new subdirectory.
Use CMAKE_DEPENDENT_OPTION to enforce sdt->cpp_api relationship.

Since linking .a into a .so can cause global symbols to be dropped, add
a helper file to force exported symbols to be retained (link_all.cc).
This problem doesn't exist for building the static cpp examples.

Signed-off-by: Brenden Blanco <bblanco@gmail.com>
CMakeLists.txt
examples/cpp/CMakeLists.txt
src/cc/CMakeLists.txt
src/cc/api/BPF.cc [moved from src/cc/BPF.cc with 100% similarity]
src/cc/api/BPF.h [moved from src/cc/BPF.h with 100% similarity]
src/cc/api/BPFTable.cc [moved from src/cc/BPFTable.cc with 100% similarity]
src/cc/api/BPFTable.h [moved from src/cc/BPFTable.h with 100% similarity]
src/cc/api/CMakeLists.txt [new file with mode: 0644]
src/cc/link_all.cc [new file with mode: 0644]
tests/cc/CMakeLists.txt