diff options
author | Kitware Robot <kwrobot@kitware.com> | 2020-08-29 20:27:37 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2020-09-03 13:30:21 (GMT) |
commit | bdca8b01d2d96d63e685e7eca03e0f51f5410fdf (patch) | |
tree | f7e14aa6967bd3981b0bff21c4f0e113de275fb3 /Source/QtDialog | |
parent | 093ba4061da68d8c86a09b3631767912ffb183e2 (diff) | |
download | CMake-bdca8b01d2d96d63e685e7eca03e0f51f5410fdf.zip CMake-bdca8b01d2d96d63e685e7eca03e0f51f5410fdf.tar.gz CMake-bdca8b01d2d96d63e685e7eca03e0f51f5410fdf.tar.bz2 |
Modernize: Use #pragma once in all header files
#pragma once is a widely supported compiler pragma, even though it is
not part of the C++ standard. Many of the issues keeping #pragma once
from being standardized (distributed filesystems, build farms, hard
links, etc.) do not apply to CMake - it is easy to build CMake on a
single machine. CMake also does not install any header files which can
be consumed by other projects (though cmCPluginAPI.h has been
deliberately omitted from this conversion in case anyone is still using
it.) Finally, #pragma once has been required to build CMake since at
least August 2017 (7f29bbe6 enabled server mode unconditionally, which
had been using #pragma once since September 2016 (b13d3e0d)). The fact
that we now require C++11 filters out old compilers, and it is unlikely
that there is a compiler which supports C++11 but does not support
#pragma once.
Diffstat (limited to 'Source/QtDialog')
-rw-r--r-- | Source/QtDialog/AddCacheEntry.h | 5 | ||||
-rw-r--r-- | Source/QtDialog/CMakeSetupDialog.h | 5 | ||||
-rw-r--r-- | Source/QtDialog/Compilers.h | 5 | ||||
-rw-r--r-- | Source/QtDialog/FirstConfigure.h | 5 | ||||
-rw-r--r-- | Source/QtDialog/QCMake.h | 5 | ||||
-rw-r--r-- | Source/QtDialog/QCMakeCacheView.h | 5 | ||||
-rw-r--r-- | Source/QtDialog/QCMakeWidgets.h | 5 | ||||
-rw-r--r-- | Source/QtDialog/RegexExplorer.h | 5 | ||||
-rw-r--r-- | Source/QtDialog/WarningMessagesDialog.h | 5 |
9 files changed, 9 insertions, 36 deletions
diff --git a/Source/QtDialog/AddCacheEntry.h b/Source/QtDialog/AddCacheEntry.h index e7a60dd..35522c5 100644 --- a/Source/QtDialog/AddCacheEntry.h +++ b/Source/QtDialog/AddCacheEntry.h @@ -1,7 +1,6 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#ifndef AddCacheEntry_h -#define AddCacheEntry_h +#pragma once #include "QCMake.h" #include <QCheckBox> @@ -32,5 +31,3 @@ private: const QStringList& VarNames; const QStringList& VarTypes; }; - -#endif diff --git a/Source/QtDialog/CMakeSetupDialog.h b/Source/QtDialog/CMakeSetupDialog.h index 914be12..eba0b1e 100644 --- a/Source/QtDialog/CMakeSetupDialog.h +++ b/Source/QtDialog/CMakeSetupDialog.h @@ -1,7 +1,6 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#ifndef CMakeSetupDialog_h -#define CMakeSetupDialog_h +#pragma once #include <memory> @@ -146,5 +145,3 @@ protected: virtual void run(); std::unique_ptr<QCMake> CMakeInstance; }; - -#endif // CMakeSetupDialog_h diff --git a/Source/QtDialog/Compilers.h b/Source/QtDialog/Compilers.h index 931c935..5da0781 100644 --- a/Source/QtDialog/Compilers.h +++ b/Source/QtDialog/Compilers.h @@ -1,7 +1,6 @@ -#ifndef COMPILERS_HPP -#define COMPILERS_HPP +#pragma once #include "cmConfigure.h" // IWYU pragma: keep @@ -21,5 +20,3 @@ public: this->setupUi(this); } }; - -#endif diff --git a/Source/QtDialog/FirstConfigure.h b/Source/QtDialog/FirstConfigure.h index c26f489..4c757da 100644 --- a/Source/QtDialog/FirstConfigure.h +++ b/Source/QtDialog/FirstConfigure.h @@ -1,6 +1,5 @@ -#ifndef FirstConfigure_h -#define FirstConfigure_h +#pragma once #include <QWizard> #include <QWizardPage> @@ -201,5 +200,3 @@ protected: ToolchainCompilerSetup* mToolchainCompilerSetupPage; QString mDefaultGenerator; }; - -#endif // FirstConfigure_h diff --git a/Source/QtDialog/QCMake.h b/Source/QtDialog/QCMake.h index 39555d6..e87660b 100644 --- a/Source/QtDialog/QCMake.h +++ b/Source/QtDialog/QCMake.h @@ -1,7 +1,6 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#ifndef QCMake_h -#define QCMake_h +#pragma once #include "cmConfigure.h" // IWYU pragma: keep @@ -182,5 +181,3 @@ protected: QString CMakeExecutable; QAtomicInt InterruptFlag; }; - -#endif // QCMake_h diff --git a/Source/QtDialog/QCMakeCacheView.h b/Source/QtDialog/QCMakeCacheView.h index a252708..836a939 100644 --- a/Source/QtDialog/QCMakeCacheView.h +++ b/Source/QtDialog/QCMakeCacheView.h @@ -1,7 +1,6 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#ifndef QCMakeCacheView_h -#define QCMakeCacheView_h +#pragma once #include "QCMake.h" #include <QItemDelegate> @@ -164,5 +163,3 @@ protected: // properties changed by user via this delegate QSet<QCMakeProperty> mChanges; }; - -#endif diff --git a/Source/QtDialog/QCMakeWidgets.h b/Source/QtDialog/QCMakeWidgets.h index 5d2368e..9a2a27e 100644 --- a/Source/QtDialog/QCMakeWidgets.h +++ b/Source/QtDialog/QCMakeWidgets.h @@ -1,7 +1,6 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#ifndef QCMakeWidgets_h -#define QCMakeWidgets_h +#pragma once #include "cmConfigure.h" // IWYU pragma: keep @@ -77,5 +76,3 @@ public: } } }; - -#endif diff --git a/Source/QtDialog/RegexExplorer.h b/Source/QtDialog/RegexExplorer.h index 1a1d770..9a42320 100644 --- a/Source/QtDialog/RegexExplorer.h +++ b/Source/QtDialog/RegexExplorer.h @@ -1,7 +1,6 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#ifndef RegexExplorer_h -#define RegexExplorer_h +#pragma once #include <string> @@ -39,5 +38,3 @@ private: std::string m_regex; bool m_matched; }; - -#endif diff --git a/Source/QtDialog/WarningMessagesDialog.h b/Source/QtDialog/WarningMessagesDialog.h index f209dbd..bb01704 100644 --- a/Source/QtDialog/WarningMessagesDialog.h +++ b/Source/QtDialog/WarningMessagesDialog.h @@ -1,7 +1,6 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#ifndef WarningMessagesDialog_h -#define WarningMessagesDialog_h +#pragma once #include "QCMake.h" #include <QDialog> @@ -63,5 +62,3 @@ private: */ void setupSignals(); }; - -#endif /* MessageDialog_h */ |