Added "header guard" to prevent multiple definitions of the library target.
Test And Build / Format (push) Failing after 2s
Test And Build / Lint (push) Failing after 4s

This commit is contained in:
2026-05-07 11:34:08 +02:00
parent d14be22b7a
commit 3d68e40c8d
+6
View File
@@ -2,6 +2,12 @@ cmake_minimum_required(VERSION 3.03)
project(tcpip VERSION 0.1)
# If the target already exists in a project (e.g. if tcpip is included multiple time as a submodule of submodules),
# this "header guard"-style check prevents defining the same target multiple times (which will lead to CMake errors).
if(TARGET tcpip)
return()
endif()
add_compile_options(
-Wall
-Wformat=2