From 1078df1d559c3ab87274b76c18903497167520de Mon Sep 17 00:00:00 2001 From: Teemu Murtola Date: Mon, 7 Jul 2014 18:28:22 +0300 Subject: [PATCH] Move GMX_CXX11 to config.h Now that uniqueptr.h is not used by any installed header, do not install it. Move GMX_CXX11 that was used only by this file to config.h now that config.h can be freely included in that file. Part of #1454 Change-Id: Ie4c2f23057962f2dc1f96c309c10d5ce0c2c2a74 --- src/config.h.cmakein | 3 +++ src/gromacs/utility.h | 6 +++--- src/gromacs/utility/CMakeLists.txt | 2 +- src/gromacs/utility/gmx_header_config_gen.h.cmakein | 3 --- src/gromacs/utility/uniqueptr.h | 12 +++++++----- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/config.h.cmakein b/src/config.h.cmakein index c0fe73d85e..b1397b5c59 100644 --- a/src/config.h.cmakein +++ b/src/config.h.cmakein @@ -93,6 +93,9 @@ /* Target platform is BlueGene/Q */ #cmakedefine GMX_TARGET_BGQ +/** Define if we have sufficient C++11 support */ +#cmakedefine GMX_CXX11 + /* GCC bug in AVX maskload/maskstore arguments - worked around internally */ #cmakedefine GMX_SIMD_X86_AVX_GCC_MASKLOAD_BUG diff --git a/src/gromacs/utility.h b/src/gromacs/utility.h index 1bf7655a57..9abfa1cbb6 100644 --- a/src/gromacs/utility.h +++ b/src/gromacs/utility.h @@ -108,9 +108,6 @@ * The header flags.h implements a gmx::FlagsTemplate template for better type * safety when using bit flag fields. * - * The header uniqueptr.h declares gmx::gmx_unique_ptr, which is intended for - * declaring smart pointer types with unique ownership. - * * *

Other Functionality

* @@ -145,6 +142,9 @@ * The header qsort_threadsafe.h provides a guaranteed threadsafe * implementation for qsort(). * + * The header uniqueptr.h declares gmx::gmx_unique_ptr, which is intended for + * declaring smart pointer types with unique ownership. + * * \endif * * \author Teemu Murtola diff --git a/src/gromacs/utility/CMakeLists.txt b/src/gromacs/utility/CMakeLists.txt index 00b1339672..84b48dbb6c 100644 --- a/src/gromacs/utility/CMakeLists.txt +++ b/src/gromacs/utility/CMakeLists.txt @@ -57,7 +57,7 @@ set(UTILITY_PUBLIC_HEADERS real.h smalloc.h stringutil.h - uniqueptr.h) + ) gmx_install_headers(utility ${UTILITY_PUBLIC_HEADERS}) gmx_install_headers(utility ${GENERATED_HEADER_CONFIG}) diff --git a/src/gromacs/utility/gmx_header_config_gen.h.cmakein b/src/gromacs/utility/gmx_header_config_gen.h.cmakein index 3e99283735..61b550a2cc 100644 --- a/src/gromacs/utility/gmx_header_config_gen.h.cmakein +++ b/src/gromacs/utility/gmx_header_config_gen.h.cmakein @@ -56,6 +56,3 @@ #ifdef _MSC_VER #define GMX_NATIVE_WINDOWS #endif - -/** Define if we have sufficient C++11 support */ -#cmakedefine GMX_CXX11 diff --git a/src/gromacs/utility/uniqueptr.h b/src/gromacs/utility/uniqueptr.h index c9157f9755..93d376cd8a 100644 --- a/src/gromacs/utility/uniqueptr.h +++ b/src/gromacs/utility/uniqueptr.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2012,2013, by the GROMACS development team, led by + * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -32,7 +32,7 @@ * To help us fund GROMACS development, we humbly ask that you cite * the research papers on the package. Check out http://www.gromacs.org. */ -/*! \file +/*! \libinternal \file * \brief * Declares gmx::gmx_unique_ptr and supporting functionality. * @@ -44,7 +44,7 @@ #ifndef GMX_UTILITY_UNIQUEPTR_H #define GMX_UTILITY_UNIQUEPTR_H -#include "gmx_header_config.h" +#include "config.h" #ifdef GMX_CXX11 // C++11 Compiler #include @@ -56,7 +56,8 @@ namespace gmx { -/*! \class gmx_unique_ptr +//! \cond libapi +/*! \libinternal \class gmx_unique_ptr * \brief * Smart pointer for unique ownership. * @@ -73,7 +74,7 @@ namespace gmx * \ingroup module_utility * \inlibraryapi */ -/*! \typedef gmx_unique_ptr::type +/*! \libinternal \typedef gmx_unique_ptr::type * \brief The smart pointer type. * Work-around for the non-existence of template typedefs in C++03. */ @@ -105,6 +106,7 @@ struct gmx_unique_ptr typedef boost::shared_ptr type; }; #endif +//! \endcond } // namespace gmx -- 2.22.0