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

added terminal output showing compile options selected #3291

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

shimwell
Copy link
Member

@shimwell shimwell commented Feb 4, 2025

Description

This PR adds a small amount of information to the user so that they can see which options were used to compile openmc

this is useful for CI when building different options

currently cmake .. outputs

-- Configuring DAGMC 3.2.4
-- Found DAGMC: /home/jon/code_development/DAGMC/lib/cmake/dagmc (version 3.2.4)
-- HDF5 C compiler wrapper is unable to compile a minimal HDF5 program.
-- HDF5 Libraries: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so
-- OpenMC C++ flags: 
-- OpenMC Linker flags: 
-- Submodule update
-- Found pugixml: /usr/local/lib/cmake/pugixml (version 1.10)
-- Found fmt: /usr/local/lib/cmake/fmt (version 11.0.2)
-- Found xtensor: /usr/local/share/cmake/xtensor (version 0.25.0)
-- Found gsl-lite: /usr/local/lib/cmake/gsl-lite (version 0.36.1)
-- Did not find Catch2, will use submodule instead
-- Configuring done (0.1s)
-- Generating done (0.0s)
-- Build files have been written to: /home/jon/openmc_fork/build

This PR would add a little info to the start and the cmake .. terminal output would look like this

-- OPENMC_USE_OPENMP ON
-- OPENMC_BUILD_TESTS ON
-- OPENMC_ENABLE_PROFILE OFF
-- OPENMC_ENABLE_COVERAGE OFF
-- OPENMC_USE_DAGMC ON
-- OPENMC_USE_LIBMESH OFF
-- OPENMC_USE_MPI OFF
-- OPENMC_USE_MCPL OFF
-- OPENMC_USE_NCRYSTAL OFF
-- OPENMC_USE_UWUW OFF
-- Configuring DAGMC 3.2.4
-- Found DAGMC: /home/jon/code_development/DAGMC/lib/cmake/dagmc (version 3.2.4)
-- HDF5 C compiler wrapper is unable to compile a minimal HDF5 program.
-- HDF5 Libraries: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so
-- OpenMC C++ flags: 
-- OpenMC Linker flags: 
-- Submodule update
-- Found pugixml: /usr/local/lib/cmake/pugixml (version 1.10)
-- Found fmt: /usr/local/lib/cmake/fmt (version 11.0.2)
-- Found xtensor: /usr/local/share/cmake/xtensor (version 0.25.0)
-- Found gsl-lite: /usr/local/lib/cmake/gsl-lite (version 0.36.1)
-- Did not find Catch2, will use submodule instead
-- Configuring done (0.1s)
-- Generating done (0.0s)
-- Build files have been written to: /home/jon/openmc_fork/build

Fixes # (issue)

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 15) on any C++ source files (if applicable)
  • I have made corresponding changes to the documentation (if applicable)

CMakeLists.txt Outdated Show resolved Hide resolved
@gridley
Copy link
Contributor

gridley commented Feb 9, 2025

For CI, why not just check the CMakeCache file?

@shimwell
Copy link
Member Author

For CI, why not just check the CMakeCache file?

I guess that would also work in some cases, but I think having terminal output in the CI logs is a bit more convenient than the connecting to the CI runner and opening a file.

The logs are also available for longer than the ability to connect to a runner and access files which means reviewers can see from the logs if something was built correctly sometime after the PR.

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

Successfully merging this pull request may close these issues.

3 participants