Skip to content

CMake compile fails without C++17 Standard #347

@j-signorelli

Description

@j-signorelli

Hi,

I am unable to compile GLVis using CMake with the current master branches of both unless I update the CXX standard in CMakeLists.txt from

set(CMAKE_CXX_STANDARD 11)

to

set(CMAKE_CXX_STANDARD 17)

The build fails with all errors related to not using C++17, like:

In file included from /home/j-signorelli/software/mfem/git_repo/linalg/linalg.hpp:40,
                 from /home/j-signorelli/software/mfem/git_repo/mfem.hpp:45,
                 from /home/j-signorelli/software/mfem/git_repo/build/mfem.hpp:3,
                 from /home/j-signorelli/software/mfem/glvis/lib/gl/../openglvis.hpp:19,
                 from /home/j-signorelli/software/mfem/glvis/lib/gl/../aux_vis.hpp:18,
                 from /home/j-signorelli/software/mfem/glvis/lib/gl/renderer_core.cpp:14:
/home/j-signorelli/software/mfem/git_repo/linalg/filteredsolver.hpp: In constructor ‘mfem::AMGFSolver::AMGFSolver()’:
/home/j-signorelli/software/mfem/git_repo/linalg/filteredsolver.hpp:130:18: error: ‘make_unique’ is not a member of ‘std’
  130 |       amg = std::make_unique<HypreBoomerAMG>();
      |                  ^~~~~~~~~~~
/home/j-signorelli/software/mfem/git_repo/linalg/filteredsolver.hpp:130:18: note: ‘std::make_unique’ is only available from C++14 onwards

Should this be updated since MFEM now uses C++17? Or is there something I am doing wrong on my end?

Thanks for any input!

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions