From: srit Date: Sat, 17 Apr 2010 03:56:28 +0000 (+0000) Subject: Named ggo functions to avoid linker warnings when several _ggo.c files are included... X-Git-Tag: v1.2.0~721 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=e79c7f94a4c1a8c79e0c4090922b796532192b62;p=clitk.git Named ggo functions to avoid linker warnings when several _ggo.c files are included in one library --- diff --git a/cmake/common.cmake b/cmake/common.cmake index f4babb8..c5aac65 100644 --- a/cmake/common.cmake +++ b/cmake/common.cmake @@ -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 diff --git a/common/clitkCommon.h b/common/clitkCommon.h index f368946..4087259 100644 --- a/common/clitkCommon.h +++ b/common/clitkCommon.h @@ -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 #