Skip to content

Add config_summary to Spiner. - #103

Merged
Yurlungur merged 6 commits into
mainfrom
bkk_config_summary
Jul 27, 2026
Merged

Add config_summary to Spiner.#103
Yurlungur merged 6 commits into
mainfrom
bkk_config_summary

Conversation

@BrendanKKrueger

Copy link
Copy Markdown
Collaborator

PR Summary

As with Ports-of-Call:

  • The config_summary stuff is something we put together for Singe because we've found it useful in other projects. If you're not interested in adding this to Spiner, feel free to close this MR.
  • This is just an attempt to add config_summary and may not be set up the way you like. Feel free to tweak it or ask me to adjust things.

I'm not positive, but it seems like spiner_content_declare may not be setting up the <packagename>_VERSION variables, which causes the output from config_summary to look weird. This may suggest I need to fix config_summary, someone needs to fix spiner_content_declare, or Spiner just shouldn't mix the two together.

Example screenshot of config_summary output:
screenshot

PR Checklist

  • Code is formatted. (You can use the format_spiner make target.)
  • Adds a test for any bugs fixed. Adds tests for new features.
  • If preparing for a new release, update the version in cmake.

@BrendanKKrueger

Copy link
Copy Markdown
Collaborator Author

I ran into this issue elsewhere (for example lanl/ports-of-call#65), and the issue is probably that we need to export the version flag to the parent scope. But I may have to play with things a bit to get spiner_content_declare to handle it all correctly, because it's not as simple as searching for find_package and adding the appropriate set command. Making a note for when someone (possibly future-me) gets around to addressing this.

@Yurlungur

Copy link
Copy Markdown
Collaborator

@BrendanKKrueger I'm sorry to have neglected this so long. This would be great to include. Is it ready to go?

Diego and I have made some changes since this branch was last updated.
I don't recall the details, but updating to match the latest version in
Nautilus (Singe, Nautilus, and SuNRe generally are consistent with each
other).
@BrendanKKrueger

Copy link
Copy Markdown
Collaborator Author

@Yurlungur currently you get the following:

-------------------------------------------------------------------------------
Ports-of-Call configuration summary (version 2.0.0)
-------------------------------------------------------------------------------
CMake Options
   CMAKE_BUILD_TYPE                                 : RelWithDebInfo
   CMAKE_C_COMPILER                                 : 
   CMAKE_C_COMPILER_VERSION                         : 
   CMAKE_C_FLAGS                                    : 
   CMAKE_CXX_COMPILER                               : /usr/bin/c++
   CMAKE_CXX_COMPILER_VERSION                       : 13.3.0
   CMAKE_CXX_FLAGS                                  : 
User Options
   PORTS_OF_CALL_BUILD_TESTING                      : OFF
   PORTS_OF_CALL_TEST_PORTABILITY_STRATEGY          : 
-------------------------------------------------------------------------------

Would you like this to be tweaked or modified or expanded in any way to be more useful for Spiner's specific settings?

@Yurlungur

Copy link
Copy Markdown
Collaborator

@Yurlungur currently you get the following:

-------------------------------------------------------------------------------
Ports-of-Call configuration summary (version 2.0.0)
-------------------------------------------------------------------------------
CMake Options
   CMAKE_BUILD_TYPE                                 : RelWithDebInfo
   CMAKE_C_COMPILER                                 : 
   CMAKE_C_COMPILER_VERSION                         : 
   CMAKE_C_FLAGS                                    : 
   CMAKE_CXX_COMPILER                               : /usr/bin/c++
   CMAKE_CXX_COMPILER_VERSION                       : 13.3.0
   CMAKE_CXX_FLAGS                                  : 
User Options
   PORTS_OF_CALL_BUILD_TESTING                      : OFF
   PORTS_OF_CALL_TEST_PORTABILITY_STRATEGY          : 
-------------------------------------------------------------------------------

Would you like this to be tweaked or modified or expanded in any way to be more useful for Spiner's specific settings?

It looks to me like you already include all the options in the build?

config_summary_block("CMake Options")
config_summary_variable("CMAKE_BUILD_TYPE")
config_summary_variable("CMAKE_CXX_COMPILER")
config_summary_variable("CMAKE_CXX_COMPILER_VERSION")
config_summary_variable("CMAKE_CXX_FLAGS")
config_summary_variable("CLANG_FORMAT_VERSION")

config_summary_block("Dependencies")
config_summary_dependency("Catch2" "Catch2")
config_summary_dependency("HDF5" "hdf5")
config_summary_dependency("Kokkos" "Kokkos" "${SPINER_TEST_USE_KOKKOS}")
config_summary_dependency("Ports-of-Call" "ports-of-call")

config_summary_block("User Options")
config_summary_option("SPINER_USE_HDF")
config_summary_option("SPINER_BUILD_TESTS")
config_summary_option("SPINER_TEST_USE_KOKKOS")
config_summary_option("SPINER_TEST_USE_KOKKOS_CUDA")

So that looks good to me. I also don't want to let the perfect be the enemy of the good.

@Yurlungur Yurlungur self-assigned this Jul 27, 2026
@Yurlungur Yurlungur added the enhancement New feature or request label Jul 27, 2026
@Yurlungur
Yurlungur merged commit 7309048 into main Jul 27, 2026
4 checks passed
@Yurlungur
Yurlungur deleted the bkk_config_summary branch July 27, 2026 14:22
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.

4 participants