From: Brenden Blanco Date: Thu, 24 Aug 2017 17:59:46 +0000 (-0700) Subject: Fix compile errors with ENABLE_USDT=Off X-Git-Tag: submit/tizen_4.0/20171018.110122~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=86bcc27de8bd4bb42635183156b22c10f4ca83ab;p=platform%2Fupstream%2Fbcc.git Fix compile errors with ENABLE_USDT=Off Signed-off-by: Brenden Blanco --- diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 55e92b60..c63553d0 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -2,7 +2,9 @@ set(EXAMPLE_PROGRAMS hello_world.py) install(PROGRAMS ${EXAMPLE_PROGRAMS} DESTINATION share/bcc/examples) if(ENABLE_CLANG_JIT) +if(ENABLE_USDT) add_subdirectory(cpp) +endif(ENABLE_USDT) add_subdirectory(lua) add_subdirectory(networking) add_subdirectory(tracing) diff --git a/tests/cc/CMakeLists.txt b/tests/cc/CMakeLists.txt index 373bfcb7..6d285152 100644 --- a/tests/cc/CMakeLists.txt +++ b/tests/cc/CMakeLists.txt @@ -9,6 +9,7 @@ target_link_libraries(test_static bcc-static) add_test(NAME c_test_static COMMAND ${TEST_WRAPPER} c_test_static sudo ${CMAKE_CURRENT_BINARY_DIR}/test_static) +if(ENABLE_USDT) add_executable(test_libbcc test_libbcc.cc test_c_api.cc @@ -25,3 +26,4 @@ find_path(SDT_HEADER NAMES "sys/sdt.h") if (SDT_HEADER) target_compile_definitions(test_libbcc PRIVATE HAVE_SDT_HEADER=1) endif() +endif(ENABLE_USDT)