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/CPack/WiX | |
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/CPack/WiX')
-rw-r--r-- | Source/CPack/WiX/cmCMakeToWixPath.h | 5 | ||||
-rw-r--r-- | Source/CPack/WiX/cmCPackWIXGenerator.h | 5 | ||||
-rw-r--r-- | Source/CPack/WiX/cmWIXAccessControlList.h | 5 | ||||
-rw-r--r-- | Source/CPack/WiX/cmWIXDirectoriesSourceWriter.h | 5 | ||||
-rw-r--r-- | Source/CPack/WiX/cmWIXFeaturesSourceWriter.h | 5 | ||||
-rw-r--r-- | Source/CPack/WiX/cmWIXFilesSourceWriter.h | 5 | ||||
-rw-r--r-- | Source/CPack/WiX/cmWIXPatch.h | 5 | ||||
-rw-r--r-- | Source/CPack/WiX/cmWIXPatchParser.h | 5 | ||||
-rw-r--r-- | Source/CPack/WiX/cmWIXRichTextFormatWriter.h | 5 | ||||
-rw-r--r-- | Source/CPack/WiX/cmWIXShortcut.h | 5 | ||||
-rw-r--r-- | Source/CPack/WiX/cmWIXSourceWriter.h | 5 |
11 files changed, 11 insertions, 44 deletions
diff --git a/Source/CPack/WiX/cmCMakeToWixPath.h b/Source/CPack/WiX/cmCMakeToWixPath.h index 8bb9e04..074cc8e 100644 --- a/Source/CPack/WiX/cmCMakeToWixPath.h +++ b/Source/CPack/WiX/cmCMakeToWixPath.h @@ -1,12 +1,9 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#ifndef cmCMakeToWixPath_h -#define cmCMakeToWixPath_h +#pragma once #include "cmConfigure.h" //IWYU pragma: keep #include <string> std::string CMakeToWixPath(const std::string& cygpath); - -#endif // cmCMakeToWixPath_h diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.h b/Source/CPack/WiX/cmCPackWIXGenerator.h index b9c37e9..8609cf3 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.h +++ b/Source/CPack/WiX/cmCPackWIXGenerator.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 cmCPackWIXGenerator_h -#define cmCPackWIXGenerator_h +#pragma once #include <map> #include <memory> @@ -171,5 +170,3 @@ private: cmWIXSourceWriter::GuidType ComponentGuidType; }; - -#endif diff --git a/Source/CPack/WiX/cmWIXAccessControlList.h b/Source/CPack/WiX/cmWIXAccessControlList.h index 64f9a13..ee5efa5 100644 --- a/Source/CPack/WiX/cmWIXAccessControlList.h +++ b/Source/CPack/WiX/cmWIXAccessControlList.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 cmWIXAccessControlList_h -#define cmWIXAccessControlList_h +#pragma once #include "cmCPackLog.h" #include "cmInstalledFile.h" @@ -29,5 +28,3 @@ private: cmInstalledFile const& InstalledFile; cmWIXSourceWriter& SourceWriter; }; - -#endif diff --git a/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.h b/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.h index a907d6d..0af3094 100644 --- a/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.h +++ b/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.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 cmWIXDirectoriesSourceWriter_h -#define cmWIXDirectoriesSourceWriter_h +#pragma once #include <string> @@ -29,5 +28,3 @@ public: void EndInstallationPrefixDirectory(size_t size); }; - -#endif diff --git a/Source/CPack/WiX/cmWIXFeaturesSourceWriter.h b/Source/CPack/WiX/cmWIXFeaturesSourceWriter.h index e03e87b..0facf97 100644 --- a/Source/CPack/WiX/cmWIXFeaturesSourceWriter.h +++ b/Source/CPack/WiX/cmWIXFeaturesSourceWriter.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 cmWIXFeaturesSourceWriter_h -#define cmWIXFeaturesSourceWriter_h +#pragma once #include "cmCPackGenerator.h" #include "cmWIXPatch.h" @@ -27,5 +26,3 @@ public: void EmitComponentRef(std::string const& id); }; - -#endif diff --git a/Source/CPack/WiX/cmWIXFilesSourceWriter.h b/Source/CPack/WiX/cmWIXFilesSourceWriter.h index 8cc98f5..60dddd4 100644 --- a/Source/CPack/WiX/cmWIXFilesSourceWriter.h +++ b/Source/CPack/WiX/cmWIXFilesSourceWriter.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 cmWIXFilesSourceWriter_h -#define cmWIXFilesSourceWriter_h +#pragma once #include "cmCPackGenerator.h" #include "cmWIXPatch.h" @@ -37,5 +36,3 @@ public: std::string const& filePath, cmWIXPatch& patch, cmInstalledFile const* installedFile); }; - -#endif diff --git a/Source/CPack/WiX/cmWIXPatch.h b/Source/CPack/WiX/cmWIXPatch.h index 31a60f4..c78722d 100644 --- a/Source/CPack/WiX/cmWIXPatch.h +++ b/Source/CPack/WiX/cmWIXPatch.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 cmWIXPatch_h -#define cmWIXPatch_h +#pragma once #include <string> @@ -33,5 +32,3 @@ private: cmWIXPatchParser::fragment_map_t Fragments; }; - -#endif diff --git a/Source/CPack/WiX/cmWIXPatchParser.h b/Source/CPack/WiX/cmWIXPatchParser.h index 8d5d2ad..70a21bc 100644 --- a/Source/CPack/WiX/cmWIXPatchParser.h +++ b/Source/CPack/WiX/cmWIXPatchParser.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 cmCPackWIXPatchParser_h -#define cmCPackWIXPatchParser_h +#pragma once #include <map> #include <memory> @@ -91,5 +90,3 @@ private: std::vector<cmWIXPatchElement*> ElementStack; }; - -#endif diff --git a/Source/CPack/WiX/cmWIXRichTextFormatWriter.h b/Source/CPack/WiX/cmWIXRichTextFormatWriter.h index a879f3d..99471f1 100644 --- a/Source/CPack/WiX/cmWIXRichTextFormatWriter.h +++ b/Source/CPack/WiX/cmWIXRichTextFormatWriter.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 cmWIXRichTextFormatWriter_h -#define cmWIXRichTextFormatWriter_h +#pragma once #include "cmConfigure.h" // IWYU pragma: keep @@ -42,5 +41,3 @@ private: cmsys::ofstream File; }; - -#endif diff --git a/Source/CPack/WiX/cmWIXShortcut.h b/Source/CPack/WiX/cmWIXShortcut.h index c67baf3..315b5ea 100644 --- a/Source/CPack/WiX/cmWIXShortcut.h +++ b/Source/CPack/WiX/cmWIXShortcut.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 cmWIXShortcut_h -#define cmWIXShortcut_h +#pragma once #include <map> #include <set> @@ -56,5 +55,3 @@ private: shortcut_type_map_t Shortcuts; shortcut_id_map_t EmptyIdMap; }; - -#endif diff --git a/Source/CPack/WiX/cmWIXSourceWriter.h b/Source/CPack/WiX/cmWIXSourceWriter.h index 6030ea3..f643acd 100644 --- a/Source/CPack/WiX/cmWIXSourceWriter.h +++ b/Source/CPack/WiX/cmWIXSourceWriter.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 cmWIXSourceWriter_h -#define cmWIXSourceWriter_h +#pragma once #include <string> #include <vector> @@ -76,5 +75,3 @@ private: GuidType ComponentGuidType; }; - -#endif |