- Move macro for checking for GCC visibility support to a separate file
- Delete the "serialize()" method of concrete_environment, since useless git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@721 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
6152a06268
commit
cd9a73ee0e
|
@ -63,8 +63,11 @@ CLEANFILES =
|
|||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
install_macros = m4/sgpemv2-dirs.m4
|
||||
macros = m4/compilerflags.m4 \
|
||||
install_macros = \
|
||||
m4/sgpemv2-dirs.m4 \
|
||||
m4/sgpemv2-visibility.m4
|
||||
macros = \
|
||||
m4/compilerflags.m4 \
|
||||
m4/linkingflags.m4
|
||||
|
||||
EXTRA_DIST += \
|
||||
|
|
48
configure.ac
48
configure.ac
|
@ -94,53 +94,7 @@ PKG_CHECK_MODULES([GTKMM],
|
|||
:, AC_MSG_ERROR([$GTKMM_PKG_ERRORS]))
|
||||
|
||||
dnl use DSO visibility tags for systems that supports it correctly
|
||||
dnl (for example, GCC 4.0 and above)
|
||||
dnl see http://gcc.gnu.org/wiki/Visibility for more informations
|
||||
AH_TEMPLATE([SG_DLLEXPORT],[Attribute for objects to be exported from DSOs])
|
||||
AH_TEMPLATE([SG_DLLIMPORT],[Attribute for objects to be imported from DSOs])
|
||||
AH_TEMPLATE([SG_DLLLOCAL], [Attribute for objects local to current DSO])
|
||||
AH_TEMPLATE([SG_DLLPUBLIC],[Attribute for DSO public objects])
|
||||
|
||||
AC_ARG_ENABLE([visibility-support],
|
||||
AS_HELP_STRING([--disable-visibility-support],
|
||||
[disable the new GCC visibility support]),
|
||||
[enable_gcc_visibility="$enableval"],
|
||||
[enable_gcc_visibility="yes"])
|
||||
AC_MSG_CHECKING([whether to use new GCC visibility attributes])
|
||||
|
||||
dnl for now it works only with GCC >= 4.0.0
|
||||
AC_LANG_PUSH([C++])
|
||||
if test "x$enable_gcc_visibility" = "xyes"; then
|
||||
AC_COMPILE_IFELSE(
|
||||
AC_LANG_PROGRAM([], [
|
||||
#if defined __GNUC__ && (__GNUC__) >= 4
|
||||
return 0;
|
||||
#else
|
||||
bails out with a compilation error.
|
||||
#endif
|
||||
]),
|
||||
:,
|
||||
[enable_gcc_visibility="no"])
|
||||
fi
|
||||
AC_LANG_POP
|
||||
|
||||
if test "x$enable_gcc_visibility" = "xyes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([SG_DLLIMPORT],[/* intentionally left with no value */])
|
||||
AC_DEFINE([SG_DLLEXPORT],[__attribute__ ((visibility("default")))])
|
||||
AC_DEFINE([SG_DLLLOCAL],[__attribute__ ((visibility("hidden")))])
|
||||
AC_DEFINE([SG_DLLPUBLIC],[__attribute__ ((visibility("default")))])
|
||||
|
||||
AC_CHECK_CXXFLAG([VISIB_HIDDEN], [fvisibility=hidden])
|
||||
AC_SUBST([VISIB_HIDDEN])
|
||||
AC_CHECK_CXXFLAG([CXXFLAGS],[fvisibility-inlines-hidden])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_DEFINE([SG_DLLIMPORT],[/* unsupported */])
|
||||
AC_DEFINE([SG_DLLEXPORT],[/* unsupported */])
|
||||
AC_DEFINE([SG_DLLLOCAL],[/* unsupported */])
|
||||
AC_DEFINE([SG_DLLPUBLIC],[/* unsupported */])
|
||||
fi
|
||||
SGPEMV2_VISIBILITY_SUPPORT
|
||||
|
||||
dnl check for Doxygen
|
||||
AC_CHECK_PROG([HAVE_DOXYGEN],[doxygen],[yes])
|
||||
|
|
|
@ -0,0 +1,87 @@
|
|||
dnl m4/sgpemv2-visibility.m4 - Copyright 2005, 2006, University
|
||||
dnl of Padova, dept. of Pure and Applied
|
||||
dnl Mathematics
|
||||
dnl
|
||||
dnl This file is part of SGPEMv2.
|
||||
dnl
|
||||
dnl This is free software; you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
dnl the Free Software Foundation; either version 2 of the License, or
|
||||
dnl (at your option) any later version.
|
||||
dnl
|
||||
dnl SGPEMv2 is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
dnl GNU General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License
|
||||
dnl along with SGPEMv2; if not, write to the Free Software
|
||||
dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
dnl ---------- AC_PROG_SGPEMV2 ---------------------
|
||||
dnl
|
||||
dnl Synopsis: AC_PROG_SGPEMV2([min_version])
|
||||
dnl
|
||||
dnl This macro enables the new DSO visibility
|
||||
dnl support for compilers that supports it, defining
|
||||
dnl the following preprocessor macros:
|
||||
dnl SG_DLLEXPORT : for objects exported by the DSO
|
||||
dnl SG_DLLIMPORT : for objects imported by the DSO
|
||||
dnl SG_DLLLOCAL : for objects local to the DSO
|
||||
dnl SG_DLLPUBLIC : for objects public outside the DSO
|
||||
dnl
|
||||
dnl Example of usage: SGPEMV2_VISIBILITY_SUPPORT
|
||||
dnl ------------------------------------------------
|
||||
AC_DEFUN([SGPEMV2_VISIBILITY_SUPPORT],
|
||||
[
|
||||
|
||||
dnl use DSO visibility tags for systems that supports it correctly
|
||||
dnl (for example, GCC 4.0 and above)
|
||||
dnl see http://gcc.gnu.org/wiki/Visibility for more informations
|
||||
AH_TEMPLATE([SG_DLLEXPORT],[Attribute for objects to be exported from DSOs])
|
||||
AH_TEMPLATE([SG_DLLIMPORT],[Attribute for objects to be imported from DSOs])
|
||||
AH_TEMPLATE([SG_DLLLOCAL], [Attribute for objects local to current DSO])
|
||||
AH_TEMPLATE([SG_DLLPUBLIC],[Attribute for DSO public objects])
|
||||
|
||||
AC_ARG_ENABLE([visibility-support],
|
||||
AS_HELP_STRING([--disable-visibility-support],
|
||||
[disable the new GCC visibility support]),
|
||||
[enable_gcc_visibility="$enableval"],
|
||||
[enable_gcc_visibility="yes"])
|
||||
AC_MSG_CHECKING([whether to use new GCC visibility attributes])
|
||||
|
||||
dnl for now it works only with GCC >= 4.0.0
|
||||
AC_LANG_PUSH([C++])
|
||||
if test "x$enable_gcc_visibility" = "xyes"; then
|
||||
AC_COMPILE_IFELSE(
|
||||
AC_LANG_PROGRAM([], [
|
||||
#if defined __GNUC__ && (__GNUC__) >= 4
|
||||
return 0;
|
||||
#else
|
||||
bails out with a compilation error.
|
||||
#endif
|
||||
]),
|
||||
:,
|
||||
[enable_gcc_visibility="no"])
|
||||
fi
|
||||
AC_LANG_POP
|
||||
|
||||
if test "x$enable_gcc_visibility" = "xyes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([SG_DLLIMPORT],[/* intentionally left with no value */])
|
||||
AC_DEFINE([SG_DLLEXPORT],[__attribute__ ((visibility("default")))])
|
||||
AC_DEFINE([SG_DLLLOCAL],[__attribute__ ((visibility("hidden")))])
|
||||
AC_DEFINE([SG_DLLPUBLIC],[__attribute__ ((visibility("default")))])
|
||||
|
||||
AC_CHECK_CXXFLAG([VISIB_HIDDEN], [fvisibility=hidden])
|
||||
AC_SUBST([VISIB_HIDDEN])
|
||||
AC_CHECK_CXXFLAG([CXXFLAGS],[fvisibility-inlines-hidden])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_DEFINE([SG_DLLIMPORT],[/* unsupported */])
|
||||
AC_DEFINE([SG_DLLEXPORT],[/* unsupported */])
|
||||
AC_DEFINE([SG_DLLLOCAL],[/* unsupported */])
|
||||
AC_DEFINE([SG_DLLPUBLIC],[/* unsupported */])
|
||||
fi
|
||||
|
||||
])dnl ------- SGPEMV2_VISIBILITY_SUPPORT ---------------------
|
|
@ -136,6 +136,7 @@ ConcreteEnvironment::get_request_queue(resource_key_t resource_key) const
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
return request_queue;
|
||||
}
|
||||
|
||||
|
@ -171,11 +172,3 @@ ConcreteEnvironment::~ConcreteEnvironment()
|
|||
// After that, the destructor of _processes is invoked (only invalid pointers)
|
||||
// After that, the destructor of _resources is invoked (only invalid pointers)
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
ConcreteEnvironment::serialize(SerializeVisitor& translator) const
|
||||
{
|
||||
// TODO: call something like translator.serializeEnvironment(this);
|
||||
}
|
||||
|
|
|
@ -155,12 +155,6 @@ namespace sgpem
|
|||
~ConcreteEnvironment();
|
||||
|
||||
|
||||
|
||||
/// \brief Serializes the whole environment.
|
||||
/// \see SerializeVisitor
|
||||
virtual void
|
||||
serialize(SerializeVisitor& translator) const;
|
||||
|
||||
private:
|
||||
/// \brief The container of all Resource objecs.
|
||||
/// Actually contains only DynamicResource objects.
|
||||
|
|
Loading…
Reference in New Issue