srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt60
1 files changed, 30 insertions, 30 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 264fcc4..0db3e85 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.20)
-project(wireframe CXX)
+project(packeteer CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -22,9 +22,9 @@ FetchContent_Declare(
)
FetchContent_MakeAvailable(ftxui)
-add_executable(wireframe src/main.cpp)
-target_include_directories(wireframe PRIVATE include)
-target_link_libraries(wireframe PRIVATE
+add_executable(packeteer src/main.cpp)
+target_include_directories(packeteer PRIVATE include)
+target_link_libraries(packeteer PRIVATE
pcap
Threads::Threads
ftxui::component
@@ -37,9 +37,9 @@ target_link_libraries(wireframe PRIVATE
# Linux-specific socket family, unlike the portable libpcap path the
# rest of this project uses - only built on Linux.
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
- add_executable(wireframe_afpacket_demo src/afpacket_capture.cpp)
- target_include_directories(wireframe_afpacket_demo PRIVATE include)
- target_link_libraries(wireframe_afpacket_demo PRIVATE pcap)
+ add_executable(packeteer_afpacket_demo src/afpacket_capture.cpp)
+ target_include_directories(packeteer_afpacket_demo PRIVATE include)
+ target_link_libraries(packeteer_afpacket_demo PRIVATE pcap)
endif()
# GUI (secondary to the TUI - see PLAN.md Decisions). Dear ImGui +
@@ -79,9 +79,9 @@ add_library(imgui STATIC
target_include_directories(imgui PUBLIC ${imgui_SOURCE_DIR} ${imgui_SOURCE_DIR}/backends)
target_link_libraries(imgui PUBLIC SDL3::SDL3)
-add_executable(wireframe_gui src/gui_main.cpp)
-target_include_directories(wireframe_gui PRIVATE include)
-target_link_libraries(wireframe_gui PRIVATE pcap Threads::Threads imgui SDL3::SDL3)
+add_executable(packeteer_gui src/gui_main.cpp)
+target_include_directories(packeteer_gui PRIVATE include)
+target_link_libraries(packeteer_gui PRIVATE pcap Threads::Threads imgui SDL3::SDL3)
enable_testing()
@@ -93,7 +93,7 @@ FetchContent_Declare(
)
FetchContent_MakeAvailable(doctest)
-add_executable(wireframe_tests
+add_executable(packeteer_tests
tests/main.cpp
tests/test_byteio.cpp
tests/test_net.cpp
@@ -114,24 +114,24 @@ add_executable(wireframe_tests
tests/test_checksum.cpp
tests/test_tcp_reassembly.cpp
)
-target_include_directories(wireframe_tests PRIVATE include)
-target_link_libraries(wireframe_tests PRIVATE doctest::doctest Threads::Threads pcap)
+target_include_directories(packeteer_tests PRIVATE include)
+target_link_libraries(packeteer_tests PRIVATE doctest::doctest Threads::Threads pcap)
-add_test(NAME wireframe_tests COMMAND wireframe_tests)
+add_test(NAME packeteer_tests COMMAND packeteer_tests)
# libFuzzer harnesses for the hand-rolled decoders - the actual point
# of this project (byte layout/alignment/UB) makes these the highest-
# value tests in the repo, not an afterthought. Opt-in and clang-only
# (libFuzzer is a clang/compiler-rt feature) so a normal `cmake --build`
# with the default compiler is unaffected.
-option(WIREFRAME_ENABLE_FUZZING "Build libFuzzer harnesses (requires clang)" OFF)
-if(WIREFRAME_ENABLE_FUZZING)
+option(PACKETEER_ENABLE_FUZZING "Build libFuzzer harnesses (requires clang)" OFF)
+if(PACKETEER_ENABLE_FUZZING)
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
- message(FATAL_ERROR "WIREFRAME_ENABLE_FUZZING requires clang (libFuzzer); "
+ message(FATAL_ERROR "PACKETEER_ENABLE_FUZZING requires clang (libFuzzer); "
"reconfigure with -DCMAKE_CXX_COMPILER=clang++")
endif()
- function(add_wireframe_fuzz_target name)
+ function(add_packeteer_fuzz_target name)
add_executable(${name} fuzz/${name}.cpp)
target_include_directories(${name} PRIVATE include)
target_link_libraries(${name} PRIVATE pcap)
@@ -139,16 +139,16 @@ if(WIREFRAME_ENABLE_FUZZING)
target_link_options(${name} PRIVATE -fsanitize=fuzzer,address,undefined)
endfunction()
- add_wireframe_fuzz_target(fuzz_ethernet)
- add_wireframe_fuzz_target(fuzz_ipv4)
- add_wireframe_fuzz_target(fuzz_ipv6)
- add_wireframe_fuzz_target(fuzz_tcp)
- add_wireframe_fuzz_target(fuzz_udp)
- add_wireframe_fuzz_target(fuzz_dns)
- add_wireframe_fuzz_target(fuzz_http)
- add_wireframe_fuzz_target(fuzz_tls)
- add_wireframe_fuzz_target(fuzz_pcapng_reader)
- add_wireframe_fuzz_target(fuzz_summarize)
- add_wireframe_fuzz_target(fuzz_checksum)
- add_wireframe_fuzz_target(fuzz_tcp_reassembly)
+ add_packeteer_fuzz_target(fuzz_ethernet)
+ add_packeteer_fuzz_target(fuzz_ipv4)
+ add_packeteer_fuzz_target(fuzz_ipv6)
+ add_packeteer_fuzz_target(fuzz_tcp)
+ add_packeteer_fuzz_target(fuzz_udp)
+ add_packeteer_fuzz_target(fuzz_dns)
+ add_packeteer_fuzz_target(fuzz_http)
+ add_packeteer_fuzz_target(fuzz_tls)
+ add_packeteer_fuzz_target(fuzz_pcapng_reader)
+ add_packeteer_fuzz_target(fuzz_summarize)
+ add_packeteer_fuzz_target(fuzz_checksum)
+ add_packeteer_fuzz_target(fuzz_tcp_reassembly)
endif()