CMakePP / CMinx

Generates API documentation for CMake functions and macros
https://cmakepp.github.io/CMinx/
Apache License 2.0
14 stars 5 forks source link

Add support for CMakeTest tests and sections #35

Closed AutonomicPerfectionist closed 3 years ago

AutonomicPerfectionist commented 3 years ago

This pull request adds new processors to recognize documented tests and sections. Additionally, it fixes a previously unknown bug where indented docs would not be processed correctly.

ryanmrichard commented 3 years ago

This looks like it works for the particular use case in #34; feel free to ignore my .. function suggestion. We can revisit that later if someone wants to separate documentation from the thing being documented.

dschiller commented 3 years ago

Seems there is some debug output left:

Writing RST files to /Users/dirk.schiller/Work/Coding/CPP/cmake-tools-tests/docs/docs
ANTLR runtime and generated code versions disagree: 4.8!=4.7.2
ANTLR runtime and generated code versions disagree: 4.8!=4.7.2
Character 0: #
Second line without spaces:
# Testing ``buildserver_helper.cmake``
Character 0:  
Num spaces: 1
Character 1:  
Num spaces: 2
Character 2:  
Num spaces: 3
Character 3:  
Num spaces: 4
Character 4: #
Second line without spaces:
# Verify the global option ``BUILDSERVER`` defaults to ``OFF``
Character 0:  
Num spaces: 1
Character 1:  
Num spaces: 2
Character 2:  
Num spaces: 3
Character 3:  
Num spaces: 4
Character 4: #
Second line without spaces:
# Verify the global option ``RELEASEBUILD`` defaults to ``OFF``
Character 0:  
Num spaces: 1
Character 1:  
Num spaces: 2
Character 2:  
Num spaces: 3
Character 3:  
Num spaces: 4
Character 4: #
Second line without spaces:
# Verify variable ``BUILDNUMBER`` defaults to ``0`` ( Zero )
Character 0:  
Num spaces: 1
Character 1:  
Num spaces: 2
Character 2:  
Num spaces: 3
Character 3:  
Num spaces: 4
Character 4: #
Second line without spaces:
# Verify variable ``VERSION`` defaults empty
Character 0:  
Num spaces: 1
Character 1:  
Num spaces: 2
Character 2:  
Num spaces: 3
Character 3:  
Num spaces: 4
Character 4: #
Second line without spaces:
# Verify variable ``BUILD_ID`` defaults empty
Character 0:  
Num spaces: 1
Character 1:  
Num spaces: 2
Character 2:  
Num spaces: 3
Character 3:  
Num spaces: 4
Character 4: #
Second line without spaces:
# Verify variable ``FULL_VERSION`` defaults to empty
Character 0:  
Num spaces: 1
Character 1:  
Num spaces: 2
Character 2:  
Num spaces: 3
Character 3:  
Num spaces: 4
Character 4: #
Second line without spaces:
# Testing macro ``private_buildnumber_commons``
Character 0:  
Num spaces: 1
Character 1:  
Num spaces: 2
Character 2:  
Num spaces: 3
Character 3:  
Num spaces: 4
Character 4:  
Num spaces: 5
Character 5:  
Num spaces: 6
Character 6:  
Num spaces: 7
Character 7:  
Num spaces: 8
Character 8: #
Second line without spaces:
# Verify ``IsStableBuild`` is ``1`` if ``RELEASEBUILD`` is ``ON``
Character 0:  
Num spaces: 1
Character 1:  
Num spaces: 2
Character 2:  
Num spaces: 3
Character 3:  
Num spaces: 4
Character 4:  
Num spaces: 5
Character 5:  
Num spaces: 6
Character 6:  
Num spaces: 7
Character 7:  
Num spaces: 8
Character 8: #
Second line without spaces:
# Verify ``IsStableBuild`` is ``0`` if ``RELEASEBUILD`` is ``OFF``
Character 0:  
Num spaces: 1
Character 1:  
Num spaces: 2
Character 2:  
Num spaces: 3
Character 3:  
Num spaces: 4
Character 4:  
Num spaces: 5
Character 5:  
Num spaces: 6
Character 6:  
Num spaces: 7
Character 7:  
Num spaces: 8
Character 8: #
Second line without spaces:
# Verify ``FULL_VERSION`` is ``VERSION`` if ``FULL_VERSIOM`` is not set
Writing for file /Users/dirk.schiller/Work/Coding/CPP/cmake-tools-tests/cmakelibs/tests/buildserver-helper.cmake
Writing RST file /Users/dirk.schiller/Work/Coding/CPP/cmake-tools-tests/docs/docs/buildserver-helper.rst
ANTLR runtime and generated code versions disagree: 4.8!=4.7.2
ANTLR runtime and generated code versions disagree: 4.8!=4.7.2
Writing for file /Users/dirk.schiller/Work/Coding/CPP/cmake-tools-tests/cmakelibs/tests/bundle-helper.cmake
Writing RST file /Users/dirk.schiller/Work/Coding/CPP/cmake-tools-tests/docs/docs/bundle-helper.rst
Running Sphinx v3.4.3
loading pickled environment... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 3 source files that are out of date
updating environment: 0 added, 3 changed, 0 removed
reading sources... [100%] docs/bundle-helper                                                                                                                                                                                               
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] index                                                                                                                                                                                                                
generating indices... genindex py-modindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.
AutonomicPerfectionist commented 3 years ago

Debug output removed in #36