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

Create TriBITS Build Alongside Raw CMake Build #171

Closed
5 tasks done
jmgate opened this issue Mar 5, 2020 · 6 comments
Closed
5 tasks done

Create TriBITS Build Alongside Raw CMake Build #171

jmgate opened this issue Mar 5, 2020 · 6 comments
Assignees

Comments

@jmgate
Copy link
Collaborator

jmgate commented Mar 5, 2020

Part of #164.

What Needs to Be Done?

We are unable to get Compadre into Trilinos without first getting it building via TriBITS. One way to do this involves inserting a TriBITS build system alongside the raw CMake build system that already exists in Compadre. This includes the following steps:

  • Insert the include_tribits_build macro into the root CMakeLists.txt file.
  • Modify the root CMakeLists.txt file to include the following logic:
    if (${PROJECT_NAME}_TRIBITS_DIR)
      # Insert magic for TriBITS build.
    else()
      # Insert raw CMake build.
    endif()
  • Insert include_tribits_build() as the first line of all other CMakeLists.txt files.
  • Create CMakeLists.tribits.cmake files as siblings to all other CMakeLists.txt files, and insert the necessary TriBITS magic to do the equivalent to what's in the sibling file.
  • Make sure everything builds both ways.
@jmgate
Copy link
Collaborator Author

jmgate commented Mar 11, 2020

@bartlettroscoe, Compadre includes a header-only TPL that's snapshotted into its source in src/tpl/nanoflann.hpp. How do I include that sucker in the TriBITS build? It doesn't look like including it in TRIBITS_REPOSITORY_DEFINE_TPLS() is the right thing to do. Does something still belong in TPLsList.cmake though? Alternatively, should I just treat it as one of the package's header files instead of as a TPL?

@bartlettroscoe
Copy link

bartlettroscoe commented Mar 11, 2020

Compadre includes a header-only TPL that's snapshotted into its source in src/tpl/nanoflann.hpp

@jmgate, For now, to make your life easy, just treat as regular header files that belong to the Compadre package.

NOTE: In general it is ill advised to unconditionally build an external TPL in a your package since it causes integration problems down the line. See the M12 "For external dependencies, allow installing, building, and linking against an outside copy of external software in the document:

In the near future, TriBITS will support building this as an either internal package or point to an external pre-installed package (i.e. TPL). This is what the work in TriBITSPub/TriBITS#63 and TriBITSPub/TriBITS#299 will allow (which I am supposed to be working on right now instead of ATDM :-( ). That will satisfy that policy M12.

@jmgate
Copy link
Collaborator Author

jmgate commented Mar 12, 2020

Hey @kuberry, is your examples directory really examples, or is it tests? If both, any chance we could subdivide it such that theres an examples directory along with a tests one?

@kuberry
Copy link
Collaborator

kuberry commented Mar 12, 2020

Hi @jmgate, it is both the executables for the tests as well as the test. The test adding could be done in a tests folder. So yes, they can be divided.

@jmgate
Copy link
Collaborator Author

jmgate commented Mar 12, 2020

Do the executables for the tests get run on their own as examples, or are they just there for the sake of the tests?

@kuberry
Copy link
Collaborator

kuberry commented Mar 12, 2020

Both. They both demonstrate the ability to solve many different PDEs and also they exercise portions of the code base. We don't have any 'gold-file' type tests. Most tests either get the exact solution using a polynomial manufactured solution or perform a convergence study and check the rates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants