diff options
author | npmccallum <npmccallum@c587cffe-e639-0410-9787-d7902ae8ed56> | 2010-02-11 23:07:11 +0000 |
---|---|---|
committer | npmccallum <npmccallum@c587cffe-e639-0410-9787-d7902ae8ed56> | 2010-02-11 23:07:11 +0000 |
commit | ee966c23a3e87ce4c89bf2cebf38f98a35956efa (patch) | |
tree | 7940e038c48c158d7d18288233883718666c9382 /libmodman | |
parent | ddb74a0f9b3f922dba8041cd25b28bdfb7326471 (diff) | |
download | libproxy-git-ee966c23a3e87ce4c89bf2cebf38f98a35956efa.tar.gz |
add smod everywhere
Diffstat (limited to 'libmodman')
-rw-r--r-- | libmodman/module.hpp | 8 | ||||
-rw-r--r-- | libmodman/test/CMakeLists.txt | 21 | ||||
-rw-r--r-- | libmodman/test/modules/module.cpp.in | 2 |
3 files changed, 16 insertions, 15 deletions
diff --git a/libmodman/module.hpp b/libmodman/module.hpp index ef339f9..39cab52 100644 --- a/libmodman/module.hpp +++ b/libmodman/module.hpp @@ -36,10 +36,10 @@ #define MM_MODULE_DEFINE __MOD_DEF_PREFIX struct libmodman::module __MM_DLL_EXPORT MM_MODULE_NAME[] #define MM_MODULE_LAST { MM_MODULE_VERSION, NULL, NULL, NULL, NULL, NULL } -#define MM_MODULE_RECORD(type, init, test, symb) \ - { MM_MODULE_VERSION, type::base_type(), init, test, symb, NULL } +#define MM_MODULE_RECORD(type, init, test, symb, smod) \ + { MM_MODULE_VERSION, type::base_type(), init, test, symb, smod } -#define MM_MODULE_EZ(clsname, cond, symb) \ +#define MM_MODULE_EZ(clsname, cond, symb, smod) \ static bool clsname ## _test() { \ return (cond); \ } \ @@ -50,7 +50,7 @@ return retval; \ } \ MM_MODULE_DEFINE = { \ - MM_MODULE_RECORD(clsname, clsname ## _init, clsname ## _test, symb), \ + MM_MODULE_RECORD(clsname, clsname ## _init, clsname ## _test, symb, smod), \ MM_MODULE_LAST, \ }; diff --git a/libmodman/test/CMakeLists.txt b/libmodman/test/CMakeLists.txt index aa8ff61..a077866 100644 --- a/libmodman/test/CMakeLists.txt +++ b/libmodman/test/CMakeLists.txt @@ -1,5 +1,5 @@ ### Functions
-function(mm_create_module MODTYPE MODNAME MODCOND MODSYMB)
+function(mm_create_module MODTYPE MODNAME MODCOND MODSYMB MODSMOD)
configure_file(modules/module.cpp.in libmodman/test/${MODTYPE}_${MODNAME}.cpp @ONLY)
if(NOT IS_DIRECTORY modules/${MODTYPE})
file(MAKE_DIRECTORY modules/${MODTYPE})
@@ -20,17 +20,18 @@ function(mm_create_program name EXTTYPE) endfunction(mm_create_program)
### Modules
-mm_create_module(condition one false NULL)
-mm_create_module(condition two true NULL)
-mm_create_module(singleton one true NULL)
-mm_create_module(singleton two true NULL)
-mm_create_module(sorted one true NULL)
-mm_create_module(sorted two true NULL)
-mm_create_module(symbol one true \"asdfoia\")
+mm_create_module(condition one false NULL NULL)
+mm_create_module(condition two true NULL NULL)
+mm_create_module(singleton one true NULL NULL)
+mm_create_module(singleton two true NULL NULL)
+mm_create_module(sorted one true NULL NULL)
+mm_create_module(sorted two true NULL NULL)
if (WIN32)
-mm_create_module(symbol two true \"recv\")
+mm_create_module(symbol one true \"asdfoia\" \"ws2_32\")
+mm_create_module(symbol two true \"recv\" \"ws2_32\")
else()
-mm_create_module(symbol two true \"deflate\")
+mm_create_module(symbol one true \"asdfoia\" \"z\")
+mm_create_module(symbol two true \"deflate\" \"z\")
endif()
### Programs
diff --git a/libmodman/test/modules/module.cpp.in b/libmodman/test/modules/module.cpp.in index edfc143..41ccd25 100644 --- a/libmodman/test/modules/module.cpp.in +++ b/libmodman/test/modules/module.cpp.in @@ -21,4 +21,4 @@ #include <libmodman/module.hpp> class @MODNAME@ : public @MODTYPE@_extension {}; -MM_MODULE_EZ(@MODNAME@, @MODCOND@, @MODSYMB@); +MM_MODULE_EZ(@MODNAME@, @MODCOND@, @MODSYMB@, @MODSMOD@); |