move the Unused.hpp file from opm-material to here
This commit is contained in:
@@ -54,6 +54,7 @@ list (APPEND PROGRAM_SOURCE_FILES
|
|||||||
list( APPEND PUBLIC_HEADER_FILES
|
list( APPEND PUBLIC_HEADER_FILES
|
||||||
opm/common/ErrorMacros.hpp
|
opm/common/ErrorMacros.hpp
|
||||||
opm/common/Exceptions.hpp
|
opm/common/Exceptions.hpp
|
||||||
|
opm/common/Unused.hpp
|
||||||
opm/common/data/SimulationDataContainer.hpp
|
opm/common/data/SimulationDataContainer.hpp
|
||||||
opm/common/OpmLog/CounterLog.hpp
|
opm/common/OpmLog/CounterLog.hpp
|
||||||
opm/common/OpmLog/EclipsePRTLog.hpp
|
opm/common/OpmLog/EclipsePRTLog.hpp
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
# defines that must be present in config.h for our headers
|
# defines that must be present in config.h for our headers
|
||||||
set (opm-common_CONFIG_VAR
|
set (opm-common_CONFIG_VAR
|
||||||
)
|
"HAS_ATTRIBUTE_UNUSED")
|
||||||
|
|
||||||
# dependencies
|
# dependencies
|
||||||
set (opm-common_DEPS
|
set (opm-common_DEPS
|
||||||
|
|||||||
43
opm/common/Unused.hpp
Normal file
43
opm/common/Unused.hpp
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||||
|
// vi: set et ts=4 sw=4 sts=4:
|
||||||
|
/*
|
||||||
|
This file is part of the Open Porous Media project (OPM).
|
||||||
|
|
||||||
|
OPM is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OPM is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*!
|
||||||
|
* \file
|
||||||
|
* \brief Provides the OPM_UNUSED macro
|
||||||
|
*
|
||||||
|
* This macro can be used to mark variables as "potentially unused" which suppresses some
|
||||||
|
* bogus compiler warnings. If the compiler does not support this, the macro is a no-op.
|
||||||
|
*/
|
||||||
|
#ifndef OPM_UNUSED_HH
|
||||||
|
#define OPM_UNUSED_HH
|
||||||
|
|
||||||
|
#ifndef HAS_ATTRIBUTE_UNUSED
|
||||||
|
#define OPM_UNUSED
|
||||||
|
#else
|
||||||
|
#define OPM_UNUSED __attribute__((unused))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef NDEBUG
|
||||||
|
#define OPM_DEBUG_UNUSED
|
||||||
|
#define OPM_OPTIM_UNUSED OPM_UNUSED
|
||||||
|
#else
|
||||||
|
#define OPM_DEBUG_UNUSED OPM_UNUSED
|
||||||
|
#define OPM_OPTIM_UNUSED
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
Reference in New Issue
Block a user