From d9c9b5576644625813d149b2431631a66e460a20 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Fri, 5 Oct 2018 08:02:34 +0200 Subject: [PATCH] CMake: add an include guard since files are intended to be included in other projects --- contrib/Filelists.cmake | 2 ++ contrib/ports/CMakeCommon.cmake | 2 ++ contrib/ports/unix/Filelists.cmake | 2 ++ contrib/ports/win32/Filelists.cmake | 2 ++ src/Filelists.cmake | 2 ++ test/unit/Filelists.cmake | 2 ++ 6 files changed, 12 insertions(+) diff --git a/contrib/Filelists.cmake b/contrib/Filelists.cmake index ce1af3d6..fc9f4741 100644 --- a/contrib/Filelists.cmake +++ b/contrib/Filelists.cmake @@ -8,6 +8,8 @@ # The intention is to provide greater flexibility to users to # create their own targets using the *_SRCS variables. +include_guard(GLOBAL) + set(lwipcontribexamples_SRCS ${LWIP_CONTRIB_DIR}/examples/httpd/fs_example/fs_example.c ${LWIP_CONTRIB_DIR}/examples/httpd/ssi_example/ssi_example.c diff --git a/contrib/ports/CMakeCommon.cmake b/contrib/ports/CMakeCommon.cmake index 3ef478bb..8048fa2e 100644 --- a/contrib/ports/CMakeCommon.cmake +++ b/contrib/ports/CMakeCommon.cmake @@ -1,3 +1,5 @@ +include_guard(GLOBAL) + set(LWIP_CONTRIB_DIR ${LWIP_DIR}/contrib) # ARM mbedtls support https://tls.mbed.org/ diff --git a/contrib/ports/unix/Filelists.cmake b/contrib/ports/unix/Filelists.cmake index 83f02956..3301dfdf 100644 --- a/contrib/ports/unix/Filelists.cmake +++ b/contrib/ports/unix/Filelists.cmake @@ -8,6 +8,8 @@ # The intention is to provide greater flexibility to users to # create their own targets using the *_SRCS variables. +include_guard(GLOBAL) + set(lwipcontribportunix_SRCS ${LWIP_CONTRIB_DIR}/ports/unix/port/sys_arch.c ${LWIP_CONTRIB_DIR}/ports/unix/port/perf.c diff --git a/contrib/ports/win32/Filelists.cmake b/contrib/ports/win32/Filelists.cmake index a6e6b5b5..9a05803d 100644 --- a/contrib/ports/win32/Filelists.cmake +++ b/contrib/ports/win32/Filelists.cmake @@ -8,6 +8,8 @@ # The intention is to provide greater flexibility to users to # create their own targets using the *_SRCS variables. +include_guard(GLOBAL) + set(lwipcontribportwindows_SRCS ${LWIP_CONTRIB_DIR}/ports/win32/sys_arch.c ${LWIP_CONTRIB_DIR}/ports/win32/sio.c diff --git a/src/Filelists.cmake b/src/Filelists.cmake index 6432950e..ef1687c7 100644 --- a/src/Filelists.cmake +++ b/src/Filelists.cmake @@ -8,6 +8,8 @@ # The intention is to provide greater flexibility to users to # create their own targets using the *_SRCS variables. +include_guard(GLOBAL) + set(LWIP_VERSION_MAJOR "2") set(LWIP_VERSION_MINOR "2") set(LWIP_VERSION_REVISION "0") diff --git a/test/unit/Filelists.cmake b/test/unit/Filelists.cmake index e1f40bc9..480c4bdf 100644 --- a/test/unit/Filelists.cmake +++ b/test/unit/Filelists.cmake @@ -8,6 +8,8 @@ # The intention is to provide greater flexibility to users to # create their own targets using the *_SRCS variables. +include_guard(GLOBAL) + set(LWIP_TESTDIR ${LWIP_DIR}/test/unit) set(LWIP_TESTFILES ${LWIP_TESTDIR}/lwip_unittests.c