Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
Signed-off-by: Brenden Blanco <[email protected]>
  • Loading branch information
Brenden Blanco committed May 2, 2015
1 parent a94bd93 commit cd5cb41
Show file tree
Hide file tree
Showing 55 changed files with 1,492 additions and 2,748 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.swp
*.swo
13 changes: 12 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
cmake_minimum_required(VERSION 2.8.7)

project(bpf-tools)
set(CMAKE_BUILD_TYPE Debug)

enable_testing()

find_package(BISON)
find_package(FLEX)
find_package(LLVM REQUIRED CONFIG)
message(STATUS "Found LLVM: ${LLVM_INCLUDE_DIRS}")
find_program(XXD xxd)
if (${XXD} STREQUAL "XXD-NOTFOUND")
message(FATAL_ERROR "program xxd not found, install vim-common")
Expand All @@ -13,8 +17,15 @@ find_program(CLANG clang)
if (${CLANG} STREQUAL "CLANG-NOTFOUND")
message(FATAL_ERROR "program clang not found, install clang with bpf support")
endif()
execute_process(COMMAND ${CLANG} --version OUTPUT_VARIABLE CLANG_VERSION_RAW)
string(REGEX MATCH "[0-9]+[.][0-9]+[.][0-9]+" CLANG_VERSION ${CLANG_VERSION_RAW})
message(STATUS "Found CLANG: ${CLANG} (found version \"${CLANG_VERSION}\")")
if (CLANG_VERSION VERSION_LESS 3.6.0)
message(FATAL_ERROR "requires clang version >= 3.6.0, ${CLANG_VERSION} found")
endif()

set(CMAKE_C_FLAGS "-Wall")
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall")

add_subdirectory(jit)
add_subdirectory(src)
add_subdirectory(tests)
7 changes: 0 additions & 7 deletions jit/CMakeLists.txt

This file was deleted.

4 changes: 0 additions & 4 deletions jit/src/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit cd5cb41

Please sign in to comment.