-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get rid of MantidKernel/System.h #38457
Labels
Maintenance
Unassigned issues to be addressed in the next maintenance period.
Comments
peterfpeterson
added
the
Maintenance
Unassigned issues to be addressed in the next maintenance period.
label
Nov 27, 2024
This was referenced Dec 17, 2024
From a small test, removing |
peterfpeterson
added a commit
to peterfpeterson/mantid
that referenced
this issue
Dec 20, 2024
This is part of mantidproject#38457 which cleans up all of Kernel except the precompiled headers. System.h is still included in the generated DllConfig.h file, but all of its necessary functionality should have been pulled from System.h once everything else is ready.
This was referenced Dec 20, 2024
peterfpeterson
added a commit
to peterfpeterson/mantid
that referenced
this issue
Dec 20, 2024
This is part of mantidproject#38457 which cleans up all of Kernel except the precompiled headers. System.h is still included in the generated DllConfig.h file, but all of its necessary functionality should have been pulled from System.h once everything else is ready.
peterfpeterson
added a commit
to peterfpeterson/mantid
that referenced
this issue
Dec 23, 2024
This is part of mantidproject#38457 which cleans up all of Kernel except the precompiled headers. System.h is still included in the generated DllConfig.h file, but all of its necessary functionality should have been pulled from System.h once everything else is ready.
peterfpeterson
added a commit
to peterfpeterson/mantid
that referenced
this issue
Dec 23, 2024
This is part of mantidproject#38457 which cleans up all of Kernel except the precompiled headers. System.h is still included in the generated DllConfig.h file, but all of its necessary functionality should have been pulled from System.h once everything else is ready.
peterfpeterson
added a commit
to peterfpeterson/mantid
that referenced
this issue
Dec 23, 2024
This is for PythonInterface, LiveData, and Nexus subpackages as part of mantidproject#38457
peterfpeterson
added a commit
to peterfpeterson/mantid
that referenced
this issue
Dec 23, 2024
This is part of mantidproject#38457 which cleans up all of Kernel except the precompiled headers. System.h is still included in the generated DllConfig.h file, but all of its necessary functionality should have been pulled from System.h once everything else is ready.
peterfpeterson
added a commit
to peterfpeterson/mantid
that referenced
this issue
Dec 23, 2024
This is for PythonInterface, LiveData, and Nexus subpackages as part of mantidproject#38457
peterfpeterson
added a commit
to peterfpeterson/mantid
that referenced
this issue
Dec 23, 2024
This is part of mantidproject#38457 which cleans up all of Kernel except the precompiled headers. System.h is still included in the generated DllConfig.h file, but all of its necessary functionality should have been pulled from System.h once everything else is ready.
peterfpeterson
added a commit
to peterfpeterson/mantid
that referenced
this issue
Dec 23, 2024
This is part of mantidproject#38457 which cleans up all of Kernel except the precompiled headers. System.h is still included in the generated DllConfig.h file, but all of its necessary functionality should have been pulled from System.h once everything else is ready.
peterfpeterson
added a commit
to peterfpeterson/mantid
that referenced
this issue
Dec 23, 2024
This is for PythonInterface, LiveData, and Nexus subpackages as part of mantidproject#38457
peterfpeterson
added a commit
to peterfpeterson/mantid
that referenced
this issue
Dec 26, 2024
This is part of mantidproject#38457 which cleans up all of Kernel except the precompiled headers. System.h is still included in the generated DllConfig.h file, but all of its necessary functionality should have been pulled from System.h once everything else is ready.
peterfpeterson
added a commit
to peterfpeterson/mantid
that referenced
this issue
Dec 27, 2024
This is part of mantidproject#38457 which cleans up all of Kernel except the precompiled headers. System.h is still included in the generated DllConfig.h file, but all of its necessary functionality should have been pulled from System.h once everything else is ready.
peterfpeterson
added a commit
to peterfpeterson/mantid
that referenced
this issue
Dec 27, 2024
This is for PythonInterface, LiveData, and Nexus subpackages as part of mantidproject#38457
For reference, the generated #ifndef MANTID_KERNEL_DLL_H
#define MANTID_KERNEL_DLL_H
#ifdef MANTID_KERNEL_STATIC_DEFINE
# define MANTID_KERNEL_DLL
# define MANTID_KERNEL_NO_EXPORT
#else
# ifndef MANTID_KERNEL_DLL
# ifdef Kernel_EXPORTS
/* We are building this library */
# define MANTID_KERNEL_DLL __declspec(dllexport)
# else
/* We are using this library */
# define MANTID_KERNEL_DLL __declspec(dllimport)
# endif
# endif
# ifndef MANTID_KERNEL_NO_EXPORT
# define MANTID_KERNEL_NO_EXPORT
# endif
#endif
#ifndef MANTID_KERNEL_DEPRECATED
# define MANTID_KERNEL_DEPRECATED __declspec(deprecated)
#endif
#ifndef MANTID_KERNEL_DEPRECATED_EXPORT
# define MANTID_KERNEL_DEPRECATED_EXPORT MANTID_KERNEL_DLL MANTID_KERNEL_DEPRECATED
#endif
#ifndef MANTID_KERNEL_DEPRECATED_NO_EXPORT
# define MANTID_KERNEL_DEPRECATED_NO_EXPORT MANTID_KERNEL_NO_EXPORT MANTID_KERNEL_DEPRECATED
#endif
/* NOLINTNEXTLINE(readability-avoid-unconditional-preprocessor-if) */
#if 0 /* DEFINE_NO_DEPRECATED */
# ifndef MANTID_KERNEL_NO_DEPRECATED
# define MANTID_KERNEL_NO_DEPRECATED
# endif
#endif
#ifdef _WIN32
// 'identifier' : class 'type' needs to have dll-interface to be used by clients
// of class 'type2'
// Things from the std library give these warnings and we can't do anything
// about them.
#pragma warning(disable : 4251)
// Given that we are compiling everything with msvc under Windows and
// linking all with the same runtime we can disable the warning about
// inheriting from a non-exported interface, e.g. std::runtime_error */
#pragma warning(disable : 4275)
// Warning C4373: previous versions of the compiler did not override when
// parameters only differed by const/volatile qualifiers
// This is basically saying that it now follows the C++ standard and doesn't
// seem useful
#pragma warning(disable : 4373)
#endif
#ifndef UNUSED_ARG
#define UNUSED_ARG(x) (void) x;
#endif
#ifndef KERNEL_DEPRECATED
#define KERNEL_DEPRECATED(func) MANTID_KERNEL_DEPRECATED func
#endif
// Use extern keyword in client code to suppress class template instantiation
#include "MantidKernel/System.h"
#ifdef Kernel_EXPORTS
#define EXTERN_MANTID_KERNEL
#else
#define EXTERN_MANTID_KERNEL EXTERN_IMPORT
#endif /* Kernel_EXPORTS*/
#endif /* MANTID_KERNEL_DLL_H */ |
peterfpeterson
added a commit
to peterfpeterson/mantid
that referenced
this issue
Jan 6, 2025
This is part of mantidproject#38457 which cleans up all of Kernel except the precompiled headers. System.h is still included in the generated DllConfig.h file, but all of its necessary functionality should have been pulled from System.h once everything else is ready.
Just a note. The Windows |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the outcome that is desired.
Remove
System.h
since it is created in the generate files calledDllConfig.h
by way ofGenerateMantidExporteHeader.cmake
Describe any solutions you are considering
This can be done in stages, but each removal from
System.h
will invalidate almost the entire build tree. Consider that when planning out the work.#pragma warning(disable:
commands from L33, 37, and 42 to exist as compiler flags inWindowsSetup.cmake
. When doing the move, consider whether the flags are still necessary.DllConfig.h
from the source tree and change those sub-packages to use the generated one. At the time of this writing,there are 13.#include "MantidKernel/System.h"
from everything. Some sub-packages predate the existence ofDllConfig.h
being created and should use that instead. There are currently 503 files that directly includeMantidKernel/System.h
.GenerateMantidExportHeader.cmake
and can be removedGenerateMantidExportHeader.cmake
and can be removedGenerateMantidExportHeader.cmake
and can be removed. Add a comment/link in the generatedDllConfig.h
that one should considermaybe_unused
instead.cstddef
andcstdint
. If this generates an excess of changes, move the includes intoGENERATE_EXTERN
clause ofGenerateMantidExportHeader.cmake
MantidKernel/System.h
and updateGenerateMantidExportHeader.cmake
to not include it.NOTE ABOUT
UNUSED_ARG
This is the main reason why tests include
MantidKernel/System.h
. Either change them to use the sub-package specificDllConfig.h
or change tomaybe_unused
The text was updated successfully, but these errors were encountered: