Added "header guard" to prevent multiple definitions of the library target.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user