Comments (8)
FairMQ tests now depend on GTest. You should be able to disable the building of (FairMQ) tests via the BUILD_TESTING
cmake option from ctest, see https://cmake.org/cmake/help/v3.0/module/CTest.html. It is on by default.
from fairroot.
I have tried the BUILD_TESTING
switch again to verify and it basically does not create the test
target if switched off. In addition, FairMQ tests are not built as intended.
from fairroot.
IMHO you should be very careful when adding dependencies like this, breaking backward compatibility. As a user of FairRoot I would have expected that if GTest was not present, only the tests depending on GTest would have been disabled, not building the whole project.
from fairroot.
As a developer I will not take blame for breaking things in the dev
branch... (Why do we have tools like git revert
and alibuild init
if we do not use them)
As a user I expect the FairRoot build system to be declarative about which components are built (cmake build switches).
The fact that targets are only built depending on the environment is in my opinion broken and dangerous. Unfortunately, as a single developer in a single PR I can only touch a limited number of issues..
from fairroot.
I will not comment on your first statement, since I am leaving for holidays tomorrow and I do not want to start a flame war the night before... ;-)
For what concerns the second part, being declarative is fine, I am perfectly happy to specify -DGTEST_ROOT=$GTEST_ROOT
if I want the GTest part being built. Actually I think every single dependency should be explicit and there should not be any environment involved (see issue #513). However, if I do not specify a given external, all its dependencies should be turned off. Having to different places which control the same feature is dangerous and does not make any particular sense:
- specifying
GTEST_ROOT
andBUILD_TEST=NO
does not make any sense - not specifying
GTEST_ROOT
andBUILD_TEST=YES
does not work
So I remain of my idea that if GTEST_ROOT is not set, you should not build the tests depending on GTEST.
from fairroot.
not specifying GTEST_ROOT and BUILD_TEST=YES does not work
Why not? FindGTest could have picked up GTest from system paths.
Having two different places which control the same feature is dangerous (...)
*_ROOT
: optional path hints forfind_package
modulesBUILD_*
: build switches with default values
I do not see why we should break this CMake idiom. I also do not see how it is dangerous.
If I set -DBUILD_TESTING=ON
, I will expect always the full test suite to be built and not just a subset implicitely depending on the environment. Giving GTEST_ROOT
the same semantics as BUILD_TESTING
, as you suggest, is IMHO problematic, because, as you said yourself, not all tests might depend on GTest and it makes the GTEST_ROOT
variable mandatory.
So I remain of my idea that if GTEST_ROOT is not set, you should not build the tests depending on GTEST.
You consider the O2 aliBuild environment only which is not the whole picture. I can see few rare usecases, where you might want to build depending on *_FOUND
family of variables though, e.g. to provide alternative implementations.
from fairroot.
I guess this discussion has died. Therefore closing, but reopen any time.
from fairroot.
I meant to reply but never found the time. Yes, indeed, I meant GTEST_FOUND
, not GTEST_ROOT
. If GTEST_FOUND=NO
building tests should be disabled by default, IMHO, especially if this was the previous behaviour.
from fairroot.
Related Issues (20)
- Return value check of GetSource()->InitUnpackers() HOT 2
- FairEventHeader not displayed properly by tree->Print()
- Inconsistency in the file names of merged parameter files HOT 7
- ROOT dictionary error: only virtual member can be marked 'override' HOT 16
- FairRootConfig.sh sets FAIRROOTPAYTH to "" HOT 6
- The option -DBUILD_UNITTESTS=ON does not work for v18.8_patches HOT 2
- Protobuf compiler version 3.20.1 doesn't match library version 3.12.4 HOT 3
- Ownership semantics of `FairRootManager::GetObject` HOT 7
- Undefined symbols for architecture arm64 (install Fairroot -b v18.6.9 on MacBook Air M1, 2020) HOT 12
- Meta-Issue: Tasks for getting Codemeta better
- Tutorial3 Sampler crashes when trying to remove a file HOT 5
- FairRunAna::Run() unclear description HOT 1
- Create EventDisplay test HOT 4
- CTest errors fail to be caught by the CI workflow HOT 1
- About getter functions
- Make SetMaterials method from FairRunSim available in FairRunAna as well
- Two incompatible event headers in FairRunAna and FairRootManager HOT 3
- Processed Event output HOT 4
- Selective skipping of further event processing HOT 4
- When I follow this procedure, the following problem occurs. What am I doing wrong please? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fairroot.