eudaq / eudaq

EUDAQ Data Acquisition Framework
GNU Lesser General Public License v3.0
29 stars 144 forks source link

fix c++14/17 mishaps #617

Open cburgard opened 4 years ago

cburgard commented 4 years ago

When trying to compile eudaq2 on my system, I encounter some issues because for some parts of the compilation chain (specifically, the itkstrip modules), conflicting standards are set: both c++14 and c++17 are enabled, which leads to some faulty includes of the std library, breaking the compilation.

When trying to salvage this by updating cmake/Platform.cmake to explicitly only use c++17 when available (shamelessly stealing the corresponding pieces of code from corryvreckan), I get crashes due to c++17 incompatibilities in extern/include/IMPL: ISO C++17 does not allow dynamic exception specifications

It would be nice to have the code use a consistent standard (c++14 or, preferably, c++17) all the way through!

eyiliu commented 4 years ago

The extern/include/IMPL: ISO C++17 does not allow dynamic exception specifications comes LCIO dependency lib which unfortunately use some features which are removed by C++17.

In general, the minimum requirement for EUDAQ2 is C++11. During the CMKAE config, it picks up the standard for each eudaq components. They are not required to same C++ standard, since ABI are compatible.

When trying to compile eudaq2 on my system, I encounter some issues because for some parts of the compilation chain (specifically, the itkstrip modules), conflicting standards are set: both c++14 and c++17 are enabled, which leads to some faulty includes of the std library, breaking the compilation.

If you have problem to build itkstrip modules, what is the error? Some times, ROOT dependency might introduce some build issue. The user/itkstrip/itsroot/CMakeLists.txt sets part of itkstrip being C++14 for some build issue by ROOT. https://github.com/eudaq/eudaq/blob/master/user/itkstrip/itsroot/CMakeLists.txt#L15

You might try to adjust it.

Note that: C++17 compilers might not available everywhere. The EUDAQ2 might still need to support linux which comes with very old gcc.

Yi