summaryrefslogtreecommitdiff
path: root/Utilities/cm3p
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2020-08-29 16:27:37 -0400
committerKyle Edwards <kyle.edwards@kitware.com>2020-09-03 09:30:21 -0400
commitbdca8b01d2d96d63e685e7eca03e0f51f5410fdf (patch)
treef7e14aa6967bd3981b0bff21c4f0e113de275fb3 /Utilities/cm3p
parent093ba4061da68d8c86a09b3631767912ffb183e2 (diff)
downloadcmake-bdca8b01d2d96d63e685e7eca03e0f51f5410fdf.tar.gz
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 'Utilities/cm3p')
-rw-r--r--Utilities/cm3p/Setup.Configuration.h5
-rw-r--r--Utilities/cm3p/archive.h5
-rw-r--r--Utilities/cm3p/archive_entry.h5
-rw-r--r--Utilities/cm3p/bzlib.h5
-rw-r--r--Utilities/cm3p/curl/curl.h5
-rw-r--r--Utilities/cm3p/expat.h5
-rw-r--r--Utilities/cm3p/json/reader.h5
-rw-r--r--Utilities/cm3p/json/value.h5
-rw-r--r--Utilities/cm3p/json/writer.h5
-rw-r--r--Utilities/cm3p/kwiml/abi.h5
-rw-r--r--Utilities/cm3p/kwiml/int.h5
-rw-r--r--Utilities/cm3p/lzma.h5
-rw-r--r--Utilities/cm3p/rhash.h5
-rw-r--r--Utilities/cm3p/uv.h5
-rw-r--r--Utilities/cm3p/zlib.h5
-rw-r--r--Utilities/cm3p/zstd.h5
16 files changed, 16 insertions, 64 deletions
diff --git a/Utilities/cm3p/Setup.Configuration.h b/Utilities/cm3p/Setup.Configuration.h
index a5cf0580aa..9f4190e4f5 100644
--- a/Utilities/cm3p/Setup.Configuration.h
+++ b/Utilities/cm3p/Setup.Configuration.h
@@ -1,8 +1,5 @@
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
-#ifndef cm3p_Setup_Configuration_h
-#define cm3p_Setup_Configuration_h
+#pragma once
#include <cmvssetup/Setup.Configuration.h> // IWYU pragma: export
-
-#endif
diff --git a/Utilities/cm3p/archive.h b/Utilities/cm3p/archive.h
index 956b3ab708..a775400e4f 100644
--- a/Utilities/cm3p/archive.h
+++ b/Utilities/cm3p/archive.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 cm3p_archive_h
-#define cm3p_archive_h
+#pragma once
/* Use the libarchive configured for CMake. */
#include "cmThirdParty.h"
@@ -10,5 +9,3 @@
#else
# include <cmlibarchive/libarchive/archive.h> // IWYU pragma: export
#endif
-
-#endif
diff --git a/Utilities/cm3p/archive_entry.h b/Utilities/cm3p/archive_entry.h
index 230e87a0f1..0f8376c795 100644
--- a/Utilities/cm3p/archive_entry.h
+++ b/Utilities/cm3p/archive_entry.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 cm3p_archive_entry_h
-#define cm3p_archive_entry_h
+#pragma once
/* Use the libarchive configured for CMake. */
#include "cmThirdParty.h"
@@ -10,5 +9,3 @@
#else
# include <cmlibarchive/libarchive/archive_entry.h> // IWYU pragma: export
#endif
-
-#endif
diff --git a/Utilities/cm3p/bzlib.h b/Utilities/cm3p/bzlib.h
index 2a0f4dd625..c0eef0322d 100644
--- a/Utilities/cm3p/bzlib.h
+++ b/Utilities/cm3p/bzlib.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 cm3p_bzlib_h
-#define cm3p_bzlib_h
+#pragma once
/* Use the bzip2 library configured for CMake. */
#include "cmThirdParty.h"
@@ -10,5 +9,3 @@
#else
# include <cmbzip2/bzlib.h> // IWYU pragma: export
#endif
-
-#endif
diff --git a/Utilities/cm3p/curl/curl.h b/Utilities/cm3p/curl/curl.h
index 6e2b8229dc..272db8d9f3 100644
--- a/Utilities/cm3p/curl/curl.h
+++ b/Utilities/cm3p/curl/curl.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 cm3p_curl_curl_h
-#define cm3p_curl_curl_h
+#pragma once
/* Use the curl library configured for CMake. */
#include "cmThirdParty.h"
@@ -10,5 +9,3 @@
#else
# include <cmcurl/include/curl/curl.h> // IWYU pragma: export
#endif
-
-#endif
diff --git a/Utilities/cm3p/expat.h b/Utilities/cm3p/expat.h
index 32e6fd0fe9..bcf6195e43 100644
--- a/Utilities/cm3p/expat.h
+++ b/Utilities/cm3p/expat.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 cm3p_expat_h
-#define cm3p_expat_h
+#pragma once
/* Use the expat library configured for CMake. */
#include "cmThirdParty.h"
@@ -10,5 +9,3 @@
#else
# include <cmexpat/lib/expat.h> // IWYU pragma: export
#endif
-
-#endif
diff --git a/Utilities/cm3p/json/reader.h b/Utilities/cm3p/json/reader.h
index 0df09eea16..9fa8d2d779 100644
--- a/Utilities/cm3p/json/reader.h
+++ b/Utilities/cm3p/json/reader.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 cm3p_json_reader_h
-#define cm3p_json_reader_h
+#pragma once
/* Use the jsoncpp library configured for CMake. */
#include "cmThirdParty.h"
@@ -10,5 +9,3 @@
#else
# include <cmjsoncpp/include/json/reader.h> // IWYU pragma: export
#endif
-
-#endif
diff --git a/Utilities/cm3p/json/value.h b/Utilities/cm3p/json/value.h
index f59bed6d69..fc3b5f4a56 100644
--- a/Utilities/cm3p/json/value.h
+++ b/Utilities/cm3p/json/value.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 cm3p_json_value_h
-#define cm3p_json_value_h
+#pragma once
/* Use the jsoncpp library configured for CMake. */
#include "cmThirdParty.h"
@@ -10,5 +9,3 @@
#else
# include <cmjsoncpp/include/json/value.h> // IWYU pragma: export
#endif
-
-#endif
diff --git a/Utilities/cm3p/json/writer.h b/Utilities/cm3p/json/writer.h
index 7fcc3e242c..7ee1e43af2 100644
--- a/Utilities/cm3p/json/writer.h
+++ b/Utilities/cm3p/json/writer.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 cm3p_json_writer_h
-#define cm3p_json_writer_h
+#pragma once
/* Use the jsoncpp library configured for CMake. */
#include "cmThirdParty.h"
@@ -10,5 +9,3 @@
#else
# include <cmjsoncpp/include/json/writer.h> // IWYU pragma: export
#endif
-
-#endif
diff --git a/Utilities/cm3p/kwiml/abi.h b/Utilities/cm3p/kwiml/abi.h
index 6d0dedf565..8d5189a6dc 100644
--- a/Utilities/cm3p/kwiml/abi.h
+++ b/Utilities/cm3p/kwiml/abi.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 cm3p_kwiml_abi_h
-#define cm3p_kwiml_abi_h
+#pragma once
/* Use the KWIML library configured for CMake. */
#include "cmThirdParty.h"
@@ -10,5 +9,3 @@
#else
# include <KWIML/include/kwiml/abi.h> // IWYU pragma: export
#endif
-
-#endif
diff --git a/Utilities/cm3p/kwiml/int.h b/Utilities/cm3p/kwiml/int.h
index 4c7c23df13..2669df8358 100644
--- a/Utilities/cm3p/kwiml/int.h
+++ b/Utilities/cm3p/kwiml/int.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 cm3p_kwiml_int_h
-#define cm3p_kwiml_int_h
+#pragma once
/* Use the KWIML library configured for CMake. */
#include "cmThirdParty.h"
@@ -10,5 +9,3 @@
#else
# include <KWIML/include/kwiml/int.h> // IWYU pragma: export
#endif
-
-#endif
diff --git a/Utilities/cm3p/lzma.h b/Utilities/cm3p/lzma.h
index abfacf361f..7842f6bb45 100644
--- a/Utilities/cm3p/lzma.h
+++ b/Utilities/cm3p/lzma.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 cm3p_lzma_h
-#define cm3p_lzma_h
+#pragma once
/* Use the liblzma configured for CMake. */
#include "cmThirdParty.h"
@@ -10,5 +9,3 @@
#else
# include <cmliblzma/liblzma/api/lzma.h> // IWYU pragma: export
#endif
-
-#endif
diff --git a/Utilities/cm3p/rhash.h b/Utilities/cm3p/rhash.h
index 9d5e411048..58285574a4 100644
--- a/Utilities/cm3p/rhash.h
+++ b/Utilities/cm3p/rhash.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 cm3p_rhash_h
-#define cm3p_rhash_h
+#pragma once
/* Use the LibRHash library configured for CMake. */
#include "cmThirdParty.h"
@@ -10,5 +9,3 @@
#else
# include <cmlibrhash/librhash/rhash.h> // IWYU pragma: export
#endif
-
-#endif
diff --git a/Utilities/cm3p/uv.h b/Utilities/cm3p/uv.h
index 307a09fdb7..36a86b696a 100644
--- a/Utilities/cm3p/uv.h
+++ b/Utilities/cm3p/uv.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 cm3p_uv_h
-#define cm3p_uv_h
+#pragma once
/* Use the libuv library configured for CMake. */
#include "cmThirdParty.h"
@@ -10,5 +9,3 @@
#else
# include <cmlibuv/include/uv.h> // IWYU pragma: export
#endif
-
-#endif
diff --git a/Utilities/cm3p/zlib.h b/Utilities/cm3p/zlib.h
index fe7baeebed..6b82aa2115 100644
--- a/Utilities/cm3p/zlib.h
+++ b/Utilities/cm3p/zlib.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 cm3p_zlib_h
-#define cm3p_zlib_h
+#pragma once
/* Use the zlib library configured for CMake. */
#include "cmThirdParty.h"
@@ -10,5 +9,3 @@
#else
# include <cmzlib/zlib.h> // IWYU pragma: export
#endif
-
-#endif
diff --git a/Utilities/cm3p/zstd.h b/Utilities/cm3p/zstd.h
index 07cc3e4359..51972de342 100644
--- a/Utilities/cm3p/zstd.h
+++ b/Utilities/cm3p/zstd.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 cm3p_zstd_h
-#define cm3p_zstd_h
+#pragma once
/* Use the libzstd configured for CMake. */
#include "cmThirdParty.h"
@@ -10,5 +9,3 @@
#else
# include <cmzstd/lib/zstd.h> // IWYU pragma: export
#endif
-
-#endif