diff --git a/contrib/Filelists.cmake b/contrib/Filelists.cmake index 4e53e924..f2b31f09 100644 --- a/contrib/Filelists.cmake +++ b/contrib/Filelists.cmake @@ -8,7 +8,9 @@ # The intention is to provide greater flexibility to users to # create their own targets using the *_SRCS variables. -include_guard(GLOBAL) +if(NOT ${CMAKE_VERSION} VERSION_LESS "3.10.0") + include_guard(GLOBAL) +endif() include(${LWIP_DIR}/contrib/ports/CMakeCommon.cmake) diff --git a/contrib/ports/CMakeCommon.cmake b/contrib/ports/CMakeCommon.cmake index 57e7d841..90735114 100644 --- a/contrib/ports/CMakeCommon.cmake +++ b/contrib/ports/CMakeCommon.cmake @@ -1,4 +1,6 @@ -include_guard(GLOBAL) +if(NOT ${CMAKE_VERSION} VERSION_LESS "3.10.0") + include_guard(GLOBAL) +endif() set(LWIP_CONTRIB_DIR ${LWIP_DIR}/contrib) diff --git a/contrib/ports/unix/Filelists.cmake b/contrib/ports/unix/Filelists.cmake index fb62b678..af68117c 100644 --- a/contrib/ports/unix/Filelists.cmake +++ b/contrib/ports/unix/Filelists.cmake @@ -8,7 +8,9 @@ # The intention is to provide greater flexibility to users to # create their own targets using the *_SRCS variables. -include_guard(GLOBAL) +if(NOT ${CMAKE_VERSION} VERSION_LESS "3.10.0") + include_guard(GLOBAL) +endif() include(${LWIP_DIR}/contrib/ports/CMakeCommon.cmake) diff --git a/contrib/ports/win32/Filelists.cmake b/contrib/ports/win32/Filelists.cmake index 1660feff..48b1e788 100644 --- a/contrib/ports/win32/Filelists.cmake +++ b/contrib/ports/win32/Filelists.cmake @@ -8,7 +8,9 @@ # The intention is to provide greater flexibility to users to # create their own targets using the *_SRCS variables. -include_guard(GLOBAL) +if(NOT ${CMAKE_VERSION} VERSION_LESS "3.10.0") + include_guard(GLOBAL) +endif() include(${LWIP_DIR}/contrib/ports/CMakeCommon.cmake) diff --git a/src/Filelists.cmake b/src/Filelists.cmake index 96a4f8c1..f1bb45f8 100644 --- a/src/Filelists.cmake +++ b/src/Filelists.cmake @@ -8,7 +8,9 @@ # The intention is to provide greater flexibility to users to # create their own targets using the *_SRCS variables. -include_guard(GLOBAL) +if(NOT ${CMAKE_VERSION} VERSION_LESS "3.10.0") + include_guard(GLOBAL) +endif() include(${LWIP_DIR}/contrib/ports/CMakeCommon.cmake) diff --git a/test/unit/Filelists.cmake b/test/unit/Filelists.cmake index 480c4bdf..7c7d1f13 100644 --- a/test/unit/Filelists.cmake +++ b/test/unit/Filelists.cmake @@ -5,10 +5,12 @@ # # This file is NOT designed (on purpose) to be used as cmake # subdir via add_subdirectory() -# The intention is to provide greater flexibility to users to +# The intention is to provide greater flexibility to users to # create their own targets using the *_SRCS variables. -include_guard(GLOBAL) +if(NOT ${CMAKE_VERSION} VERSION_LESS "3.10.0") + include_guard(GLOBAL) +endif() set(LWIP_TESTDIR ${LWIP_DIR}/test/unit) set(LWIP_TESTFILES