List:Commits« Previous MessageNext Message »
From:Jonathan Perkin Date:August 9 2010 2:41pm
Subject:bzr commit into mysql-5.5-itch branch (jonathan.perkin:3079)
View as plain text  
#At file:///Users/jonathan/bzr/mysql-5.5-itch/ based on revid:jonathan.perkin@stripped

 3079 Jonathan Perkin	2010-08-09
      Don't try to remove from an empty list.

    modified:
      scripts/CMakeLists.txt
=== modified file 'scripts/CMakeLists.txt'
--- a/scripts/CMakeLists.txt	2010-08-09 13:27:04 +0000
+++ b/scripts/CMakeLists.txt	2010-08-09 14:41:15 +0000
@@ -253,24 +253,26 @@ ENDIF()
 # Extract dependencies using CMake's internal ${target}_LIB_DEPENDS variable
 # returned string in ${var} is can be passed to linker's command line
 MACRO(EXTRACT_LINK_LIBRARIES target var)
-  LIST(REMOVE_ITEM ${target}_LIB_DEPENDS "")
-  LIST(REMOVE_DUPLICATES ${target}_LIB_DEPENDS)
-  FOREACH(lib ${${target}_LIB_DEPENDS})
-    # Filter out "general", it is not a library, just CMake hint
-    # Also, remove duplicates
-    IF(NOT lib STREQUAL "general" AND NOT ${var}  MATCHES "-l${lib} ")
-      IF (lib MATCHES "^\\-l")
-        SET(${var} "${${var}} ${lib} ") 
-      ELSEIF(lib MATCHES "^/")
-        # Full path, convert to just filename, strip "lib" prefix and extension
-        GET_FILENAME_COMPONENT(lib "${lib}" NAME_WE)
-        STRING(REGEX REPLACE "^lib" "" lib "${lib}")
-        SET(${var} "${${var}}-l${lib} " ) 
-      ELSE()
-        SET(${var} "${${var}}-l${lib} " ) 
+  IF(${target}_LIB_DEPENDS)
+    LIST(REMOVE_ITEM ${target}_LIB_DEPENDS "")
+    LIST(REMOVE_DUPLICATES ${target}_LIB_DEPENDS)
+    FOREACH(lib ${${target}_LIB_DEPENDS})
+      # Filter out "general", it is not a library, just CMake hint
+      # Also, remove duplicates
+      IF(NOT lib STREQUAL "general" AND NOT ${var}  MATCHES "-l${lib} ")
+        IF (lib MATCHES "^\\-l")
+          SET(${var} "${${var}} ${lib} ") 
+        ELSEIF(lib MATCHES "^/")
+          # Full path, convert to just filename, strip "lib" prefix and extension
+          GET_FILENAME_COMPONENT(lib "${lib}" NAME_WE)
+          STRING(REGEX REPLACE "^lib" "" lib "${lib}")
+          SET(${var} "${${var}}-l${lib} " ) 
+        ELSE()
+          SET(${var} "${${var}}-l${lib} " ) 
+        ENDIF()
       ENDIF()
-    ENDIF()
-  ENDFOREACH()
+    ENDFOREACH()
+  ENDIF()
   IF(MSVC)
     STRING(REPLACE "-l" "" ${var} "${${var}}")
   ENDIF()


Attachment: [text/bzr-bundle] bzr/jonathan.perkin@oracle.com-20100809144115-a8r9zqh3drf2zkfi.bundle
Thread
bzr commit into mysql-5.5-itch branch (jonathan.perkin:3079) Jonathan Perkin9 Aug