From 785ade96043ab6fff85646a841996ccf6dfd0b62 Mon Sep 17 00:00:00 2001 From: Kurt Kanzenbach Date: Wed, 28 Oct 2020 18:37:31 +0100 Subject: [PATCH] static_reinit: Remove export macro This macro leads to doc generation fail: |/home/kurt/git/hpx/build/docs/sphinx/libs/static_reinit/api.rst:29: WARNING:cpp:identifier reference target not found: HPX_EXPORT_REINITIALIZABLE_STATIC ... and it results in an exception in sphinx: |Traceback (most recent call last): | File "/usr/lib/python3.7/site-packages/sphinx/cmd/build.py", line 280, in build_main | app.build(args.force_all, filenames) | File "/usr/lib/python3.7/site-packages/sphinx/application.py", line 348, in build | self.builder.build_update() | File "/usr/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 299, in build_update | len(to_build)) | File "/usr/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 361, in build | self.write(docnames, list(updated_docnames), method) | File "/usr/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 535, in write | self._write_serial(sorted(docnames)) | File "/usr/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 542, in _write_serial | doctree = self.env.get_and_resolve_doctree(docname, self) | File "/usr/lib/python3.7/site-packages/sphinx/environment/__init__.py", line 539, in get_and_resolve_doctree | self.apply_post_transforms(doctree, docname) | File "/usr/lib/python3.7/site-packages/sphinx/environment/__init__.py", line 585, in apply_post_transforms | transformer.apply_transforms() | File "/usr/lib/python3.7/site-packages/sphinx/transforms/__init__.py", line 87, in apply_transforms | super().apply_transforms() | File "/usr/lib/python3.7/site-packages/docutils/transforms/__init__.py", line 171, in apply_transforms | transform.apply(**kwargs) | File "/usr/lib/python3.7/site-packages/sphinx/transforms/post_transforms/__init__.py", line 44, in apply | self.run(**kwargs) | File "/usr/lib/python3.7/site-packages/sphinx/transforms/post_transforms/__init__.py", line 88, in run | typ, target, node, contnode) | File "/usr/lib/python3.7/site-packages/sphinx/domains/cpp.py", line 7502, in resolve_xref | target, node, contnode)[0] | File "/usr/lib/python3.7/site-packages/sphinx/domains/cpp.py", line 7375, in _resolve_xref_inner | assert parentSymbol # should be there |AssertionError Actually the macro is not needed. So, just remove it until sphinx is fixed. Signed-off-by: Kurt Kanzenbach --- .../hpx/static_reinit/reinitializable_static.hpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/libs/static_reinit/include/hpx/static_reinit/reinitializable_static.hpp b/libs/static_reinit/include/hpx/static_reinit/reinitializable_static.hpp index 08980b9e269e..3c99400b9553 100644 --- a/libs/static_reinit/include/hpx/static_reinit/reinitializable_static.hpp +++ b/libs/static_reinit/include/hpx/static_reinit/reinitializable_static.hpp @@ -17,14 +17,6 @@ #include #include -// clang-format off -#if !defined(HPX_WINDOWS) -# define HPX_EXPORT_REINITIALIZABLE_STATIC HPX_EXPORT -#else -# define HPX_EXPORT_REINITIALIZABLE_STATIC -#endif -// clang-format on - namespace hpx { namespace util { /////////////////////////////////////////////////////////////////////////// // Provides thread-safe initialization of a single static instance of T. @@ -39,11 +31,11 @@ namespace hpx { namespace util { // functions used by the HPX runtime system to reinitialize the held data // structures. template - struct HPX_EXPORT_REINITIALIZABLE_STATIC reinitializable_static; + struct HPX_EXPORT reinitializable_static; ////////////////////////////////////////////////////////////////////////// template - struct HPX_EXPORT_REINITIALIZABLE_STATIC reinitializable_static + struct HPX_EXPORT reinitializable_static { public: HPX_NON_COPYABLE(reinitializable_static); @@ -157,5 +149,3 @@ namespace hpx { namespace util { template std::once_flag reinitializable_static::constructed_; }} // namespace hpx::util - -#undef HPX_EXPORT_REINITIALIZABLE_STATIC -- 2.26.2