Skip to content

Build System Update #1071

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

Merged
merged 10 commits into from
Jul 1, 2021
Merged

Conversation

ChristianTackeGSI
Copy link
Member

@ChristianTackeGSI ChristianTackeGSI commented Jun 27, 2021

  • Bump VERSION to 19.0.0, not yet released
  • Drop a lot of ancient things, like fairsoft-config usage (still used as a last fallback for C++-Level-Detection), FAIRSOFT_EXTERN support
  • Use FairRoot config mode package in find-module
  • Upgrade to FairCMakeModules 0.2
    • Use FairSummary from FCM
    • Use find_package2_implicit_dependencies()
    • Drop fallback
  • C++-Level Handling improved

Checklist:

@dennisklein
Copy link
Member

* [ ]  Should we prepend `SIMPATH` to `CMAKE_PREFIX_PATH`?

set(CMAKE_PREFIX_PATH ${SIMPATH} ${CMAKE_PREFIX_PATH})

* [ ]  Should we bump the FairRoot version to 19.0.0 just now also?

Yes please (in dev).

@dennisklein
Copy link
Member

I installed FairCMakeModules v0.2.0 into all CI images (in gsi-debian.8.sif it is installed to /usr/local - for all others in the respective /fairsoft/... directories)

@ChristianTackeGSI ChristianTackeGSI force-pushed the pr/fcm_bump branch 3 times, most recently from 4fe3ec9 to 25ff6ce Compare June 28, 2021 09:06
@ChristianTackeGSI ChristianTackeGSI force-pushed the pr/fcm_bump branch 5 times, most recently from 919f36c to 831b1e3 Compare July 1, 2021 09:40
@ChristianTackeGSI ChristianTackeGSI changed the title FairCMakeModules: Bump to 0.2, Drop Fallback Build System Update Jul 1, 2021
@ChristianTackeGSI ChristianTackeGSI marked this pull request as ready for review July 1, 2021 09:48
So that building and using this will already yield a newer
version.
If a test passed, only 1 kB of it was sent to CDash.  This
is okay to get a quick look, but not at all, if you want to
inspect things.
It looks like there once was a mode, where the
subdirectories of a FairSoft/SIMPATH installation were
structured for topics.

This mode does not exist any more.

If you install things into multiple prefixes (like with
spack), use CMAKE_PREFIX_PATH to list all the prefixes and
be done!
Bump the requirement on FairCMakeModules to 0.2.
Version 0.2 brings support for
find_package2_implicit_dependencies().

Also drop the internal fallbacks.  All important
distribution channels (FairSoft, brew, ...) have it now.
It's easy to install from source. So there isn't a good
reason to not have it installed.
First: Use find_package2_implicit_dependencies() in FairRoot and the
templates.

Second simplify FairLogger/fmt dependency handling:

FairRoot itself is now fully using CMake targets.
So there is no need to setup include directories for all
and everything.

On the other hand, projects using FairRoot are not yet
there (especially, they can't with FairRoot itself until
soon).  So let's improve include directory handling for
them.  This is especially useful on spack based builds.

See-Also: 89ccd48
fairsoft-config has two main points:
* Provide the FairSoft version.  FairRoot doesn't care at
  all.
* Provide compiler flags and C++-Level.

For the compiler flags, we just assume, that the user uses
a compatible setting, really.

For the C++-Level, we have
fairroot_check_root_cxxstd_compatibility() to check for the
compatibility with the ROOT C++-Level.
(It currently only emits a warning.)
`fairroot_check_root_cxxstd_compatibility()` is a macro to
check the compatibility of the current C++-Level with the
one of ROOT.

Recommend to use it and actually use it in the templates.
The new config mode package can easily transfer
configure/build time information to the package consumer.

Our config mode package is very minimal currently. So it
doesn't pollute anything.

So let's import (find_package) the config mode package from
inside the find module!
First for users of FairRoot:
* FairRoot exports the `CXX_STANDARD` level as
  `FairRoot_CXX_STANDARD`.
* `Check_Compiler()` uses this to set the minimum
  `CXX_STANDARD` for any users of FairRoot.  You should
  call `Check_Compiler()` after `find_package(FairRoot)`.

For FairRoot itself:
* If `CMAKE_CXX_STANDARD` is not set from outside, detect
  ROOT's `CXX_STANDARD` from its
  `target_compile_features()`.  This means, that
  `Check_Compiler()` must be called after
  `find_package(ROOT)`.
* If `CMAKE_CXX_STANDARD` is not set, try to ask
  fairsoft-config.
* Handle `PROJECT_MIN_CXX_STANDARD`.
FairCMakeModules's new FairSummary has some nice function
inspired by some of the code in FairRoot.
Let's use it in FairRoot to replace our local code.

Let's use it in the templates to make them better.
@dennisklein dennisklein added this to the v19.0 milestone Jul 1, 2021
@dennisklein dennisklein enabled auto-merge (rebase) July 1, 2021 14:16
@dennisklein dennisklein merged commit 07a6f63 into FairRootGroup:dev Jul 1, 2021
@ChristianTackeGSI ChristianTackeGSI deleted the pr/fcm_bump branch July 1, 2021 15:03
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.

2 participants