summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAlex Neundorf <neundorf@kde.org>2012-03-20 21:13:47 (GMT)
committerAlex Neundorf <neundorf@kde.org>2012-03-20 21:13:47 (GMT)
commit1ab4b3e123ad6681f420244b4a944df550af6050 (patch)
tree036319a07e5eb75fd50cc586889d823a57b939e3 /Modules
parentd69c2c582584efaa34aa6e2ffc5eb80bacef1324 (diff)
downloadCMake-1ab4b3e123ad6681f420244b4a944df550af6050.zip
CMake-1ab4b3e123ad6681f420244b4a944df550af6050.tar.gz
CMake-1ab4b3e123ad6681f420244b4a944df550af6050.tar.bz2
guard eCos.cmake against multiple inclusion (#12987)
Alex
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Platform/eCos.cmake9
1 files changed, 8 insertions, 1 deletions
diff --git a/Modules/Platform/eCos.cmake b/Modules/Platform/eCos.cmake
index f0881c0..b437c1a 100644
--- a/Modules/Platform/eCos.cmake
+++ b/Modules/Platform/eCos.cmake
@@ -1,5 +1,12 @@
# support for eCos http://ecos.sourceware.org
-SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
+
+# Guard against multiple inclusion, which e.g. leads to multiple calls to add_definition() #12987
+IF(__ECOS_CMAKE_INCLUDED)
+ RETURN()
+ENDIF()
+SET(__ECOS_CMAKE_INCLUDED TRUE)
+
+SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "") # -shared
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath