From 538f1722cfa311aaaa2d414e0dbf9fa93d9a0768 Mon Sep 17 00:00:00 2001 From: springzfx Date: Wed, 15 Jul 2020 01:02:10 +0800 Subject: [PATCH] add vscode settings --- .vscode/c_cpp_properties.json | 15 +++++++++++++++ .vscode/settings.json | 7 +++++++ execsnoop-kernel/CMakeLists.txt | 8 ++------ 3 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 .vscode/c_cpp_properties.json create mode 100644 .vscode/settings.json diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..4a3bf66 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,15 @@ +{ + "configurations": [ + { + "name": "Linux", + "includePath": [], + "defines": ["USE_VMLINUX"], + "compilerPath": "/usr/bin/gcc", + "cStandard": "c18", + "cppStandard": "gnu++17", + "intelliSenseMode": "gcc-x64", + "configurationProvider": "ms-vscode.cmake-tools" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..7fcbddc --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "cmake.configureOnOpen": true, + "cmake.configureArgs": [ + "-Dbuild_static=OFF", + "-Dbuild_execsnoop_dl=OFF" + ] +} \ No newline at end of file diff --git a/execsnoop-kernel/CMakeLists.txt b/execsnoop-kernel/CMakeLists.txt index ee4a6cc..1b3bf0e 100644 --- a/execsnoop-kernel/CMakeLists.txt +++ b/execsnoop-kernel/CMakeLists.txt @@ -1,12 +1,8 @@ # find libbpf if (build_static) - find_library(LIBBPF libbpf.a) + find_library(LIBBPF libbpf.a REQUIRED) else() - find_library(LIBBPF bpf) -endif() - -if (LIBBPF-NOTFOUND) - message(FATAL_ERROR "libbpf not found") + find_library(LIBBPF bpf REQUIRED) endif() if (build_execsnoop_dl)