Skip to content

Commit

Permalink
Automatic update of the addon py files based on xsd file
Browse files Browse the repository at this point in the history
When a new feature is implemented it is possible that this has consequences for the `compound.xsd` or `index.xsd` files and thus also for the derived `py` files in the doxmlparser addon.
The later is easy to oversee as the update of the `xsd` files is often noticed during the tests and with the `make tests` the update of the `py` files was not performed.
- adding the dependency to the `tests`
- removing the possibility to optional adding the update of the doxmlparser (the update was a reminiscence of the time that the doxmlparser was still a cpp file).
  • Loading branch information
albert-github committed Mar 27, 2024
1 parent 9b513db commit ea150b1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ jobs:
os: ubuntu-20.04,
build_type: "Release", cc: "gcc", cxx: "g++",
build_gen: "Unix Makefiles",
cmake_extra_opts: "-Dbuild_search=YES -Dbuild_app=YES -Dbuild_parse=YES -Dbuild_xmlparser=YES"
cmake_extra_opts: "-Dbuild_search=YES -Dbuild_app=YES -Dbuild_parse=YES"
}
- {
name: "Ubuntu Latest GCC Debug",
os: ubuntu-20.04,
build_type: "Debug", cc: "gcc", cxx: "g++",
build_gen: "Unix Makefiles",
cmake_extra_opts: "-Dbuild_search=YES -Dbuild_app=YES -Dbuild_parse=YES -Dbuild_xmlparser=YES"
cmake_extra_opts: "-Dbuild_search=YES -Dbuild_app=YES -Dbuild_parse=YES"
}
- {
name: "Ubuntu Latest Clang Release",
Expand Down
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ project(doxygen)
option(build_wizard "Build the GUI frontend for doxygen." OFF)
option(build_app "Example showing how to embed doxygen in an application." OFF)
option(build_parse "Parses source code and dumps the dependencies between the code elements." OFF)
option(build_xmlparser "Automatically update the XML parser modules when updating the schema files." OFF)
option(build_search "Build external search tools (doxysearch and doxyindexer)" OFF)
option(build_doc "Build user manual (HTML and PDF)" OFF)
option(build_doc_chm "Build user manual (CHM)" OFF)
Expand Down Expand Up @@ -230,6 +229,12 @@ if (build_doc)
endif ()

add_subdirectory(doc_internal)

find_package(generateDS)
set(update_doxmlparser_dependency "")
if (GENERATEDS_FOUND)
set(update_doxmlparser_dependency "update_doxmlparser_files")
endif()
add_subdirectory(addon)

enable_testing()
Expand Down
4 changes: 1 addition & 3 deletions addon/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
if (build_xmlparser)
add_subdirectory(doxmlparser)
endif ()
add_subdirectory(doxmlparser)

if (build_app)
add_subdirectory(doxyapp)
Expand Down
3 changes: 1 addition & 2 deletions addon/doxmlparser/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
find_package(generateDS)
if (GENERATEDS_FOUND)
add_custom_command(
COMMENT "Updating index.py from index.xsd..."
Expand All @@ -19,7 +18,7 @@ if (GENERATEDS_FOUND)
OUTPUT ${PROJECT_SOURCE_DIR}/addon/doxmlparser/doxmlparser/compound.py
)
add_custom_target(
update_doxmlparser_files ALL
${update_doxmlparser_dependency} ALL
DEPENDS ${PROJECT_SOURCE_DIR}/addon/doxmlparser/doxmlparser/index.py
DEPENDS ${PROJECT_SOURCE_DIR}/addon/doxmlparser/doxmlparser/compound.py
COMMENT "Updating doxmlparser module..."
Expand Down
2 changes: 1 addition & 1 deletion testing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
add_custom_target(tests
COMMENT "Running doxygen tests..."
COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/testing/runtests.py --doxygen ${PROJECT_BINARY_DIR}/bin/doxygen --inputdir ${PROJECT_SOURCE_DIR}/testing --outputdir ${PROJECT_BINARY_DIR}/testing
DEPENDS doxygen
DEPENDS doxygen ${update_doxmlparser_dependency}
)

# get the files in the testing directory starting with 3 digits and an underscore
Expand Down

0 comments on commit ea150b1

Please sign in to comment.