add vscode settings

This commit is contained in:
springzfx
2020-07-15 01:02:10 +08:00
parent cba7800e2b
commit 538f1722cf
3 changed files with 24 additions and 6 deletions

15
.vscode/c_cpp_properties.json vendored Normal file
View File

@@ -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
}

7
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,7 @@
{
"cmake.configureOnOpen": true,
"cmake.configureArgs": [
"-Dbuild_static=OFF",
"-Dbuild_execsnoop_dl=OFF"
]
}

View File

@@ -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)