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 /Utilities/cm3p | |
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 'Utilities/cm3p')
-rw-r--r-- | Utilities/cm3p/Setup.Configuration.h | 5 | ||||
-rw-r--r-- | Utilities/cm3p/archive.h | 5 | ||||
-rw-r--r-- | Utilities/cm3p/archive_entry.h | 5 | ||||
-rw-r--r-- | Utilities/cm3p/bzlib.h | 5 | ||||
-rw-r--r-- | Utilities/cm3p/curl/curl.h | 5 | ||||
-rw-r--r-- | Utilities/cm3p/expat.h | 5 | ||||
-rw-r--r-- | Utilities/cm3p/json/reader.h | 5 | ||||
-rw-r--r-- | Utilities/cm3p/json/value.h | 5 | ||||
-rw-r--r-- | Utilities/cm3p/json/writer.h | 5 | ||||
-rw-r--r-- | Utilities/cm3p/kwiml/abi.h | 5 | ||||
-rw-r--r-- | Utilities/cm3p/kwiml/int.h | 5 | ||||
-rw-r--r-- | Utilities/cm3p/lzma.h | 5 | ||||
-rw-r--r-- | Utilities/cm3p/rhash.h | 5 | ||||
-rw-r--r-- | Utilities/cm3p/uv.h | 5 | ||||
-rw-r--r-- | Utilities/cm3p/zlib.h | 5 | ||||
-rw-r--r-- | Utilities/cm3p/zstd.h | 5 |
16 files changed, 16 insertions, 64 deletions
diff --git a/Utilities/cm3p/Setup.Configuration.h b/Utilities/cm3p/Setup.Configuration.h index a5cf058..9f4190e 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 956b3ab..a775400 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 230e87a..0f8376c 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 2a0f4dd..c0eef03 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 6e2b822..272db8d 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 32e6fd0..bcf6195 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 0df09ee..9fa8d2d 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 f59bed6..fc3b5f4 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 7fcc3e2..7ee1e43 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 6d0dedf..8d5189a 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 4c7c23d..2669df8 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 abfacf3..7842f6b 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 9d5e411..5828557 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 307a09f..36a86b6 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 fe7baee..6b82aa2 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 07cc3e4..51972de 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 |