From 5f89eea110d976b337c57d9c292bd860d2b9be8f Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 21 Sep 2016 15:54:41 +0200 Subject: [PATCH 01/16] Bump version to 1.1.0 --- CMakeLists.txt | 6 +++--- ChangeLog | 12 ++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 478929d..7f7dac4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,8 +7,8 @@ cmake_minimum_required(VERSION 2.6.0) set(APPLICATION_NAME ${PROJECT_NAME}) set(APPLICATION_VERSION_MAJOR "1") -set(APPLICATION_VERSION_MINOR "0") -set(APPLICATION_VERSION_PATCH "1") +set(APPLICATION_VERSION_MINOR "1") +set(APPLICATION_VERSION_PATCH "0") set(APPLICATION_VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}") @@ -19,7 +19,7 @@ set(APPLICATION_VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINO # Increment AGE. Set REVISION to 0 # If the source code was changed, but there were no interface changes: # Increment REVISION. -set(LIBRARY_VERSION "0.3.1") +set(LIBRARY_VERSION "0.4.0") set(LIBRARY_SOVERSION "0") # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked diff --git a/ChangeLog b/ChangeLog index 819d10f..0319c15 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +Wed Sep 21 2016 Andreas Schneider + * cmocka: version 1.1.0 + * Added support to catch multiple exceptions + * Added support to verify call ordering + * Added support to pass initial data to test cases + * Added will_return_maybe() for ignoring mock returns + * Added subtests for groups using TAP output + * Added support to write multiple XML files for groups + * Improved documentation + * Fixed XML output generataion + * Fixed Windows builds with VS2015 + Thu Mar 12 2015 Andreas Schneider * cmocka: version 1.0.1 * Added a macro for assert_ptr_equal(). -- 2.7.4 From b3ba4736579f9c4ac1ea746469233b1fdfd0cd8f Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 21 Sep 2016 16:30:39 +0200 Subject: [PATCH 02/16] cpack: Ignore all object directories --- CPackConfig.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CPackConfig.cmake b/CPackConfig.cmake index 574c8e5..8d427a3 100644 --- a/CPackConfig.cmake +++ b/CPackConfig.cmake @@ -19,7 +19,7 @@ set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSIO ### source generator set(CPACK_SOURCE_GENERATOR "TGZ") -set(CPACK_SOURCE_IGNORE_FILES "~$;[.]swp$;/[.]svn/;/[.]git/;.gitignore;/obj*/;tags;cscope.*;.ycm_extra_conf.pyc") +set(CPACK_SOURCE_IGNORE_FILES "~$;[.]swp$;/[.]svn/;/[.]git/;.gitignore;/obj*;tags;cscope.*;.ycm_extra_conf.pyc") set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") if (WIN32) -- 2.7.4 From 93d9b7748298a00e0fc42190072db16d678eb974 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Thu, 29 Sep 2016 10:14:53 +0200 Subject: [PATCH 03/16] This patch allows cmocka to be run under windows 64-bit In that system while the maximum word size is 64-bits, the 'unsigned long int' type is only 32-bits. Reviewed-by: Andreas Schneider --- include/cmocka.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/cmocka.h b/include/cmocka.h index 4be40ea..72d6ae2 100644 --- a/include/cmocka.h +++ b/include/cmocka.h @@ -71,7 +71,7 @@ int __stdcall IsDebuggerPresent(); typedef uintmax_t LargestIntegralType; #else /* DOXGEN */ #ifndef LargestIntegralType -# if __WORDSIZE == 64 +# if __WORDSIZE == 64 && !defined(_WIN64) # define LargestIntegralType unsigned long int # else # define LargestIntegralType unsigned long long int -- 2.7.4 From 26717f4909039803b231434740ef3ce005258dae Mon Sep 17 00:00:00 2001 From: Adrien Marc Date: Tue, 4 Oct 2016 18:18:42 +0200 Subject: [PATCH 04/16] Fixed xUnit output durations Reviewed-by: Andreas Schneider --- src/cmocka.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmocka.c b/src/cmocka.c index 3fd1af8..e21ad26 100644 --- a/src/cmocka.c +++ b/src/cmocka.c @@ -2216,7 +2216,7 @@ static void cmprintf_group_finish_xml(const char *group_name, fprintf(fp, " \n", group_name, - total_runtime * 1000, /* miliseconds */ + total_runtime, /* seconds */ (unsigned)total_executed, (unsigned)total_failed, (unsigned)total_errors, @@ -2226,7 +2226,7 @@ static void cmprintf_group_finish_xml(const char *group_name, struct CMUnitTestState *cmtest = &cm_tests[i]; fprintf(fp, " \n", - cmtest->test->name, cmtest->runtime * 1000); + cmtest->test->name, cmtest->runtime); switch (cmtest->status) { case CM_TEST_ERROR: -- 2.7.4 From 5182612d58b1670008b37f64fc92fc32382bd2d5 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 7 Nov 2016 08:03:10 +0100 Subject: [PATCH 05/16] cmocka: Leave if expected_call is NULL CID 1365415 Signed-off-by: Andreas Schneider --- src/cmocka.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cmocka.c b/src/cmocka.c index e21ad26..6c79a20 100644 --- a/src/cmocka.c +++ b/src/cmocka.c @@ -914,15 +914,16 @@ void _function_called(const char *const function, { ListNode *first_value_node = NULL; ListNode *value_node = NULL; - FuncOrderingValue *expected_call; int rc; rc = list_first(&global_call_ordering_head, &value_node); first_value_node = value_node; if (rc) { + FuncOrderingValue *expected_call; int cmp; expected_call = (FuncOrderingValue *)value_node->value; + cmp = strcmp(expected_call->function, function); if (value_node->refcount < -1) { /* @@ -948,7 +949,7 @@ void _function_called(const char *const function, cmp = strcmp(expected_call->function, function); } - if (value_node == first_value_node->prev) { + if (expected_call == NULL || value_node == first_value_node->prev) { cm_print_error(SOURCE_LOCATION_FORMAT ": error: No expected mock calls matching " "called() invocation in %s", -- 2.7.4 From 70ecc58201ab7c20f268cd563618a9fa1f69e0d4 Mon Sep 17 00:00:00 2001 From: Adrian Friedli Date: Tue, 25 Oct 2016 10:57:21 +0200 Subject: [PATCH 06/16] src: Add support for compile flag -Wstrict-prototypes --- example/allocate_module_test.c | 6 +++--- example/customer_database_test.c | 2 +- src/cmocka.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/example/allocate_module_test.c b/example/allocate_module_test.c index cd5d371..562aea2 100644 --- a/example/allocate_module_test.c +++ b/example/allocate_module_test.c @@ -18,9 +18,9 @@ #include #include -extern void leak_memory(); -extern void buffer_overflow(); -extern void buffer_underflow(); +extern void leak_memory(void); +extern void buffer_overflow(void); +extern void buffer_underflow(void); /* Test case that fails as leak_memory() leaks a dynamically allocated block. */ static void leak_memory_test(void **state) { diff --git a/example/customer_database_test.c b/example/customer_database_test.c index 2f78b05..45ec782 100644 --- a/example/customer_database_test.c +++ b/example/customer_database_test.c @@ -19,7 +19,7 @@ #include #include -extern DatabaseConnection* connect_to_customer_database(); +extern DatabaseConnection* connect_to_customer_database(void); extern unsigned int get_customer_id_by_name( DatabaseConnection * const connection, const char * const customer_name); diff --git a/src/cmocka.c b/src/cmocka.c index 6c79a20..a74a8e5 100644 --- a/src/cmocka.c +++ b/src/cmocka.c @@ -1730,7 +1730,7 @@ void _assert_not_in_set(const LargestIntegralType value, /* Get the list of allocated blocks. */ -static ListNode* get_allocated_blocks_list() { +static ListNode* get_allocated_blocks_list(void) { /* If it initialized, initialize the list of allocated blocks. */ if (!global_allocated_blocks.value) { list_initialize(&global_allocated_blocks); @@ -1945,7 +1945,7 @@ void *_test_realloc(void *ptr, #define realloc test_realloc /* Crudely checkpoint the current heap state. */ -static const ListNode* check_point_allocated_blocks() { +static const ListNode* check_point_allocated_blocks(void) { return get_allocated_blocks_list()->prev; } -- 2.7.4 From 7ef5267f3f658f96bba2beaa08f1efc35cf4526a Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sat, 12 Nov 2016 12:13:13 +0100 Subject: [PATCH 07/16] cmake: Add -Wstrict-prototypes during build Signed-off-by: Andreas Schneider --- cmake/Modules/DefineCompilerFlags.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/Modules/DefineCompilerFlags.cmake b/cmake/Modules/DefineCompilerFlags.cmake index 14d473f..cef5dc1 100644 --- a/cmake/Modules/DefineCompilerFlags.cmake +++ b/cmake/Modules/DefineCompilerFlags.cmake @@ -13,7 +13,7 @@ if (UNIX AND NOT WIN32) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -pedantic -pedantic-errors") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wshadow -Wmissing-prototypes -Wdeclaration-after-statement") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused -Wfloat-equal -Wpointer-arith -Wwrite-strings -Wformat-security") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-format-attribute -Wundef") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-format-attribute -Wundef -Wstrict-prototypes") # with -fPIC check_c_compiler_flag("-fPIC" WITH_FPIC) -- 2.7.4 From 481be0e2215eeb00ef0ff3eb6a1a61ae1e64ef1c Mon Sep 17 00:00:00 2001 From: Terje Runde Date: Sat, 3 Dec 2016 20:14:18 +0100 Subject: [PATCH 08/16] Remove dangling unit test source file. --- test_ordering_fail.c | 95 ---------------------------------------------------- 1 file changed, 95 deletions(-) delete mode 100644 test_ordering_fail.c diff --git a/test_ordering_fail.c b/test_ordering_fail.c deleted file mode 100644 index 652f5ad..0000000 --- a/test_ordering_fail.c +++ /dev/null @@ -1,95 +0,0 @@ -#include "config.h" - -#include -#include -#include -#include -#include - -static void mock_test_a_called(void) -{ - function_called(); -} - -static void mock_test_b_called(void) -{ - function_called(); -} - -static void mock_test_c_called(void) -{ - function_called(); -} - -static void test_does_fail_for_unexpected_call(void **state) -{ - (void)state; - expect_function_call(mock_test_a_called); - expect_function_call(mock_test_a_called); - - mock_test_a_called(); - mock_test_a_called(); - mock_test_a_called(); -} - -static void test_does_fail_for_unmade_expected_call(void **state) -{ - (void)state; - expect_function_call(mock_test_a_called); - expect_function_call(mock_test_a_called); - - mock_test_a_called(); -} - -static void test_ordering_fails_out_of_order(void **state) -{ - (void)state; - expect_function_call(mock_test_a_called); - expect_function_call(mock_test_b_called); - expect_function_call(mock_test_a_called); - - mock_test_b_called(); -} - -static void test_ordering_fails_out_of_order_for_at_least_once_calls(void **state) -{ - (void)state; - expect_function_call_any(mock_test_a_called); - ignore_function_calls(mock_test_b_called); - - mock_test_b_called(); - mock_test_c_called(); -} - -/* Primarily used to test error message */ -static void test_fails_out_of_order_if_no_calls_found_on_any(void **state) -{ - (void)state; - expect_function_call_any(mock_test_a_called); - ignore_function_calls(mock_test_b_called); - - mock_test_a_called(); - mock_test_c_called(); -} - -static void test_fails_if_zero_count_used(void **state) -{ - (void)state; - expect_function_calls(mock_test_a_called, 0); - - mock_test_a_called(); -} - -int main(void) { - const struct CMUnitTest tests[] = { - cmocka_unit_test(test_does_fail_for_unexpected_call) - ,cmocka_unit_test(test_does_fail_for_unmade_expected_call) - ,cmocka_unit_test(test_does_fail_for_unmade_expected_call) - ,cmocka_unit_test(test_ordering_fails_out_of_order) - ,cmocka_unit_test(test_ordering_fails_out_of_order_for_at_least_once_calls) - ,cmocka_unit_test(test_fails_out_of_order_if_no_calls_found_on_any) - ,cmocka_unit_test(test_fails_if_zero_count_used) - }; - - return cmocka_run_group_tests(tests, NULL, NULL); -} -- 2.7.4 From 0518e703c57b1b96bed4d10df7ef76377267834a Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Sat, 21 Jan 2017 09:55:14 +0100 Subject: [PATCH 09/16] doxygen: Allow space in path names Reviewed-by: Andreas Schneider --- doc/Doxyfile.in | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index b0f9f63..1473e4b 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -58,7 +58,7 @@ PROJECT_LOGO = # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. -OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@ +OUTPUT_DIRECTORY = "@CMAKE_CURRENT_BINARY_DIR@" # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and @@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. -STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@ +STRIP_FROM_PATH = "@CMAKE_SOURCE_DIR@" # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which @@ -171,7 +171,7 @@ STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@ # specify the list of include paths that are normally passed to the compiler # using the -I flag. -STRIP_FROM_INC_PATH = @CMAKE_SOURCE_DIR@ +STRIP_FROM_INC_PATH = "@CMAKE_SOURCE_DIR@" # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # less readable) file names. This can be useful is your file systems doesn't @@ -763,9 +763,9 @@ WARN_LOGFILE = # spaces. # Note: If this tag is empty the current directory is searched. -INPUT = @CMAKE_SOURCE_DIR@/include \ - @CMAKE_SOURCE_DIR@/src \ - @CMAKE_SOURCE_DIR@/doc +INPUT = "@CMAKE_SOURCE_DIR@/include" \ + "@CMAKE_SOURCE_DIR@/src" \ + "@CMAKE_SOURCE_DIR@/doc" # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses @@ -841,7 +841,7 @@ EXCLUDE_SYMBOLS = # that contain example code fragments that are included (see the \include # command). -EXAMPLE_PATH = @CMAKE_SOURCE_DIR@/example +EXAMPLE_PATH = "@CMAKE_SOURCE_DIR@/example" # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and @@ -2025,7 +2025,7 @@ TAGFILES = # tag file that is based on the input files it reads. See section "Linking to # external documentation" for more information about the usage of tag files. -GENERATE_TAGFILE = @CMAKE_CURRENT_BINARY_DIR@/html/@PROJECT_NAME@.TAGFILE +GENERATE_TAGFILE = "@CMAKE_CURRENT_BINARY_DIR@/html/@PROJECT_NAME@.TAGFILE" # If the ALLEXTERNALS tag is set to YES all external class will be listed in the # class index. If set to NO only the inherited external classes will be listed. -- 2.7.4 From 30590636487cb976a7ad850024abb16a5f44a320 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 7 Mar 2017 13:36:25 +0100 Subject: [PATCH 10/16] Update doxygen config --- doc/Doxyfile.in | 316 +++++++++++++++++++++++++++++++++++-------------------- doc/mainpage.dox | 2 +- 2 files changed, 201 insertions(+), 117 deletions(-) diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index 1473e4b..221beba 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -1,4 +1,4 @@ -# Doxyfile 1.8.8 +# Doxyfile 1.8.12 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. @@ -46,10 +46,10 @@ PROJECT_NUMBER = @APPLICATION_VERSION@ PROJECT_BRIEF = -# With the PROJECT_LOGO tag one can specify an logo or icon that is included in -# the documentation. The maximum height of the logo should not exceed 55 pixels -# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo -# to the output directory. +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. PROJECT_LOGO = @@ -60,7 +60,7 @@ PROJECT_LOGO = OUTPUT_DIRECTORY = "@CMAKE_CURRENT_BINARY_DIR@" -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and # will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where @@ -93,14 +93,14 @@ ALLOW_UNICODE_NAMES = NO OUTPUT_LANGUAGE = English -# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. # The default value is: YES. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief # description of a member or function before the detailed description # # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the @@ -145,7 +145,7 @@ ALWAYS_DETAILED_SEC = NO INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the # shortest path that makes the file name unique will be used # The default value is: YES. @@ -215,9 +215,9 @@ MULTILINE_CPP_IS_BRIEF = NO INHERIT_DOCS = YES -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a -# new page for each member. If set to NO, the documentation of a member will be -# part of the file/class/namespace that contains it. +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. # The default value is: NO. SEPARATE_MEMBER_PAGES = NO @@ -286,7 +286,7 @@ OPTIMIZE_OUTPUT_VHDL = NO # instance to make doxygen treat .inc files as Fortran files (default is PHP), # and .f files as C (default is Fortran), use: inc=Fortran f=C. # -# Note For files without extension you can use no_extension as a placeholder. +# Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. @@ -303,10 +303,19 @@ EXTENSION_MAPPING = MARKDOWN_SUPPORT = YES +# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up +# to that level are automatically included in the table of contents, even if +# they do not have an id attribute. +# Note: This feature currently applies only to Markdown headings. +# Minimum value: 0, maximum value: 99, default value: 0. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +TOC_INCLUDE_HEADINGS = 0 + # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by by putting a % sign in front of the word -# or globally by setting AUTOLINK_SUPPORT to NO. +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES @@ -346,13 +355,20 @@ SIP_SUPPORT = NO IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first +# tag is set to YES then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. # The default value is: NO. DISTRIBUTE_GROUP_DOC = NO +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + # Set the SUBGROUPING tag to YES to allow class member groups of the same type # (for instance a group of public functions) to be put as a subgroup of that # type (e.g. under the Public Functions section). Set it to NO to prevent @@ -411,7 +427,7 @@ LOOKUP_CACHE_SIZE = 0 # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in # documentation are documented, even if no documentation was available. Private # class members and static file members will be hidden unless the # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. @@ -421,35 +437,35 @@ LOOKUP_CACHE_SIZE = 0 EXTRACT_ALL = NO -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = NO -# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = NO -# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. # The default value is: NO. EXTRACT_STATIC = NO -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, # only classes defined in header files are included. Does not have any effect # for Java sources. # The default value is: YES. EXTRACT_LOCAL_CLASSES = NO -# This flag is only useful for Objective-C code. When set to YES local methods, +# This flag is only useful for Objective-C code. If set to YES, local methods, # which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO only methods in the interface are +# included in the documentation. If set to NO, only methods in the interface are # included. # The default value is: NO. @@ -474,21 +490,21 @@ HIDE_UNDOC_MEMBERS = YES # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set -# to NO these classes will be included in the various overviews. This option has -# no effect if EXTRACT_ALL is enabled. +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = YES # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO these declarations will be +# (class|struct|union) declarations. If set to NO, these declarations will be # included in the documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO these +# documentation blocks found inside the body of a function. If set to NO, these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. @@ -502,7 +518,7 @@ HIDE_IN_BODY_DOCS = NO INTERNAL_DOCS = @CMAKE_INTERNAL_DOC@ # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES upper-case letters are also +# names in lower-case letters. If set to YES, upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. @@ -511,12 +527,19 @@ INTERNAL_DOCS = @CMAKE_INTERNAL_DOC@ CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES the +# their full class and namespace scopes in the documentation. If set to YES, the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. @@ -544,14 +567,14 @@ INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the # (detailed) documentation of file and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. +# name. If set to NO, the members will appear in declaration order. # The default value is: YES. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. Note that +# name. If set to NO, the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. @@ -596,27 +619,25 @@ SORT_BY_SCOPE_NAME = NO STRICT_PROTO_MATCHING = NO -# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the -# todo list. This list is created by putting \todo commands in the -# documentation. +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. # The default value is: YES. GENERATE_TODOLIST = YES -# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the -# test list. This list is created by putting \test commands in the -# documentation. +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. # The default value is: YES. GENERATE_TESTLIST = YES -# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug # list. This list is created by putting \bug commands in the documentation. # The default value is: YES. GENERATE_BUGLIST = YES -# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) # the deprecated list. This list is created by putting \deprecated commands in # the documentation. # The default value is: YES. @@ -641,8 +662,8 @@ ENABLED_SECTIONS = MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES the list -# will mention the files that were used to generate the documentation. +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. # The default value is: YES. SHOW_USED_FILES = YES @@ -706,7 +727,7 @@ CITE_BIB_FILES = QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # # Tip: Turn warnings on while writing the documentation. @@ -714,7 +735,7 @@ QUIET = YES WARNINGS = YES -# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: YES. @@ -731,12 +752,18 @@ WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return -# value. If set to NO doxygen will only warn about wrong or incomplete parameter -# documentation, but not about the absence of documentation. +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. # The default value is: NO. WARN_NO_PARAMDOC = NO +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. +# The default value is: NO. + +WARN_AS_ERROR = NO + # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which # will be replaced by the file and line number from which the warning originated @@ -760,7 +787,7 @@ WARN_LOGFILE = # The INPUT tag is used to specify the files and/or directories that contain # documented source files. You may enter file names like myfile.cpp or # directories like /usr/src/myproject. Separate the files or directories with -# spaces. +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. INPUT = "@CMAKE_SOURCE_DIR@/include" \ @@ -778,12 +805,17 @@ INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank the -# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, -# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, -# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, -# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, -# *.qsf, *.as and *.js. +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, +# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, +# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, +# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, +# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf. FILE_PATTERNS = *.cpp \ *.cc \ @@ -883,6 +915,10 @@ IMAGE_PATH = # Note that the filter must not add or remove lines; it is applied before the # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. INPUT_FILTER = @@ -892,11 +928,15 @@ INPUT_FILTER = # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER ) will also be used to filter the input files that are used for +# INPUT_FILTER) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. @@ -956,7 +996,7 @@ REFERENCED_BY_RELATION = YES REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES, then the hyperlinks from functions in REFERENCES_RELATION and +# to YES then the hyperlinks from functions in REFERENCES_RELATION and # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will # link to the documentation. # The default value is: YES. @@ -1033,7 +1073,7 @@ IGNORE_PREFIX = # Configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = YES @@ -1099,10 +1139,10 @@ HTML_STYLESHEET = # cascading style sheets that are included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefor more robust against future updates. +# standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra stylesheet files is of importance (e.g. the last -# stylesheet in the list overrules the setting of the previous ones in the +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1119,7 +1159,7 @@ HTML_EXTRA_STYLESHEET = HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the stylesheet and background images according to +# will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see # http://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 @@ -1150,8 +1190,9 @@ HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting this -# to NO can help when comparing the output of multiple runs. -# The default value is: YES. +# to YES can help to show when doxygen was last run and thus if the +# documentation is up to date. +# The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_TIMESTAMP = NO @@ -1247,28 +1288,28 @@ GENERATE_HTMLHELP = NO CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler ( hhc.exe). If non-empty +# including file name) of the HTML help compiler (hhc.exe). If non-empty, # doxygen will try to run the HTML help compiler on the generated index.hhp. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = -# The GENERATE_CHI flag controls if a separate .chi index file is generated ( -# YES) or that it should be included in the master .chm file ( NO). +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = -# The BINARY_TOC flag controls whether a binary table of contents is generated ( -# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it # enables the Previous and Next buttons. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. @@ -1382,7 +1423,7 @@ DISABLE_INDEX = NO # index structure (just like the one that is generated for HTML Help). For this # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can # further fine-tune the look of the index. As an example, the default style # sheet generated by doxygen has an example that shows how to put an image at # the root of the tree instead of the PROJECT_NAME. Since the tree basically has @@ -1410,7 +1451,7 @@ ENUM_VALUES_PER_LINE = 4 TREEVIEW_WIDTH = 250 -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1439,7 +1480,7 @@ FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using prerendered bitmaps. Use this if you do not have LaTeX +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. @@ -1525,7 +1566,7 @@ SERVER_BASED_SEARCH = NO # external search engine pointed to by the SEARCHENGINE_URL option to obtain the # search results. # -# Doxygen ships with an example indexer ( doxyindexer) and search engine +# Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library # Xapian (see: http://xapian.org/). # @@ -1538,7 +1579,7 @@ EXTERNAL_SEARCH = NO # The SEARCHENGINE_URL should point to a search engine hosted by a web server # which will return the search results when EXTERNAL_SEARCH is enabled. # -# Doxygen ships with an example indexer ( doxyindexer) and search engine +# Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library # Xapian (see: http://xapian.org/). See the section "External Indexing and # Searching" for details. @@ -1576,7 +1617,7 @@ EXTRA_SEARCH_MAPPINGS = # Configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output. +# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output. # The default value is: YES. GENERATE_LATEX = @DOXYFILE_LATEX@ @@ -1607,7 +1648,7 @@ LATEX_CMD_NAME = @LATEX_COMPILER@ MAKEINDEX_CMD_NAME = @MAKEINDEX_COMPILER@ -# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX +# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX # documents. This may be useful for small projects and may help to save some # trees in general. # The default value is: NO. @@ -1625,9 +1666,12 @@ COMPACT_LATEX = NO PAPER_TYPE = a4 # The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names -# that should be included in the LaTeX output. To get the times font for -# instance you can specify -# EXTRA_PACKAGES=times +# that should be included in the LaTeX output. The package can be specified just +# by its name or with the correct syntax as to be used with the LaTeX +# \usepackage command. To get the times font for instance you can specify : +# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times} +# To use the option intlimits with the amsmath package you can specify: +# EXTRA_PACKAGES=[intlimits]{amsmath} # If left blank no extra packages will be included. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -1642,9 +1686,9 @@ EXTRA_PACKAGES = # Note: Only use a user-defined header if you know what you are doing! The # following commands have a special meaning inside the header: $title, # $datetime, $date, $doxygenversion, $projectname, $projectnumber, -# $projectbrief, $projectlogo. Doxygen will replace $title with the empy string, -# for the replacement values of the other commands the user is refered to -# HTML_HEADER. +# $projectbrief, $projectlogo. Doxygen will replace $title with the empty +# string, for the replacement values of the other commands the user is referred +# to HTML_HEADER. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_HEADER = @@ -1660,6 +1704,17 @@ LATEX_HEADER = LATEX_FOOTER = +# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# LaTeX style sheets that are included after the standard style sheets created +# by doxygen. Using this option one can overrule certain style aspects. Doxygen +# will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_EXTRA_STYLESHEET = + # The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the LATEX_OUTPUT output # directory. Note that the files will be copied as-is; there are no commands or @@ -1678,7 +1733,7 @@ LATEX_EXTRA_FILES = PDF_HYPERLINKS = YES # If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate -# the PDF file directly from the LaTeX files. Set this option to YES to get a +# the PDF file directly from the LaTeX files. Set this option to YES, to get a # higher quality PDF documentation. # The default value is: YES. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -1719,11 +1774,19 @@ LATEX_SOURCE_CODE = NO LATEX_BIB_STYLE = plain +# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated +# page will contain the date and time when the page was generated. Setting this +# to NO can help when comparing the output of multiple runs. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_TIMESTAMP = NO + #--------------------------------------------------------------------------- # Configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The +# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The # RTF output is optimized for Word 97 and may not look too pretty with other RTF # readers/editors. # The default value is: NO. @@ -1738,7 +1801,7 @@ GENERATE_RTF = NO RTF_OUTPUT = rtf -# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF +# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF # documents. This may be useful for small projects and may help to save some # trees in general. # The default value is: NO. @@ -1775,11 +1838,21 @@ RTF_STYLESHEET_FILE = RTF_EXTENSIONS_FILE = +# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code +# with syntax highlighting in the RTF output. +# +# Note that which sources are shown also depends on other settings such as +# SOURCE_BROWSER. +# The default value is: NO. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_SOURCE_CODE = NO + #--------------------------------------------------------------------------- # Configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for +# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for # classes and files. # The default value is: NO. @@ -1823,7 +1896,7 @@ MAN_LINKS = NO # Configuration options related to the XML output #--------------------------------------------------------------------------- -# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that +# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that # captures the structure of the code including all documentation. # The default value is: NO. @@ -1837,7 +1910,7 @@ GENERATE_XML = NO XML_OUTPUT = xml -# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program +# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program # listings (including syntax highlighting and cross-referencing information) to # the XML output. Note that enabling this will significantly increase the size # of the XML output. @@ -1850,7 +1923,7 @@ XML_PROGRAMLISTING = YES # Configuration options related to the DOCBOOK output #--------------------------------------------------------------------------- -# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files +# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files # that can be used to generate PDF. # The default value is: NO. @@ -1864,7 +1937,7 @@ GENERATE_DOCBOOK = NO DOCBOOK_OUTPUT = docbook -# If the DOCBOOK_PROGRAMLISTING tag is set to YES doxygen will include the +# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the # program listings (including syntax highlighting and cross-referencing # information) to the DOCBOOK output. Note that enabling this will significantly # increase the size of the DOCBOOK output. @@ -1877,10 +1950,10 @@ DOCBOOK_PROGRAMLISTING = NO # Configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- -# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen -# Definitions (see http://autogen.sf.net) file that captures the structure of -# the code including all documentation. Note that this feature is still -# experimental and incomplete at the moment. +# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an +# AutoGen Definitions (see http://autogen.sf.net) file that captures the +# structure of the code including all documentation. Note that this feature is +# still experimental and incomplete at the moment. # The default value is: NO. GENERATE_AUTOGEN_DEF = NO @@ -1889,7 +1962,7 @@ GENERATE_AUTOGEN_DEF = NO # Configuration options related to the Perl module output #--------------------------------------------------------------------------- -# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module +# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module # file that captures the structure of the code including all documentation. # # Note that this feature is still experimental and incomplete at the moment. @@ -1897,7 +1970,7 @@ GENERATE_AUTOGEN_DEF = NO GENERATE_PERLMOD = NO -# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary +# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary # Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI # output from the Perl module output. # The default value is: NO. @@ -1905,9 +1978,9 @@ GENERATE_PERLMOD = NO PERLMOD_LATEX = NO -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely +# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely # formatted so it can be parsed by a human reader. This is useful if you want to -# understand what is going on. On the other hand, if this tag is set to NO the +# understand what is going on. On the other hand, if this tag is set to NO, the # size of the Perl module output will be much smaller and Perl will parse it # just the same. # The default value is: YES. @@ -1927,14 +2000,14 @@ PERLMOD_MAKEVAR_PREFIX = # Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all +# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all # C-preprocessor directives found in the sources and include files. # The default value is: YES. ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names -# in the source code. If set to NO only conditional compilation will be +# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names +# in the source code. If set to NO, only conditional compilation will be # performed. Macro expansion can be done in a controlled way by setting # EXPAND_ONLY_PREDEF to YES. # The default value is: NO. @@ -1950,7 +2023,7 @@ MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = NO -# If the SEARCH_INCLUDES tag is set to YES the includes files in the +# If the SEARCH_INCLUDES tag is set to YES, the include files in the # INCLUDE_PATH will be searched if a #include is found. # The default value is: YES. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. @@ -2027,20 +2100,21 @@ TAGFILES = GENERATE_TAGFILE = "@CMAKE_CURRENT_BINARY_DIR@/html/@PROJECT_NAME@.TAGFILE" -# If the ALLEXTERNALS tag is set to YES all external class will be listed in the -# class index. If set to NO only the inherited external classes will be listed. +# If the ALLEXTERNALS tag is set to YES, all external class will be listed in +# the class index. If set to NO, only the inherited external classes will be +# listed. # The default value is: NO. ALLEXTERNALS = YES -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in -# the modules index. If set to NO, only the current project's groups will be +# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will be # listed. # The default value is: YES. EXTERNAL_GROUPS = YES -# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in +# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in # the related pages index. If set to NO, only the current project's pages will # be listed. # The default value is: YES. @@ -2057,7 +2131,7 @@ PERL_PATH = /usr/bin/perl # Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram +# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram # (in HTML and LaTeX) for classes with base or super classes. Setting the tag to # NO turns the diagrams off. Note that this option also works with HAVE_DOT # disabled, but it is recommended to install and use dot, since it yields more @@ -2082,7 +2156,7 @@ MSCGEN_PATH = DIA_PATH = -# If set to YES, the inheritance and collaboration graphs will hide inheritance +# If set to YES the inheritance and collaboration graphs will hide inheritance # and usage relations if the target is undocumented or is not a class. # The default value is: YES. @@ -2155,7 +2229,7 @@ COLLABORATION_GRAPH = YES GROUP_GRAPHS = YES -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. # The default value is: NO. @@ -2207,7 +2281,8 @@ INCLUDED_BY_GRAPH = YES # # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. +# functions only using the \callgraph command. Disabling a call graph can be +# accomplished by means of the command \hidecallgraph. # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. @@ -2218,7 +2293,8 @@ CALL_GRAPH = NO # # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable caller graphs for selected -# functions only using the \callergraph command. +# functions only using the \callergraph command. Disabling a caller graph can be +# accomplished by means of the command \hidecallergraph. # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. @@ -2241,11 +2317,15 @@ GRAPHICAL_HIERARCHY = YES DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. +# generated by dot. For an explanation of the image formats see the section +# output formats in the documentation of the dot tool (Graphviz (see: +# http://www.graphviz.org/)). # Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order # to make the SVG files visible in IE 9+ (other browsers do not have this # requirement). -# Possible values are: png, jpg, gif and svg. +# Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo, +# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and +# png:gdiplus:gdiplus. # The default value is: png. # This tag requires that the tag HAVE_DOT is set to YES. @@ -2293,10 +2373,14 @@ DIAFILE_DIRS = # PlantUML is not used or called during a preprocessing step. Doxygen will # generate a warning when it encounters a \startuml command in this case and # will not generate output for the diagram. -# This tag requires that the tag HAVE_DOT is set to YES. PLANTUML_JAR_PATH = +# When using plantuml, the specified paths are searched for files specified by +# the !include statement in a plantuml block. + +PLANTUML_INCLUDE_PATH = + # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes # that will be shown in the graph. If the number of nodes in a graph becomes # larger than this value, doxygen will truncate the graph, which is visualized @@ -2333,7 +2417,7 @@ MAX_DOT_GRAPH_DEPTH = 0 DOT_TRANSPARENT = NO -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) support # this, this feature is disabled by default. @@ -2350,7 +2434,7 @@ DOT_MULTI_TARGETS = YES GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot +# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot # files that are used to generate the various graphs. # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. diff --git a/doc/mainpage.dox b/doc/mainpage.dox index 329b840..4c26d96 100644 --- a/doc/mainpage.dox +++ b/doc/mainpage.dox @@ -126,7 +126,7 @@ The XML output goes to stderr by default. If the environment variable CMOCKA_XML_FILE exists and the file specified by this variable doesn't exist yet, then cmocka will put the output to this file. Note that if you are have several groups you should set CMOCKA_XML_FILE -to CMOCKA_XML_FILE=cm_%g.xml. In this %g will be replaced by +to CMOCKA_XML_FILE=cm_%%g.xml. In this %g will be replaced by the group_name of the test and a file will be created for each group, othwerwise all groups will be printed into the same file. -- 2.7.4 From fcad5ab7232a1b556580459e4f46e653ccef969b Mon Sep 17 00:00:00 2001 From: Stas Kobzar Date: Tue, 4 Apr 2017 11:06:15 -0400 Subject: [PATCH 11/16] Fix TAP output and summary. Reviewed-by: Andreas Schneider --- src/cmocka.c | 14 +++++++------- tests/CMakeLists.txt | 26 +++++++++++++------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/cmocka.c b/src/cmocka.c index a74a8e5..6efb4ec 100644 --- a/src/cmocka.c +++ b/src/cmocka.c @@ -2335,7 +2335,7 @@ static void cmprintf_standard(enum cm_printf_type type, static void cmprintf_group_start_tap(const size_t num_tests) { - print_message("\t1..%u\n", (unsigned)num_tests); + print_message("1..%u\n", (unsigned)num_tests); } static void cmprintf_group_finish_tap(const char *group_name, @@ -2347,7 +2347,7 @@ static void cmprintf_group_finish_tap(const char *group_name, if (total_passed + total_skipped == total_executed) { status = "ok"; } - print_message("%s - %s\n", status, group_name); + print_message("# %s - %s\n", status, group_name); } static void cmprintf_tap(enum cm_printf_type type, @@ -2359,10 +2359,10 @@ static void cmprintf_tap(enum cm_printf_type type, case PRINTF_TEST_START: break; case PRINTF_TEST_SUCCESS: - print_message("\tok %u - %s\n", (unsigned)test_number, test_name); + print_message("ok %u - %s\n", (unsigned)test_number, test_name); break; case PRINTF_TEST_FAILURE: - print_message("\tnot ok %u - %s\n", (unsigned)test_number, test_name); + print_message("not ok %u - %s\n", (unsigned)test_number, test_name); if (error_message != NULL) { char *msg; char *p; @@ -2381,7 +2381,7 @@ static void cmprintf_tap(enum cm_printf_type type, p[0] = '\0'; } - print_message("\t# %s\n", q); + print_message("# %s\n", q); if (p == NULL) { break; @@ -2392,10 +2392,10 @@ static void cmprintf_tap(enum cm_printf_type type, } break; case PRINTF_TEST_SKIPPED: - print_message("\tnot ok %u # SKIP %s\n", (unsigned)test_number, test_name); + print_message("not ok %u # SKIP %s\n", (unsigned)test_number, test_name); break; case PRINTF_TEST_ERROR: - print_message("\tnot ok %u - %s %s\n", + print_message("not ok %u - %s %s\n", (unsigned)test_number, test_name, error_message); break; } diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 68ae4ac..b1380de 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -153,21 +153,21 @@ set(TEST_OUTPUT_FMTS xml) set(test_basics_tap_out - "^\t1\\.\\.2" - "\tok 1 - null_test_success" - "\tok 2 - int_test_success" - "ok - tests") + "^1\\.\\.2" + "ok 1 - null_test_success" + "ok 2 - int_test_success" + "# ok - tests") set(test_assert_macros_fail_tap_out - "^\t1\\.\\.1" - "\tnot ok 1 - test_assert_return_code_fail" - "\t#[^\n\r]+[\n\r]\t#[^\n\r]+[\n\r]not ok - tests") + "^1\\.\\.1" + "not ok 1 - test_assert_return_code_fail" + "#[^\n\r]+[\n\r]#[^\n\r]+[\n\r]# not ok - tests") set(test_groups_tap_out - "^\t1\\.\\.1" - "\tok 1 - null_test_success" - "ok - test_group1" - "\t1\\.\\.1" - "\tok 1 - int_test_success" - "ok - test_group2") + "^1\\.\\.1" + "ok 1 - null_test_success" + "# ok - test_group1" + "1\\.\\.1" + "ok 1 - int_test_success" + "# ok - test_group2") set(test_skip_tap_out "not ok 1 # SKIP") set(test_setup_fail_tap_out -- 2.7.4 From 71ea4830f9f69af92a23d9bd256eb3870765f510 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 5 Apr 2017 10:16:15 +0200 Subject: [PATCH 12/16] src: Do not use C++ keywords as local variables --- src/cmocka.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cmocka.c b/src/cmocka.c index 6efb4ec..d455710 100644 --- a/src/cmocka.c +++ b/src/cmocka.c @@ -1912,7 +1912,7 @@ void *_test_realloc(void *ptr, MallocBlockInfo *block_info; char *block = ptr; size_t block_size = size; - void *new; + void *new_block; if (ptr == NULL) { return _test_malloc(size, file, line); @@ -1926,8 +1926,8 @@ void *_test_realloc(void *ptr, block_info = (MallocBlockInfo*)(block - (MALLOC_GUARD_SIZE + sizeof(*block_info))); - new = _test_malloc(size, file, line); - if (new == NULL) { + new_block = _test_malloc(size, file, line); + if (new_block == NULL) { return NULL; } @@ -1935,12 +1935,12 @@ void *_test_realloc(void *ptr, block_size = block_info->size; } - memcpy(new, ptr, block_size); + memcpy(new_block, ptr, block_size); /* Free previous memory */ _test_free(ptr, file, line); - return new; + return new_block; } #define realloc test_realloc -- 2.7.4 From ecd96bda4966ad9d034021a76505a4652f632c95 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 7 Apr 2017 16:09:48 +0200 Subject: [PATCH 13/16] cmocka: Change define to HAVE_CLOCK_REALTIME Signed-off-by: Andreas Schneider --- ConfigureChecks.cmake | 2 +- config.h.cmake | 2 +- src/cmocka.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 31c5a94..9bdc6f8 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -135,7 +135,7 @@ int main(void) { clock_gettime(CLOCK_REALTIME, &ts); return 0; -}" HAVE_CLOCK_GETTIME_REALTIME) +}" HAVE_CLOCK_REALTIME) # reset cmake requirements set(CMAKE_REQUIRED_INCLUDES) diff --git a/config.h.cmake b/config.h.cmake index 920bb10..1aaabb5 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -158,7 +158,7 @@ #cmakedefine HAVE_MSVC_THREAD_LOCAL_STORAGE 1 /* Check if we have CLOCK_REALTIME for clock_gettime() */ -#cmakedefine HAVE_CLOCK_GETTIME_REALTIME 1 +#cmakedefine HAVE_CLOCK_REALTIME 1 /*************************** ENDIAN *****************************/ diff --git a/src/cmocka.c b/src/cmocka.c index d455710..69a8e82 100644 --- a/src/cmocka.c +++ b/src/cmocka.c @@ -82,7 +82,7 @@ # define CMOCKA_THREAD #endif -#ifdef HAVE_CLOCK_GETTIME_REALTIME +#ifdef HAVE_CLOCK_REALTIME #define CMOCKA_CLOCK_GETTIME(clock_id, ts) clock_gettime((clock_id), (ts)) #else #define CMOCKA_CLOCK_GETTIME(clock_id, ts) -- 2.7.4 From 5f61d2f188b0254f6ad74f9d9f84705923ece1fd Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 7 Apr 2017 16:16:13 +0200 Subject: [PATCH 14/16] Bump version to 1.1.1 --- CMakeLists.txt | 4 ++-- ChangeLog | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f7dac4..ac224ff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ set(APPLICATION_NAME ${PROJECT_NAME}) set(APPLICATION_VERSION_MAJOR "1") set(APPLICATION_VERSION_MINOR "1") -set(APPLICATION_VERSION_PATCH "0") +set(APPLICATION_VERSION_PATCH "1") set(APPLICATION_VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}") @@ -19,7 +19,7 @@ set(APPLICATION_VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINO # Increment AGE. Set REVISION to 0 # If the source code was changed, but there were no interface changes: # Increment REVISION. -set(LIBRARY_VERSION "0.4.0") +set(LIBRARY_VERSION "0.4.1") set(LIBRARY_SOVERSION "0") # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked diff --git a/ChangeLog b/ChangeLog index 0319c15..aa5835a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Fri Apr 07 2016 Andreas Schneider + * cmocka: version 1.1.1 + * Fixed TAP output + * Fixed cmocka on Windows x64 + * Fixed xUnit output durations + Wed Sep 21 2016 Andreas Schneider * cmocka: version 1.1.0 * Added support to catch multiple exceptions -- 2.7.4 From 4b128f559cc7c7c51804248aadd70eb548c649b2 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 22 Jun 2017 09:29:57 +0200 Subject: [PATCH 15/16] src: Initialize teardown_name to fix a build warning BUG #60 --- src/cmocka.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmocka.c b/src/cmocka.c index 69a8e82..f02e412 100644 --- a/src/cmocka.c +++ b/src/cmocka.c @@ -3167,7 +3167,7 @@ int _run_group_tests(const UnitTest * const tests, const size_t number_of_tests) const char *setup_name; size_t num_setups = 0; UnitTestFunction teardown = NULL; - const char *teardown_name; + const char *teardown_name = NULL; size_t num_teardowns = 0; size_t current_test = 0; size_t i; -- 2.7.4 From cb91536511fe9ece8e08878644e90c7444cff77e Mon Sep 17 00:00:00 2001 From: Krzysztof Opasiak Date: Mon, 3 Jul 2017 13:13:03 +0200 Subject: [PATCH 16/16] packaging: Add packaging for generating RPM package Change-Id: I0f6792555797b758c2bdca16fb424b2ae83a613c Signed-off-by: Krzysztof Opasiak --- .gbs.conf | 3 +++ packaging/cmocka.manifest | 6 +++++ packaging/cmocka.spec | 59 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 .gbs.conf create mode 100644 packaging/cmocka.manifest create mode 100644 packaging/cmocka.spec diff --git a/.gbs.conf b/.gbs.conf new file mode 100644 index 0000000..1ec96d2 --- /dev/null +++ b/.gbs.conf @@ -0,0 +1,3 @@ +[general] +upstream_branch = upstream +upstream_tag = cmocka-${upstreamversion} diff --git a/packaging/cmocka.manifest b/packaging/cmocka.manifest new file mode 100644 index 0000000..4819ac2 --- /dev/null +++ b/packaging/cmocka.manifest @@ -0,0 +1,6 @@ + + + + + + diff --git a/packaging/cmocka.spec b/packaging/cmocka.spec new file mode 100644 index 0000000..ad66906 --- /dev/null +++ b/packaging/cmocka.spec @@ -0,0 +1,59 @@ +Name: cmocka +Summary: Library for testing and mocking C code +Version: 1.1.1 +Release: 0 +License: Apache-2.0 +Group: Development/Testing + +Source0: %{name}-%{version}.tar.gz +Source1001: %{name}.manifest +BuildRequires: cmake + +%description +Framework for writing and using C mock functions on a variety of +platforms + +%package devel +Summary: Development package for cmocka +Group: Development/Libraries +Requires: %{name} = %{version} +BuildRequires: pkg-config + +%description devel +Standard header files for use when developing cmocka based apps + +%prep +%setup -q +cp %{SOURCE1001} . +mkdir build +cd build +cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DLIB_INSTALL_DIR=%{_libdir} ../ + +%build +cd build +make %{?jobs:-j%jobs} + +%install +cd build +%make_install + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%manifest %{name}.manifest +%license COPYING +%defattr(-,root,root) +%{_libdir}/libcmocka.so.* + +%files devel +%manifest %{name}.manifest +%defattr(-,root,root) +%{_includedir}/cmocka.h +%{_includedir}/cmocka_pbc.h +%{_libdir}/libcmocka.so +%{_libdir}/pkgconfig/cmocka.pc +%{_libdir}/cmake/cmocka/cmocka-config-version.cmake +%{_libdir}/cmake/cmocka/cmocka-config.cmake + -- 2.7.4