Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Second refactoring cleaning up to get ready for #63 #374

Merged

Conversation

bartlettroscoe
Copy link
Member

Getting this in a PR in case someone wants to review.

TriBITSPub#63)

One step in simplifying the macro
TRIBITS_READ_PROJECT_AND_PACKAGE_DEPENDENCIES_CREATE_GRAPH_PRINT_DEPS() to
rename it to TRIBITS_READ_DEPS_FILES_CREATE_DEPS_GRAPH() and put into its own
file.
…b#63)

The name was changed from
TRIBITS_READ_PROJECT_AND_PACKAGE_DEPENDENCIES_CREATE_GRAPH_PRINT_DEPS().  The
new name is accurate and is correct now that this now longer prints deps info.
…ew files (TriBITSPub#63)

This puts the specific macros and functions called by
TRIBITS_READ_DEPS_FILES_CREATE_DEPS_GRAPH() into a new file
TribitsReadDepsFilesCreateDepsGraph.cmake.  I also reordered the functions to
be close to clean-code ordering where the macro
TRIBITS_READ_DEPS_FILES_CREATE_DEPS_GRAPH() is at the top and the supporting
functions are under that.

To get this to work, I had to move some other macros and functions around.
Mostly, I moved some small helper functions to TribitsGeneralMacros.cmake.
That file really needs to be broken up through futher refactorings but I can
do that later.

While I was at it, I moved the macro TRIBITS_PACKAGE_DEFINE_DEPENDENCIES()
into its own file TribitsPackageDefineDependencies.cmake.
… remove output funcs, seprate unit tests (TriBITSPub#63)

This was a larger renaming and rearrangement of code:

* Renamed the macro TRIBITS_READ_PACKAGES_PROCESS_DEPENDENCIES_WRITE_XML() to
  TRIBITS_READ_ALL_PROJECT_DEPS_FILES_CREATE_DEPS_GRAPH() and the
  corresponding file TribitsReadPackagesProcessDepenenciesWriteXml.cmake to
  TribitsReadAllProjectDepsFilesCreateDepsGraph.cmake.

* Along with the above, I moved the functions
  TRIBITS_PRINT_INITIAL_DEPENDENCY_INFO() and
  TRIBITS_WRITE_XML_DEPENDENCY_FILES_IF_SUPPORTED() out of
  TRIBITS_READ_ALL_PROJECT_DEPS_FILES_CREATE_DEPS_GRAPH() to make the name
  simpler and its function and call graph simpler.

* Split the tests for TRIBITS_READ_ALL_PROJECT_DEPS_FILES_CREATE_DEPS_GRAPH()
  out of the file TribitsAdjustPackageEnables_UnitTests.cmake and into a new
  file TribitsReadAllProjectDepsFilesCreateDepsGraph_UnitTests.cmake.

* Had to move some code out of the file TribitsAdjustPackageEnables.cmake and
  make other small changes to other files to make the above unit tests pass.

* Changed name of file TribitsDumpXmlDependenciesFiles.cmake to
  TribitsWriteXmlDependenciesFiles.cmake to match the name of function which
  is contained in that file.
* Fixed some typos I happened to see

* Added link backs to the call graph section `Function call tree for
  constructing package dependency graph`_

* Improved some doc text
…riBITSPub#63)

This is so that I can test refactoring of printing of configure timings.
…riBITSPub#63, TriBITSPub#299)

This just cleans up the code and makes it easier to read which makes
refactorings like is needed for TriBITSPub#63 and TriBITSPub#299 easier.

I also changed the text for the timer for reading in the dependency files and
creating the dependency graph.  This should make this more clear what this is
doing hopefully.  (That is why I had to update one of the tests :-))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant