WorkDir CMake 3.15+ Fix, master branch (2020.02.02.)
This is a belated update along the same lines as how all the other projects in the repository have recently been updated in !29347 (merged).
Thanks to @christos for pointing this out. (That the WorkDir project no longer works against the latest nightly...) The necessary fixes were relatively minor in the end... Also, it's worth noting that the Fortran support in the WorkDir project has been broken for a loooong time. I guess nobody wanted to develop any Fortran code against a nightly in the last 1-2 years...
This is relatively urgent, as people will start complaining tomorrow morning.
Merge request reports
Activity
added Build review-pending-level-1 labels
added RC Attention Required label
mentioned in commit 40132a3f
CI Result SUCCESS (hash dace9592)Athena AthSimulation externals cmake make required tests optional tests Full details available on this CI monitor view
Athena: number of compilation errors 0, warnings 0
AthSimulation: number of compilation errors 0, warnings 0
For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 9032]added sweep:ignore label
- Resolved by Joerg Stelzer
1 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration 1 2 # 2 3 # Project file for building a selected set of packages against an 3 4 # installed ATLAS release/nightly. 4 5 # 5 6 6 # Set the minimum required CMake version: 7 cmake_minimum_required( VERSION 3.6 FATAL_ERROR ) 7 # Set up the project. 8 cmake_minimum_required( VERSION 3.6 ) 9 project( WorkDir VERSION 1.0.0 LANGUAGES C CXX ) @akraszna you are hard-coding the WorkDir version here to
1.0.0
, which is not good. E.g. in the trigger we rely on this being the Athena version. Otherwise the build behaves different between full release and WorkDir builds:I'll try to make a fix...
I was wondering about this... I believe it should be okay to callfind_package(...)
before theproject(...)
call. So this should be solvable. Though I wonder if we should make that package rely on something other than${CMAKE_PROJECT_VERSION}
. (Though I don't have a good proposal at this point... )Doing the
project(...)
call afterfind_package( Athena )
doesn't seem to work. I get some very strange errors with that. But calling it twice (first without version and then with proper version) seems to do the trick. The documentation doesn't say this is supported but the source code explicitly does: https://gitlab.kitware.com/cmake/cmake/blob/master/Source/cmProjectCommand.cxx#L61-66So maybe we can go with that solution at least for the moment...
mentioned in merge request !30035 (merged)
It is definitely okay to call
project(...)
multiple times inside of a software project.https://cmake.org/cmake/help/latest/variable/CMAKE_PROJECT_VERSION.html
But yeah, the description about project(...) is definitely not too obvious about this.
So okay, this could be good enough for now. But I'll definitely think a bit on how we could do it better. It just seems a bit too much of a hack. (Though for the
WorkDir
project, being a bit hacky, is not the end of the world...)mentioned in commit 372de00e