David Graf has proposed merging lp:~zorba-coders/zorba/module-depends into 
lp:zorba.

Commit message:
Additional optional parameter for DECLARE_ZORBA_MODULE macro to pass targets 
the declared module depends on.

Requested reviews:
  David Graf (davidagraf)
  Till Westmann (tillw)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/module-depends/+merge/130784

Additional optional parameter for DECLARE_ZORBA_MODULE macro to pass targets 
the declared module depends on.
-- 
https://code.launchpad.net/~zorba-coders/zorba/module-depends/+merge/130784
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'cmake_modules/ZorbaModule.cmake'
--- cmake_modules/ZorbaModule.cmake	2012-10-08 12:09:36 +0000
+++ cmake_modules/ZorbaModule.cmake	2012-10-22 11:42:20 +0000
@@ -118,6 +118,7 @@
 #              information; see below
 #       TEST_ONLY - (optional) Module is for testcases only and should not
 #              be installed
+#       DEPENDS - (optional) List of targets the module depends on
 #
 # CONFIG_FILES - any files specific here will be copied to
 # CMAKE_CURRENT_BINARY_DIR using CONFIGURE_FILE(). They may contain
@@ -136,7 +137,7 @@
 # file enough to deduce the URI and version?
 MACRO (DECLARE_ZORBA_MODULE)
   # Parse and validate arguments
-  PARSE_ARGUMENTS(MODULE "LINK_LIBRARIES;EXTRA_SOURCES;CONFIG_FILES"
+  PARSE_ARGUMENTS(MODULE "LINK_LIBRARIES;EXTRA_SOURCES;CONFIG_FILES;DEPENDS"
     "URI;FILE;VERSION" "TEST_ONLY" ${ARGN})
   IF (NOT MODULE_FILE)
     MESSAGE (FATAL_ERROR "'FILE' argument is required for ZORBA_DECLARE_MODULE()")
@@ -268,6 +269,9 @@
     # the module *URI*'s final component.
     SET(module_lib_target "modlib${num_zorba_modules}_${module_name}")
     ADD_LIBRARY(${module_lib_target} SHARED ${SRC_FILES})
+    IF (MODULE_DEPENDS)
+      ADD_DEPENDENCIES(${module_lib_target} ${MODULE_DEPENDS})
+    ENDIF()
     GET_FILENAME_COMPONENT(module_filewe "${module_filename}" NAME_WE)
     IF (MODULE_VERSION)
       # If there's a version, insert it into the module library name

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to