-
Notifications
You must be signed in to change notification settings - Fork 170
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
Allow to compile aliroot/aliphysics with ninja #1272
Conversation
@brinick , @dberzano , @ktf , @pzhristov , Thanks in advance, |
Dear all, Given this precondition, does any of you see any drawback in the PR? |
@dstocco not at all. It's fine since it does not affect production. Can you just please align all the updated defaults, and rebase? I believe the AliRoot/AliPhysics versions changed in the meanwhile. Since there was a big PR pending for a while (#1293) we wanted to wait for it to be merged before proceeding. |
Hi Dario, I have to say that I do not recall why: probably it was done to avoid overwriting the ROOT6 version that I used for O2...but since the root version is different I guess that there is no conflict. Thanks, |
With my fixes, the diff between the original root6 default and yours follows: --- defaults-root6.sh 2018-10-04 09:37:14.000000000 +0200
+++ defaults-root6-ninja.sh 2018-10-04 17:15:55.000000000 +0200
@@ -1,9 +1,10 @@
-package: defaults-root6
+package: defaults-root6-ninja
version: v1
env:
CXXFLAGS: "-fPIC -g -O2 -std=c++11"
CFLAGS: "-fPIC -g -O2"
CMAKE_BUILD_TYPE: "RELWITHDEBINFO"
+ CMAKE_GENERATOR: "Ninja"
overrides:
CMake:
version: "%(tag_basename)s"
@@ -16,6 +17,15 @@ overrides:
set -e
which gfortran || { echo "gfortran missing"; exit 1; }
which cc && test -f $(dirname $(which cc))/c++ && printf "#define GCCVER ((__GNUC__ << 16)+(__GNUC_MINOR__ << 8)+(__GNUC_PATCHLEVEL__))\n#if (GCCVER < 0x070300)\n#error \"System's GCC cannot be used: we need at least GCC 7.X. We are going to compile our own version.\"\n#endif\n" | cc -xc++ - -c -o /dev/null
+ XRootD:
+ build_requires:
+ - CMake
+ - "OpenSSL:(?!osx)"
+ - "osx-system-openssl:(osx.*)"
+ - ApMon-CPP
+ - libxml2
+ - "GCC-Toolchain:(?!osx)"
+ - ninja
ROOT:
tag: "v6-10-08"
source: https://github.com/root-mirror/root
@@ -29,15 +39,27 @@ overrides:
- "GCC-Toolchain:(?!osx)"
- libpng
- lzma
+ build_requires:
+ - CMake
+ - "Xcode:(osx.*)"
+ - ninja
GSL:
prefer_system_check: |
printf "#include \"gsl/gsl_version.h\"\n#define GSL_V GSL_MAJOR_VERSION * 100 + GSL_MINOR_VERSION\n# if (GSL_V < 116)\n#error \"Cannot use system's gsl. Notice we only support versions from 1.16 (included)\"\n#endif\nint main(){}" | gcc -I$(brew --prefix gsl)/include -xc++ - -o /dev/null
AliRoot:
version: "%(commit_hash)s_ROOT6"
tag: v5-09-38
+ build_requires:
+ - CMake
+ - "Xcode:(osx.*)"
+ - AliTPCCommon
+ - ninja
AliPhysics:
version: "%(commit_hash)s_ROOT6"
tag: v5-09-38-01
+ build-requires:
+ - "Xcode:(osx.*)"
+ - ninja
GEANT4:
tag: v10.3.3
source: https://gitlab.cern.ch/geant4/geant4.git |
This PR introduces the possibility to compile aliroot/aliphysics with ninja.
Ninja is used only if the dedicated default (defaults-root6-ninja) is used. Otherwise, make will be used as default.
I tested that this PR has no impact whatsoever on the current workflow, unless the new default is explicitly called.