numam/CMakeLists.txt

37 lines
919 B
CMake
Raw Normal View History

2020-11-13 14:46:27 +00:00
cmake_minimum_required(VERSION 3.0)
2020-11-17 01:07:50 +00:00
find_program(CC_GCC gcc)
find_program(CXX_GCC g++)
set(CMAKE_C_COMPILER ${CC_GCC})
set(CMAKE_CXX_COMPILER ${CXX_GCC})
2020-11-13 14:46:27 +00:00
project(khat)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}")
find_package(dpdk REQUIRED)
2020-11-18 01:01:55 +00:00
set(CC_FLAGS -O2 -g -Wall -Wextra -Werror -std=c++11
-Wno-deprecated-declarations
-Wno-packed-not-aligned
-Wno-address-of-packed-member
-Wno-zero-length-array
-Wno-gnu-zero-variadic-macro-arguments
-msse4
-mavx)
2020-11-13 14:46:27 +00:00
include_directories(${CMAKE_SOURCE_DIR}/inc)
include_directories(${dpdk_INCLUDE_DIRS})
add_executable(khat khat/khat.cc )
add_executable(cat cat/cat.cc cat/generator.cc)
2020-11-13 14:46:27 +00:00
2020-11-17 01:07:50 +00:00
set(LINK_LIBS ${dpdk_LIBRARIES} pthread)
2020-11-13 14:46:27 +00:00
target_link_libraries(khat ${LINK_LIBS})
target_compile_options(khat PRIVATE ${CC_FLAGS})
target_link_libraries(cat ${LINK_LIBS})
target_compile_options(cat PRIVATE ${CC_FLAGS})