Skip to content
Snippets Groups Projects

CMakeLists: properly handle the GEOMODEL_BUILD_EXAMPLES_W_GEANT4 option

Merged Marilena Bandieramonte requested to merge fixCMakeExamples into main

The GEOMODEL_BUILD_EXAMPLES_W_GEANT4 option was working only when also the GEOMODEL_BUILD_EXAMPLES option was activated. Now:

  • if both options are active, only one of the 2 is taken into consideration to avoid double inclusion of folders
  • if only the GEOMODEL_BUILD_EXAMPLES_W_GEANT4 is set, the examples are built

This also allows the CI to test properly the Geant4 examples which were not built and tested before

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 4 commits

    Compare with previous version

  • Marilena Bandieramonte enabled an automatic merge when the pipeline for 721b9d80 succeeds

    enabled an automatic merge when the pipeline for 721b9d80 succeeds

  • mentioned in commit 816cea94

  • Hi @mbandier ,

    I was taking a look at the changes to the CMake logics added by this MR, and I have a question on the updated handling of the BUILD_EXAMPLES_WITH_G4 option.

    From the changes, it is not clear to me how the "examples with G4" are built when requested. I don't see any place where they are set to true and passed to the configuration.

    Thus, I checked the related CI job, and it seems that the gm-examples-g4 jobs does not build them anymore; as you can see from the screenshot, it looks as only Core and IO are built:

    image

    Am I missing something, or the CMake configuration needs to be tweaked?

    Thanks


    As a side note about the CI, I think we could think about adding some simple tests to our CI jobs. For instance, if a job is supposed to build the examples, at the end of the job we should check that the examples have been actually built, otherwise the CI cannot catch regression in the CMake configuration. But that's something for another MR, I guess.

    Edited by Riccardo Maria Bianchi
  • Hi Riccardo, Sorry for the late answer (in the meantime the MR was merged cause I set it to be automatically merged when the pipeline succeeded). As we discussed this morning, previously the BUILD_EXAMPLES_WITH_G4 option was also not working and the g4 examples were built only if also the BUILD_EXAMPLES option was ON. However, you are right cause there is still some logic missing, because now the g4 examples are built if the BUILD_EXAMPLES_WITH_G4=ON and also BUILD_GEOMODELG4=ON. I am going to correct this. Thanks for the nice catch!

Please register or sign in to reply
Loading