Project

General

Profile

Bug #2073

cmake fails with CMAKE_CXX_FLAGS="-Wall -Werror"

Added by Christoph Junghans about 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
build system
Target version:
Affected version - extra info:
b252d15b6ebec2b94e8ca82dd3de529b29df7f9b
Affected version:
Difficulty:
uncategorized
Close

Description

Using -Wall together with -Werror makes cmake fail:

cmake -DCMAKE_CXX_FLAGS="-Wall -Werror" ..
...
-- Performing Test CXX11_SUPPORTED - Failed
CMake Error at cmake/gmxTestCXX11.cmake:113 (message):
  This version of GROMACS requires a C++11 compiler.  Please use a newer
  compiler or use the GROMACS 5.1.x release.  See the installation guide for
  details.
Call Stack (most recent call first):
  CMakeLists.txt:164 (gmx_test_cxx11)

-- Configuring incomplete, errors occurred!

due to
build/CMakeFiles/CMakeTmp/src.cxx:45:11: error: unused variable ‘x’ [-Werror=unused-variable]
   double *x = nullptr;
           ^
cc1plus: all warnings being treated as errors

Associated revisions

Revision 31f0c056 (diff)
Added by Aleksei Iupinov almost 3 years ago

Fix compilation with CMAKE_CXX_FLAGS="-Wall -Werror"

Refs #2073

Change-Id: I9223b13e8abd251d56378052ace4fb4e9169a2aa

History

#1 Updated by Gerrit Code Review Bot almost 3 years ago

Gerrit received a related DRAFT patchset '1' for Issue #2073.
Uploader: Aleksei Iupinov ()
Change-Id: gromacs~release-2016~I9223b13e8abd251d56378052ace4fb4e9169a2aa
Gerrit URL: https://gerrit.gromacs.org/6405

#2 Updated by Aleksei Iupinov almost 3 years ago

^ Not a draft anymore.

#3 Updated by Mark Abraham almost 3 years ago

  • Status changed from New to Closed

Also available in: Atom PDF