# be set up elsewhere and passed to this function, but it is
# inconvenient in CMake to pass more than one list, and such a
# list is only used here.
- foreach(build_type RELWITHDEBUGINFO RELWITHASSERT MINSIZEREL)
+ foreach(build_type RELWITHDEBUGINFO RELWITHASSERT MINSIZEREL PROFILE)
set(GMXC_${language}FLAGS_${build_type} "${GMXC_${language}FLAGS_RELEASE}")
endforeach()
# Copy the flags that are only used by the real Release build
# Since 4.8 on by default. For previous version disabling is a no-op. Only disabling for Release because with assert
# the warnings are OK.
GMX_TEST_CFLAG(CFLAGS_WARN_REL "-Wno-array-bounds" GMXC_CFLAGS_RELEASE_ONLY)
- # Since gcc 4.8 strict - false postives with old gmx_fatal. TODO: Remove in master
- GMX_TEST_CFLAG(CFLAGS_WARN_UNINIT "-Wno-maybe-uninitialized" GMXC_CFLAGS)
if(CYGWIN)
GMX_TEST_CFLAG(CFLAGS_WARN_SUBSCRIPT "-Wno-char-subscripts" GMXC_CFLAGS)
endif()
# new in gcc 4.5
GMX_TEST_CFLAG(CFLAGS_EXCESS_PREC "-fexcess-precision=fast" GMXC_CFLAGS_RELEASE)
- GMX_TEST_CFLAG(CFLAGS_COPT "-fomit-frame-pointer -funroll-all-loops"
+ GMX_TEST_CFLAG(CFLAGS_COPT "-funroll-all-loops"
GMXC_CFLAGS_RELEASE)
GMX_TEST_CFLAG(CFLAGS_NOINLINE "-fno-inline" GMXC_CFLAGS_DEBUG)
endif()
GMX_TEST_CFLAG(CXXFLAGS_WARN_REL "-Wno-array-bounds" GMXC_CXXFLAGS_RELEASE_ONLY)
# new in gcc 4.5
GMX_TEST_CXXFLAG(CXXFLAGS_EXCESS_PREC "-fexcess-precision=fast" GMXC_CXXFLAGS_RELEASE)
- GMX_TEST_CXXFLAG(CXXFLAGS_COPT "-fomit-frame-pointer -funroll-all-loops"
+ GMX_TEST_CXXFLAG(CXXFLAGS_COPT "-funroll-all-loops"
GMXC_CXXFLAGS_RELEASE)
GMX_TEST_CXXFLAG(CXXFLAGS_NOINLINE "-fno-inline" GMXC_CXXFLAGS_DEBUG)
endif()
if (CMAKE_C_COMPILER_ID MATCHES "Intel")
if (NOT WIN32)
if(NOT GMX_OPENMP)
- GMX_TEST_CFLAG(CFLAGS_PRAGMA "-wd161" GMXC_CFLAGS)
+ if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 13.99.99)
+ # 3180: unrecognized OpenMP #pragma
+ GMX_TEST_CFLAG(CFLAGS_PRAGMA "-wd3180" GMXC_CFLAGS)
+ else()
+ # 161: unrecognized #pragma
+ GMX_TEST_CFLAG(CFLAGS_PRAGMA "-wd161" GMXC_CFLAGS)
+ endif()
endif()
+ # 111: statement is unreachable
+ # 177: function ".." was declared but never referenced
+ # 181: argument of type ".." is incompatible with format "..", expecting argument of type ".."
+ # 193: zero used for undefined preprocessing identifier ".."
+ # 271: trailing comma is nonstandard
+ # 304: access control not specified ("public" by default)
+ # 383: value copied to temporary, reference to temporary used
+ # 424: extra ";" ignored
+ # 444: destructor for base class ".." is not virtual
+ # 522: function ".." redeclared "inline" after being called
+ # 593: variable ".." was set but never used
+ # 869: parameter ".." was never referenced
+ # 981: operands are evaluated in unspecified order
+ #1418: external function definition with no prior declaration
+ #1419: external declaration in primary source file
+ #1572: floating-point equality and inequality comparisons are unreliable
+ #1599: declaration hides variable ".."
+ #2259: non-pointer conversion from ".." to ".." may lose significant bits
+ #2415: variable ".." of static storage duration was declared but never referenced
+ #2547: ".." was specified as both a system and non-system include directory
+ #2557: comparison between signed and unsigned operands
+ #3280: declaration hides member ".."
+ #3346: dynamic exception specifications are deprecated
GMX_TEST_CFLAG(CFLAGS_WARN "-w3 -wd111 -wd177 -wd181 -wd193 -wd271 -wd304 -wd383 -wd424 -wd444 -wd522 -wd593 -wd869 -wd981 -wd1418 -wd1419 -wd1572 -wd1599 -wd2259 -wd2415 -wd2547 -wd2557 -wd3280 -wd3346" GMXC_CFLAGS)
GMX_TEST_CFLAG(CFLAGS_STDGNU "-std=gnu99" GMXC_CFLAGS)
GMX_TEST_CFLAG(CFLAGS_OPT "-ip -funroll-all-loops -alias-const -ansi-alias" GMXC_CFLAGS_RELEASE)
+ #documented to be default but not set for ICC15. Gives remarks that inlining is not possible because of max-size setting
+ GMX_TEST_CFLAG(CFLAGS_INLINE "-no-inline-max-size -no-inline-max-total-size" GMXC_CFLAGS)
else()
if(NOT GMX_OPENMP)
- GMX_TEST_CFLAG(CFLAGS_PRAGMA "/wd161" GMXC_CFLAGS)
+ if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 13.99.99)
+ GMX_TEST_CFLAG(CFLAGS_PRAGMA "/wd3180" GMXC_CFLAGS)
+ else()
+ GMX_TEST_CFLAG(CFLAGS_PRAGMA "/wd161" GMXC_CFLAGS)
+ endif()
endif()
GMX_TEST_CFLAG(CFLAGS_WARN "/W3 /wd111 /wd177 /wd181 /wd193 /wd271 /wd304 /wd383 /wd424 /wd444 /wd522 /wd593 /wd869 /wd981 /wd1418 /wd1419 /wd1572 /wd1599 /wd2259 /wd2415 /wd2547 /wd2557 /wd3280 /wd3346" GMXC_CFLAGS)
GMX_TEST_CFLAG(CFLAGS_OPT "/Qip" GMXC_CFLAGS_RELEASE)
if (CMAKE_CXX_COMPILER_ID MATCHES "Intel")
if (NOT WIN32)
if(NOT GMX_OPENMP)
- GMX_TEST_CXXFLAG(CXXFLAGS_PRAGMA "-wd161" GMXC_CXXFLAGS)
+ if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 13.99.99)
+ GMX_TEST_CXXFLAG(CXXFLAGS_PRAGMA "-wd3180" GMXC_CXXFLAGS)
+ else()
+ GMX_TEST_CXXFLAG(CXXFLAGS_PRAGMA "-wd161" GMXC_CXXFLAGS)
+ endif()
endif()
- GMX_TEST_CXXFLAG(CXXFLAGS_WARN "-w3 -wd111 -wd177 -wd181 -wd193 -wd271 -wd304 -wd383 -wd424 -wd444 -wd522 -wd593 -wd869 -wd981 -wd1418 -wd1419 -wd1572 -wd1599 -wd2259 -wd2415 -wd2547 -wd2557 -wd3280 -wd3346 -wd1782" GMXC_CXXFLAGS)
+ #All but the following warnings are identical for the C-compiler (see above)
+ #1782: #pragma once is obsolete
+ #2282: unrecognized GCC pragma
+ GMX_TEST_CXXFLAG(CXXFLAGS_WARN "-w3 -wd111 -wd177 -wd181 -wd193 -wd271 -wd304 -wd383 -wd424 -wd444 -wd522 -wd593 -wd869 -wd981 -wd1418 -wd1419 -wd1572 -wd1599 -wd2259 -wd2415 -wd2547 -wd2557 -wd3280 -wd3346 -wd1782 -wd2282" GMXC_CXXFLAGS)
GMX_TEST_CXXFLAG(CXXFLAGS_OPT "-ip -funroll-all-loops -alias-const -ansi-alias" GMXC_CXXFLAGS_RELEASE)
+ GMX_TEST_CXXFLAG(CXXFLAGS_INLINE "-no-inline-max-size -no-inline-max-total-size" GMXC_CXXFLAGS)
else()
if(NOT GMX_OPENMP)
- GMX_TEST_CXXFLAG(CXXFLAGS_PRAGMA "/wd161" GMXC_CXXFLAGS)
+ if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 13.99.99)
+ GMX_TEST_CXXFLAG(CXXFLAGS_PRAGMA "/wd3180" GMXC_CFLAGS)
+ else()
+ GMX_TEST_CXXFLAG(CXXFLAGS_PRAGMA "/wd161" GMXC_CXXFLAGS)
+ endif()
endif()
- GMX_TEST_CXXFLAG(CXXFLAGS_WARN "/W3 /wd111 /wd177 /wd181 /wd193 /wd271 /wd304 /wd383 /wd424 /wd444 /wd522 /wd593 /wd869 /wd981 /wd1418 /wd1419 /wd1572 /wd1599 /wd2259 /wd2415 /wd2547 /wd2557 /wd3280 /wd3346 /wd1782" GMXC_CXXFLAGS)
+ GMX_TEST_CXXFLAG(CXXFLAGS_WARN "/W3 /wd111 /wd177 /wd181 /wd193 /wd271 /wd304 /wd383 /wd424 /wd444 /wd522 /wd593 /wd869 /wd981 /wd1418 /wd1419 /wd1572 /wd1599 /wd2259 /wd2415 /wd2547 /wd2557 /wd3280 /wd3346 /wd1782 /wd2282" GMXC_CXXFLAGS)
GMX_TEST_CXXFLAG(CXXFLAGS_OPT "/Qip" GMXC_CXXFLAGS_RELEASE)
endif()
endif()
* \author Teemu Murtola <teemu.murtola@gmail.com>
* \ingroup module_analysisdata
*/
+#include "gmxpre.h"
+
+#include "gromacs/analysisdata/analysisdata.h"
+
#include <gmock/gmock.h>
#include <gtest/gtest.h>
-#include "gromacs/analysisdata/analysisdata.h"
#include "gromacs/analysisdata/paralleloptions.h"
#include "gromacs/utility/exceptions.h"
public:
static const AnalysisDataTestInput &get()
{
- #ifndef INTEL_STATIC_ANON_NAMESPACE_BUG
+ #ifndef STATIC_ANON_NAMESPACE_BUG
static SimpleInputData singleton;
return singleton.data_;
#else
public:
static const AnalysisDataTestInput &get()
{
- #ifndef INTEL_STATIC_ANON_NAMESPACE_BUG
+ #ifndef STATIC_ANON_NAMESPACE_BUG
static DataSetsInputData singleton;
return singleton.data_;
#else
public:
static const AnalysisDataTestInput &get()
{
- #ifndef INTEL_STATIC_ANON_NAMESPACE_BUG
+ #ifndef STATIC_ANON_NAMESPACE_BUG
static MultipointInputData singleton;
return singleton.data_;
#else
public:
static const AnalysisDataTestInput &get()
{
- #ifndef INTEL_STATIC_ANON_NAMESPACE_BUG
+ #ifndef STATIC_ANON_NAMESPACE_BUG
static MultipointDataSetsInputData singleton;
return singleton.data_;
#else
* \author Teemu Murtola <teemu.murtola@gmail.com>
* \ingroup module_analysisdata
*/
+#include "gmxpre.h"
+
+#include "gromacs/analysisdata/modules/histogram.h"
+
#include <gtest/gtest.h>
#include "gromacs/analysisdata/analysisdata.h"
-#include "gromacs/analysisdata/modules/histogram.h"
#include "gromacs/analysisdata/tests/datatest.h"
#include "testutils/testasserts.h"
public:
static const AnalysisDataTestInput &get()
{
- #ifndef INTEL_STATIC_ANON_NAMESPACE_BUG
+ #ifndef STATIC_ANON_NAMESPACE_BUG
static SimpleInputData singleton;
return singleton.data_;
#else
public:
static const AnalysisDataTestInput &get()
{
- #ifndef INTEL_STATIC_ANON_NAMESPACE_BUG
+ #ifndef STATIC_ANON_NAMESPACE_BUG
static WeightedSimpleInputData singleton;
return singleton.data_;
#else
public:
static const AnalysisDataTestInput &get()
{
- #ifndef INTEL_STATIC_ANON_NAMESPACE_BUG
+ #ifndef STATIC_ANON_NAMESPACE_BUG
static WeightedDataSetInputData singleton;
return singleton.data_;
#else
public:
static const AnalysisDataTestInput &get()
{
- #ifndef INTEL_STATIC_ANON_NAMESPACE_BUG
+ #ifndef STATIC_ANON_NAMESPACE_BUG
static AverageInputData singleton;
return singleton.data_;
#else