diff --git a/docs/Doxyfile b/docs/Doxyfile index 5f544e5..2ac399f 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -1030,8 +1030,7 @@ EXCLUDE_SYMLINKS = NO # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* -EXCLUDE_PATTERNS = conf.py \ - build_rules.py +EXCLUDE_PATTERNS = conf.py # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the diff --git a/docs/functions.rst b/docs/functions.rst index 847c754..7b8d718 100644 --- a/docs/functions.rst +++ b/docs/functions.rst @@ -217,6 +217,17 @@ util.fixup_args ^^^^^^^^^^^^^^^ .. doxygenfunction:: makeprojects::util::fixup_args +util.convert_file_name +^^^^^^^^^^^^^^^^^^^^^^ +.. doxygenfunction:: makeprojects::util::convert_file_name + +util.do_generate_build_rules +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +.. doxygenfunction:: makeprojects::util::do_generate_build_rules + +util.iterate_configurations +^^^^^^^^^^^^^^^^^^^^^^^^^^^ +.. doxygenfunction:: makeprojects::util::iterate_configurations Defaults -------- diff --git a/makeprojects/util.py b/makeprojects/util.py index 049dedc..57cf92d 100644 --- a/makeprojects/util.py +++ b/makeprojects/util.py @@ -589,3 +589,27 @@ def do_generate_build_rules(parsed, working_directory): # Save the build_rules.py file return save_default(working_directory, destinationfile=parsed.rules_file) + +######################################## + + +def iterate_configurations(solution): + """ + Iterate all configurations in a solution. + + Given a solution, iterate over all of the configurations within + the solution and return each object. + + Args: + solution: Solution object. + + Returns: + Iterator that returns configuration objects. + """ + + # Test all the projects and configurations + for project in solution.project_list: + + # Create sets of configuration names and projects + for configuration in project.configuration_list: + yield configuration diff --git a/unittests/test_core.py b/unittests/test_core.py index 209d00f..86f4d61 100644 --- a/unittests/test_core.py +++ b/unittests/test_core.py @@ -267,6 +267,7 @@ def test_configuration(self): Test Configuration class. """ + # pylint: disable=no-value-for-parameter # Must have a name with self.assertRaises(TypeError): c = Configuration()