dash
dash copied to clipboard
Cmake version requirements
When compiling dash with clang compiler and cmake version 2.8.12.2, the compilation results in errors like:
DASH-SRC/dash/test/meta/ConstexprTest.cc:15:19: error: constexpr variable 'acc' must be initialized by a constant expression
constexpr int acc = dash::ce::accumulate(
^ ~~~~~~~~~~~~~~~~~~~~~
After switching to a more recent cmake version (3.6.0), the error is gone.
In my opinion, the minimum required cmake version should be lifted.
Could you please post the generated compile_commands.json
with CMake 2.8 and CMake 3.6.0. I think this depends on the c++ standard which should be at least c++11.
A minimal CI environment (cmake 2.8.12, gcc 4.8) is added in #552. As the bug does not show up there, this is a cmake unrelated issue.
compile_commands.json-3.6.0.txt compile_commands.json-2.8.12.2.txt
cmake 3.6.0 adds -std=gnu99 and -std=gnu++14 as compiler flags
Hi Joachim, thanks for the logs, I'm now able to reproduce the bug. Seems to be a bug in CMake, working on a fix.
@devreal , @rkowalewski : Is this still an issue? Do we plan to lift the CMake version?
From my point of view, we can upgrade the minimal CMake required to >=3.0.