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

WIP: Convert to use ExternalProject #11

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mathomp4
Copy link
Collaborator

@mathomp4 mathomp4 commented Jul 1, 2022

This is a draft PR to capture the experiments with ExternalProject_Add in GFE by myself and @tclune.

At the moment, this seems to build GFE just fine. The issue at the moment is we aren't sure how to do the tests bit.

For example, in current GFE you do:

  1. mkdir build && cd build
  2. cmake .. -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_PREFIX_PATH=../install -DSKIP_OPENMP=ON
  3. make install
  4. cmake .. -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_PREFIX_PATH=../install -DSKIP_OPENMP=ON
  5. make tests

The second cmake is that the first time around, there was no pFUnit, so no tests were created to build by CMake. Now it sees the installed pFUnit and can make the tests.

Now, with the ExternalProject_Add version you have to do:

  1. mkdir build && cd build
  2. cmake .. -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_PREFIX_PATH=../install -DSKIP_OPENMP=ON
  3. make (note NO install)
  4. rm -rf * (the build directory must be removed)
  5. cmake .. -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_PREFIX_PATH=../install -DSKIP_OPENMP=ON
  6. make gFTL-tests
  7. make yaFyaml-tests
  8. ...

So you have to run each set of tests individually.

The questions going forward:

  1. Can you get ExternalProject_Add to somehow "re-run" CMake for you?
  2. Can we make a new custom tests target that when we do make tests will run the tests for each subproject?

@mathomp4 mathomp4 added the enhancement New feature or request label Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants