summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-03-21 17:28:09 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-03-21 17:28:09 (GMT)
commita407291c5de696a543c36e96aa727c46df84a60a (patch)
tree7aeaffa7f0b85218f55e1b8fcc96d4520a125652 /Modules
parent44495fa78c97de9b28e5828932ec1c68c648fa13 (diff)
parent1ab4b3e123ad6681f420244b4a944df550af6050 (diff)
downloadCMake-a407291c5de696a543c36e96aa727c46df84a60a.zip
CMake-a407291c5de696a543c36e96aa727c46df84a60a.tar.gz
CMake-a407291c5de696a543c36e96aa727c46df84a60a.tar.bz2
Merge topic 'MinorFixForEcos'
1ab4b3e guard eCos.cmake against multiple inclusion (#12987)
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