]> Creatis software - clitk.git/commitdiff
Named ggo functions to avoid linker warnings when several _ggo.c files are included...
authorsrit <srit>
Sat, 17 Apr 2010 03:56:28 +0000 (03:56 +0000)
committersrit <srit>
Sat, 17 Apr 2010 03:56:28 +0000 (03:56 +0000)
cmake/common.cmake
common/clitkCommon.h

index f4babb8ec3e1ab40c9111994db4e16c9f041bf7b..c5aac656907146989426622abd5486055c49a116 100644 (file)
@@ -17,6 +17,7 @@ MACRO (WRAP_GGO GGO_SRCS)
                            ARGS < ${GGO_FILE_ABS}
                                   --output-dir=${CMAKE_CURRENT_BINARY_DIR}
                                   --arg-struct-name=args_info_${GGO_BASEFILENAME}
+                                  --func-name=cmdline_parser_${GGO_BASEFILENAME}
                                   --file-name=${GGO_BASEFILENAME}_ggo
                                   --unamed-opts
                                   --conf-parser
index f36894652b45a002d61103b677c72cd4e69b613a..4087259d07feb1c70aff82e97557398995890785 100644 (file)
@@ -50,10 +50,10 @@ namespace clitk {
   // GGO with modified struct name
 #define GGO(ggo_filename, args_info)                                    \
   args_info_##ggo_filename args_info;                                  \
-  cmdline_parser2(argc, argv, &args_info, 1, 1, 0);                    \
+  cmdline_parser_##ggo_filename##2(argc, argv, &args_info, 1, 1, 0);                   \
   if (args_info.config_given)                                          \
-    cmdline_parser_configfile (args_info.config_arg, &args_info, 0, 0, 1); \
-  else cmdline_parser(argc, argv, &args_info);  
+    cmdline_parser_##ggo_filename##_configfile (args_info.config_arg, &args_info, 0, 0, 1); \
+  else cmdline_parser_##ggo_filename(argc, argv, &args_info);  
 
   //--------------------------------------------------------------------
   // skip line with #