diff options
author | Kitware Robot <kwrobot@kitware.com> | 2018-06-01 13:53:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-06-01 13:53:42 (GMT) |
commit | d7204e649ed4ebb19bb341b4e49eb51514364922 (patch) | |
tree | d9ac3ded5ae6899be7188795011743fe3e6da0a6 /Modules | |
parent | 12fed3edb107c949671043196fa94c542b45452a (diff) | |
download | CMake-d7204e649ed4ebb19bb341b4e49eb51514364922.zip CMake-d7204e649ed4ebb19bb341b4e49eb51514364922.tar.gz CMake-d7204e649ed4ebb19bb341b4e49eb51514364922.tar.bz2 |
Revise C++ coding style using clang-format-6.0
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`. Use `clang-format` version 6.0.
* If you reached this commit for a line in `git blame`, re-run the blame
operation starting at the parent of this commit to see older history
for the content.
* See the parent commit for instructions to rebase a change across this
style transition commit.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeCCompilerABI.c | 4 | ||||
-rw-r--r-- | Modules/CMakeCUDACompilerABI.cu | 2 | ||||
-rw-r--r-- | Modules/CMakeCXXCompilerABI.cpp | 2 | ||||
-rw-r--r-- | Modules/CMakeCompilerABI.h | 16 | ||||
-rw-r--r-- | Modules/CheckFunctionExists.c | 12 | ||||
-rw-r--r-- | Modules/CheckVariableExists.c | 8 | ||||
-rw-r--r-- | Modules/FindMPI/libver_mpi.c | 4 | ||||
-rw-r--r-- | Modules/FindMPI/test_mpi.c | 10 |
8 files changed, 29 insertions, 29 deletions
diff --git a/Modules/CMakeCCompilerABI.c b/Modules/CMakeCCompilerABI.c index 55f9a9b..08cf39b 100644 --- a/Modules/CMakeCCompilerABI.c +++ b/Modules/CMakeCCompilerABI.c @@ -1,9 +1,9 @@ #ifdef __cplusplus -#error "A C++ compiler has been selected for C." +# error "A C++ compiler has been selected for C." #endif #ifdef __CLASSIC_C__ -#define const +# define const #endif #include "CMakeCompilerABI.h" diff --git a/Modules/CMakeCUDACompilerABI.cu b/Modules/CMakeCUDACompilerABI.cu index 99bacef..702a7c5 100644 --- a/Modules/CMakeCUDACompilerABI.cu +++ b/Modules/CMakeCUDACompilerABI.cu @@ -1,5 +1,5 @@ #ifndef __CUDACC__ -#error "A C or C++ compiler has been selected for CUDA" +# error "A C or C++ compiler has been selected for CUDA" #endif #include "CMakeCompilerABI.h" diff --git a/Modules/CMakeCXXCompilerABI.cpp b/Modules/CMakeCXXCompilerABI.cpp index 2dee883..2360534 100644 --- a/Modules/CMakeCXXCompilerABI.cpp +++ b/Modules/CMakeCXXCompilerABI.cpp @@ -1,5 +1,5 @@ #ifndef __cplusplus -#error "A C compiler has been selected for C++." +# error "A C compiler has been selected for C++." #endif #include "CMakeCompilerABI.h" diff --git a/Modules/CMakeCompilerABI.h b/Modules/CMakeCompilerABI.h index 1f9abb1..6f36b03 100644 --- a/Modules/CMakeCompilerABI.h +++ b/Modules/CMakeCompilerABI.h @@ -11,27 +11,27 @@ const char info_sizeof_dptr[] = { /* Application Binary Interface. */ #if defined(__sgi) && defined(_ABIO32) -#define ABI_ID "ELF O32" +# define ABI_ID "ELF O32" #elif defined(__sgi) && defined(_ABIN32) -#define ABI_ID "ELF N32" +# define ABI_ID "ELF N32" #elif defined(__sgi) && defined(_ABI64) -#define ABI_ID "ELF 64" +# define ABI_ID "ELF 64" /* Check for (some) ARM ABIs. * See e.g. http://wiki.debian.org/ArmEabiPort for some information on this. */ #elif defined(__GNU__) && defined(__ELF__) && defined(__ARM_EABI__) -#define ABI_ID "ELF ARMEABI" +# define ABI_ID "ELF ARMEABI" #elif defined(__GNU__) && defined(__ELF__) && defined(__ARMEB__) -#define ABI_ID "ELF ARM" +# define ABI_ID "ELF ARM" #elif defined(__GNU__) && defined(__ELF__) && defined(__ARMEL__) -#define ABI_ID "ELF ARM" +# define ABI_ID "ELF ARM" #elif defined(__linux__) && defined(__ELF__) && defined(__amd64__) && \ defined(__ILP32__) -#define ABI_ID "ELF X32" +# define ABI_ID "ELF X32" #elif defined(__ELF__) -#define ABI_ID "ELF" +# define ABI_ID "ELF" #endif #if defined(ABI_ID) diff --git a/Modules/CheckFunctionExists.c b/Modules/CheckFunctionExists.c index 224e340..13435e0 100644 --- a/Modules/CheckFunctionExists.c +++ b/Modules/CheckFunctionExists.c @@ -1,19 +1,19 @@ #ifdef CHECK_FUNCTION_EXISTS -#ifdef __cplusplus +# ifdef __cplusplus extern "C" -#endif +# endif char CHECK_FUNCTION_EXISTS(void); -#ifdef __CLASSIC_C__ +# ifdef __CLASSIC_C__ int main() { int ac; char* av[]; -#else +# else int main(int ac, char* av[]) { -#endif +# endif CHECK_FUNCTION_EXISTS(); if (ac > 1000) { return *av[0]; @@ -23,6 +23,6 @@ int main(int ac, char* av[]) #else /* CHECK_FUNCTION_EXISTS */ -#error "CHECK_FUNCTION_EXISTS has to specify the function" +# error "CHECK_FUNCTION_EXISTS has to specify the function" #endif /* CHECK_FUNCTION_EXISTS */ diff --git a/Modules/CheckVariableExists.c b/Modules/CheckVariableExists.c index 6e94877..d68afb4 100644 --- a/Modules/CheckVariableExists.c +++ b/Modules/CheckVariableExists.c @@ -2,15 +2,15 @@ extern int CHECK_VARIABLE_EXISTS; -#ifdef __CLASSIC_C__ +# ifdef __CLASSIC_C__ int main() { int ac; char* av[]; -#else +# else int main(int ac, char* av[]) { -#endif +# endif if (ac > 1000) { return *av[0]; } @@ -19,6 +19,6 @@ int main(int ac, char* av[]) #else /* CHECK_VARIABLE_EXISTS */ -#error "CHECK_VARIABLE_EXISTS has to specify the variable" +# error "CHECK_VARIABLE_EXISTS has to specify the variable" #endif /* CHECK_VARIABLE_EXISTS */ diff --git a/Modules/FindMPI/libver_mpi.c b/Modules/FindMPI/libver_mpi.c index be9d19d..18d4a60 100644 --- a/Modules/FindMPI/libver_mpi.c +++ b/Modules/FindMPI/libver_mpi.c @@ -1,9 +1,9 @@ #include <mpi.h> #ifdef __cplusplus -#include <cstdio> +# include <cstdio> #else -#include <stdio.h> +# include <stdio.h> #endif int main(int argc, char* argv[]) diff --git a/Modules/FindMPI/test_mpi.c b/Modules/FindMPI/test_mpi.c index b8a308a..05cec89 100644 --- a/Modules/FindMPI/test_mpi.c +++ b/Modules/FindMPI/test_mpi.c @@ -1,9 +1,9 @@ #include <mpi.h> #ifdef __cplusplus -#include <cstdio> +# include <cstdio> #else -#include <stdio.h> +# include <stdio.h> #endif #if defined(MPI_VERSION) && defined(MPI_SUBVERSION) @@ -21,11 +21,11 @@ const char mpiver_str[] = { 'I', 'N', int main(int argc, char* argv[]) { #if defined(MPI_VERSION) && defined(MPI_SUBVERSION) -#ifdef __cplusplus +# ifdef __cplusplus std::puts(mpiver_str); -#else +# else puts(mpiver_str); -#endif +# endif #endif #ifdef TEST_MPI_MPICXX MPI::MPI_Init(&argc, &argv); |