-
Notifications
You must be signed in to change notification settings - Fork 99
WIP: Modernize CMake infrastructure #632
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
Conversation
02dc422 to
ff7f7a9
Compare
|
@MohammadAlTurany @fuhlig1 I have decided to not use the upstream |
9ddc4e6 to
46814ec
Compare
46814ec to
7cffba0
Compare
|
It's almost rebased, looks like current I found another issue with |
7cffba0 to
38b0f79
Compare
This builds now on my machine. There are still couple of open points, I will resolve soon. First to come is fixing the testsuite. It currently does not work yet for the macro based tests. Will post updates here. |
Version.h.in
Outdated
| @@ -1,6 +1,6 @@ | |||
| #ifndef FAIRROOT_VERSION | |||
| #define FAIRROOT_VERSION "@FAIRROOT_VERSION@" | |||
| #define FAIRROOT_VERSION_INT (@FairRoot_VERSION_MAJOR@ * 1000000) + (@FairRoot_VERSION_MINOR@ * 1000) + @FairRoot_VERSION_PATCH@ | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why changing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FAIRROOT_VERSION_INT was not existing before this PR anyways. The diff you see here is just WIP commits that I have not yet squashed.
cmake/Dependencies.cmake
Outdated
| thread | ||
| timer | ||
| ) | ||
| if(Boost_FOUND) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why defining an extra variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not traced this down yet. I did not invent this variable ;)
cmake/Runtime.cmake
Outdated
| OUTPUT_STRIP_TRAILING_WHITESPACE | ||
| ) | ||
|
|
||
| ElseIf(CMAKE_SYSTEM_NAME MATCHES Darwin) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would try to be consistent with case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, parts of the CMake are still legacy, I have not touched much yet.
cmake/Runtime.cmake
Outdated
| list(APPEND LD_LIBRARY_PATH ${FAIRLIBDIR}) | ||
| list(REMOVE_DUPLICATES LD_LIBRARY_PATH) | ||
| set(VMCWORKDIR ${CMAKE_SOURCE_DIR}/examples) | ||
| set(MY_LD_LIBRARY_PATH ${LD_LIBRARY_PATH}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about Mac and DYLD_LIBRARY_PATH?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The content of MY_LD_LIBRARY_PATH gets emitted in the FairRootConfig.sh script as LD_LIBRARY_PATH and DYLD_LIBRARY_PATH.
cmake/modules/FindPythia8.cmake
Outdated
| ) | ||
|
|
||
| if(Pythia8_FOUND) | ||
| list(APPEND LD_LIBRARY_PATH ${PYTHIA8_LIB_DIR}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about Mac?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is just an internal variable. But this will change again. I don't like having to collect the lib dirs like this.
* Provide CMake package config * Install exported targets * Update ROOT_GENERATE_DICTIONARY and ROOT_LINKER_LIBRARY based on upstream * Switch to target properties instead of manual path handling, patch ROOT_GENERATE_DICTIONARY to fully support target properties * Modernize and cleanup Find* modules * Add support for native aliBuild search hints a la *_ROOT * Use CMake package configs of dependencies where possible * Rewrite old macros with new function interface if beneficial * Refactor/Deduplicate old "grown" spaghetti code * Clean and improve command line output * Remove dead code * Drop ROOT5 support * Set fairroot install prefix * Remove Geant3 dependency for EventDisplay (FairRootGroup#550) * Disable GoTutorial which puts temporary files into source dir * And more
ec62395 to
ef8cafc
Compare
|
Superseded by #933. |
Most of this work has been merged already.
Missing are the following breaking changes:
config.shin concert with SPackMajor rework:
ROOT_GENERATE_DICTIONARYandROOT_LINKER_LIBRARYbased on upstreamROOT_GENERATE_DICTIONARYto fully support target properties*_ROOTROOT5supportfairrootinstall prefixresolves also #464
TODO:
*[x]
Get ROOT PR merged. This is a precondition for the new library/dictionary generation code to work.We also need to provide a patch we apply locally for the transition phase, I guess.[x] Discuss installation directories. Prefix dir or not (after
libandbin)?share/fairbase?? -> decided in meeting on 8.9.17 to install tobin,lib/fairroot,include/fairroot, andshare/fairroot.[x] There have been other smaller non-critical PRs and bug reports for Geant3 (merged), Geant4 (open) and Geant4VMC (merged). IMHO the package configs of those projects could be extended to provide more info, so we have even less work to do in our Find modules. Do we want to invest this time? -> We can/should make contributions to CMake code of the above projects.
[x] resolve #513, the usage of environment variables should be reduced to Find modules only for aliBuild integration (_ROOT vars, mostly done) and the last places in
cmake/Misc.cmakeandcmake/modules/FairRootMacros.cmakeneed to be looked at.*[x] resolve #550
*[x] resolve alisw/alibuild#508
*[x] Finish fixing
examplesdirectory*[x] Generate package dependencies
*[x] Provide a feature summary output to get a concise overview, which components are built and which not and how to change that - basically document our build switches with some nice cmake output.
*[ ] Fix macro runtime -> Refactor variable set which is exported currently via
config.sh,root_macro.shand at least partly now inFAIRROOTConfig.cmake. IMHO we should avoid duplicating this logic in three places. I have foreseen the step filecmake/Runtime.cmaketo be the authoritative place for this. What do you think? @fuhlig1 We also need to decide which variables to export in our package config.*[ ] Convert
ROOT_GENERATE_DICTIONARYtotarget_root_dictionary*[ ] TEST TEST TEST (Mac, AliBuild etc)
*[ ] Update docs and project template!
in separate issue:
*[ ] Contribute to ROOT cmake
*[ ]
make check_overlinking