Giter Club home page Giter Club logo

Comments (5)

gdsjaar avatar gdsjaar commented on August 19, 2024

Yes, that is helpful.
Thanks,

..Greg

"A supercomputer is a device for turning compute-bound problems into I/O-bound problems"

From: "Roscoe A. Bartlett" <[email protected]mailto:[email protected]>
Reply-To: gdsjaar/seacas <[email protected]mailto:[email protected]>
Date: Thursday, November 5, 2015 at 11:00 AM
To: gdsjaar/seacas <[email protected]mailto:[email protected]>
Cc: "Sjaardema, Gregory D" <[email protected]mailto:[email protected]>
Subject: [EXTERNAL] [seacas] Don't need extra var sets in Dependencies.cmake when using ??? (#20)

@gdsjaarhttps://github.com/gdsjaar,

FYI:

When using the macro TRIBITS_PACKAGE_DEFINE_DEPENDENCIES()https://tribits.org/doc/TribitsDevelopersGuide.html#tribits-package-define-dependencies in a Dependencies.cmakehttps://tribits.org/doc/TribitsDevelopersGuide.html#packagedir-cmake-dependencies-cmake file, you don't need to set dependency vars anymore. They all get set in the macro arguments and those that are empty are set to "" automatically. For example, see TribitsExampleProject/with_subpackages/cmake/Dependencies.cmakehttps://github.com/TriBITSPub/TriBITS/blob/master/tribits/examples/TribitsExampleProject/packages/with_subpackages/cmake/Dependencies.cmake which shows:

TRIBITS_PACKAGE_DEFINE_DEPENDENCIES(
SUBPACKAGES_DIRS_CLASSIFICATIONS_OPTREQS
A a PT REQUIRED
B b ST OPTIONAL
C c ST OPTIONAL
)

Therefore, in the file seacas/cmake/Dependencies.cmakehttps://github.com/gdsjaar/seacas/blob/master/packages/seacas/cmake/Dependencies.cmake, you don't need to set the vars:

SET(LIB_REQUIRED_DEP_PACKAGES)
SET(LIB_OPTIONAL_DEP_PACKAGES)
SET(TEST_REQUIRED_DEP_PACKAGES)
SET(TEST_OPTIONAL_DEP_PACKAGES)
SET(LIB_REQUIRED_DEP_TPLS)
SET(LIB_OPTIONAL_DEP_TPLS MPI)
SET(TEST_REQUIRED_DEP_TPLS)
SET(TEST_OPTIONAL_DEP_TPLS)

They get set to empty "" by the macro TRIBITS_PACKAGE_DEFINE_DEPENDENCIES() automatically. This just removes clutter and avoids mistakes (that can be hidden by clutter).

Hope this is helpful.

Reply to this email directly or view it on GitHubhttps://github.com//issues/20.

from seacas.

gdsjaar avatar gdsjaar commented on August 19, 2024

Clarification - Is that just for the top-level Dependencies.cmake, or is that for all of the sub package cmake/Dependencies.cmake.

If they are all empty, can the Dependencies.cmake file be empty (for example, packages/seacas/libraries/svdi/cmake/Dependencies.cmake)

Thanks,

..GReg

"A supercomputer is a device for turning compute-bound problems into I/O-bound problems"

From: "Roscoe A. Bartlett" <[email protected]mailto:[email protected]>
Reply-To: gdsjaar/seacas <[email protected]mailto:[email protected]>
Date: Thursday, November 5, 2015 at 11:00 AM
To: gdsjaar/seacas <[email protected]mailto:[email protected]>
Cc: "Sjaardema, Gregory D" <[email protected]mailto:[email protected]>
Subject: [EXTERNAL] [seacas] Don't need extra var sets in Dependencies.cmake when using ??? (#20)

@gdsjaarhttps://github.com/gdsjaar,

FYI:

When using the macro TRIBITS_PACKAGE_DEFINE_DEPENDENCIES()https://tribits.org/doc/TribitsDevelopersGuide.html#tribits-package-define-dependencies in a Dependencies.cmakehttps://tribits.org/doc/TribitsDevelopersGuide.html#packagedir-cmake-dependencies-cmake file, you don't need to set dependency vars anymore. They all get set in the macro arguments and those that are empty are set to "" automatically. For example, see TribitsExampleProject/with_subpackages/cmake/Dependencies.cmakehttps://github.com/TriBITSPub/TriBITS/blob/master/tribits/examples/TribitsExampleProject/packages/with_subpackages/cmake/Dependencies.cmake which shows:

TRIBITS_PACKAGE_DEFINE_DEPENDENCIES(
SUBPACKAGES_DIRS_CLASSIFICATIONS_OPTREQS
A a PT REQUIRED
B b ST OPTIONAL
C c ST OPTIONAL
)

Therefore, in the file seacas/cmake/Dependencies.cmakehttps://github.com/gdsjaar/seacas/blob/master/packages/seacas/cmake/Dependencies.cmake, you don't need to set the vars:

SET(LIB_REQUIRED_DEP_PACKAGES)
SET(LIB_OPTIONAL_DEP_PACKAGES)
SET(TEST_REQUIRED_DEP_PACKAGES)
SET(TEST_OPTIONAL_DEP_PACKAGES)
SET(LIB_REQUIRED_DEP_TPLS)
SET(LIB_OPTIONAL_DEP_TPLS MPI)
SET(TEST_REQUIRED_DEP_TPLS)
SET(TEST_OPTIONAL_DEP_TPLS)

They get set to empty "" by the macro TRIBITS_PACKAGE_DEFINE_DEPENDENCIES() automatically. This just removes clutter and avoids mistakes (that can be hidden by clutter).

Hope this is helpful.

Reply to this email directly or view it on GitHubhttps://github.com//issues/20.

from seacas.

bartlettroscoe avatar bartlettroscoe commented on August 19, 2024

Clarification - Is that just for the top-level Dependencies.cmake, or is that for all of the sub package cmake/Dependencies.cmake.

You can use the macro TRIBITS_PACKAGE_DEFINE_DEPENDENCIES() in all Dependencies.cmake files.

If they are all empty, can the Dependencies.cmake file be empty (for example, packages/seacas/libraries/svdi/cmake/Dependencies.cmake)

In the case of packages/seacas/libraries/svdi/cmake/Dependencies.cmake, you have just a single TPL dependency so this should look like:

TRIBITS_PACKAGE_DEFINE_DEPENDENCIES(
  LIB_REQUIRED_TPLS X11
  )

Nice and simple, no clutter.

For examples, look at the Dependencies.cmake files under TribitsExampleProject/packages/with_subpackages/.

Let me know if you have more questions about this.

from seacas.

bartlettroscoe avatar bartlettroscoe commented on August 19, 2024

And if a package has no dependencies at all, you still need to call TRIBITS_PACKAGE_DEFINE_DEPENDENCIES() but you give it empty arguments like TribitsHelloWorld/hello_world/cmake/Dependencies.cmake which is:

TRIBITS_PACKAGE_DEFINE_DEPENDENCIES()

I will update the documentation to make this clear.

Note that all of these TriBITS examples under tribits/examples/ have automated testing of some type so they should all be correct at all times.

from seacas.

gdsjaar avatar gdsjaar commented on August 19, 2024

This has been applied to all Dependencies.cmake in seacas. Thanks, it definitely simplifies the files.

from seacas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.