dash icon indicating copy to clipboard operation
dash copied to clipboard

Cmake version requirements

Open jprotze opened this issue 6 years ago • 6 comments

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.

jprotze avatar May 02 '18 13:05 jprotze

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.

rkowalewski avatar May 02 '18 14:05 rkowalewski

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.

fmoessbauer avatar May 21 '18 16:05 fmoessbauer

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

jprotze avatar May 21 '18 17:05 jprotze

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.

fmoessbauer avatar May 21 '18 17:05 fmoessbauer

@devreal , @rkowalewski : Is this still an issue? Do we plan to lift the CMake version?

fmoessbauer avatar Oct 15 '18 18:10 fmoessbauer

From my point of view, we can upgrade the minimal CMake required to >=3.0.

devreal avatar Oct 15 '18 19:10 devreal