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 /Tests/CMakeCommands | |
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 'Tests/CMakeCommands')
13 files changed, 108 insertions, 108 deletions
diff --git a/Tests/CMakeCommands/add_compile_definitions/main.cpp b/Tests/CMakeCommands/add_compile_definitions/main.cpp index b382922..41ff25f 100644 --- a/Tests/CMakeCommands/add_compile_definitions/main.cpp +++ b/Tests/CMakeCommands/add_compile_definitions/main.cpp @@ -1,14 +1,14 @@ #ifndef TEST_DEFINITION -#error Expected TEST_DEFINITION +# error Expected TEST_DEFINITION #endif #ifndef LANG_CXX -#error Expected LANG_CXX +# error Expected LANG_CXX #endif #ifdef UNPEXTED_DEFINITION -#error Unexpected UNPEXTED_DEFINITION +# error Unexpected UNPEXTED_DEFINITION #endif int main(void) diff --git a/Tests/CMakeCommands/add_compile_options/main.cpp b/Tests/CMakeCommands/add_compile_options/main.cpp index 1d57021..53f54b7 100644 --- a/Tests/CMakeCommands/add_compile_options/main.cpp +++ b/Tests/CMakeCommands/add_compile_options/main.cpp @@ -1,8 +1,8 @@ #ifdef DO_GNU_TESTS -#ifndef TEST_OPTION -#error Expected TEST_OPTION -#endif +# ifndef TEST_OPTION +# error Expected TEST_OPTION +# endif #endif int main(void) diff --git a/Tests/CMakeCommands/target_compile_definitions/consumer.c b/Tests/CMakeCommands/target_compile_definitions/consumer.c index e134a8b..bacd4c4 100644 --- a/Tests/CMakeCommands/target_compile_definitions/consumer.c +++ b/Tests/CMakeCommands/target_compile_definitions/consumer.c @@ -2,37 +2,37 @@ // Visual Studio allows only one set of flags for C and C++. // In a target using C++ we pick the C++ flags even for C sources. #ifdef TEST_LANG_DEFINES_FOR_VISUAL_STUDIO_OR_XCODE -#ifndef CONSUMER_LANG_CXX -#error Expected CONSUMER_LANG_CXX -#endif +# ifndef CONSUMER_LANG_CXX +# error Expected CONSUMER_LANG_CXX +# endif -#ifdef CONSUMER_LANG_C -#error Unexpected CONSUMER_LANG_C -#endif +# ifdef CONSUMER_LANG_C +# error Unexpected CONSUMER_LANG_C +# endif -#if !LANG_IS_CXX -#error Expected LANG_IS_CXX -#endif +# if !LANG_IS_CXX +# error Expected LANG_IS_CXX +# endif -#if LANG_IS_C -#error Unexpected LANG_IS_C -#endif +# if LANG_IS_C +# error Unexpected LANG_IS_C +# endif #else -#ifdef CONSUMER_LANG_CXX -#error Unexpected CONSUMER_LANG_CXX -#endif +# ifdef CONSUMER_LANG_CXX +# error Unexpected CONSUMER_LANG_CXX +# endif -#ifndef CONSUMER_LANG_C -#error Expected CONSUMER_LANG_C -#endif +# ifndef CONSUMER_LANG_C +# error Expected CONSUMER_LANG_C +# endif -#if !LANG_IS_C -#error Expected LANG_IS_C -#endif +# if !LANG_IS_C +# error Expected LANG_IS_C +# endif -#if LANG_IS_CXX -#error Unexpected LANG_IS_CXX -#endif +# if LANG_IS_CXX +# error Unexpected LANG_IS_CXX +# endif #endif void consumer_c() diff --git a/Tests/CMakeCommands/target_compile_definitions/consumer.cpp b/Tests/CMakeCommands/target_compile_definitions/consumer.cpp index 69ea151..0999526 100644 --- a/Tests/CMakeCommands/target_compile_definitions/consumer.cpp +++ b/Tests/CMakeCommands/target_compile_definitions/consumer.cpp @@ -1,34 +1,34 @@ #ifdef MY_PRIVATE_DEFINE -#error Unexpected MY_PRIVATE_DEFINE +# error Unexpected MY_PRIVATE_DEFINE #endif #ifndef MY_PUBLIC_DEFINE -#error Expected MY_PUBLIC_DEFINE +# error Expected MY_PUBLIC_DEFINE #endif #ifndef MY_INTERFACE_DEFINE -#error Expected MY_INTERFACE_DEFINE +# error Expected MY_INTERFACE_DEFINE #endif #ifndef DASH_D_DEFINE -#error Expected DASH_D_DEFINE +# error Expected DASH_D_DEFINE #endif #ifndef CONSUMER_LANG_CXX -#error Expected CONSUMER_LANG_CXX +# error Expected CONSUMER_LANG_CXX #endif #ifdef CONSUMER_LANG_C -#error Unexpected CONSUMER_LANG_C +# error Unexpected CONSUMER_LANG_C #endif #if !LANG_IS_CXX -#error Expected LANG_IS_CXX +# error Expected LANG_IS_CXX #endif #if LANG_IS_C -#error Unexpected LANG_IS_C +# error Unexpected LANG_IS_C #endif int main() diff --git a/Tests/CMakeCommands/target_compile_definitions/main.cpp b/Tests/CMakeCommands/target_compile_definitions/main.cpp index bf08b45..3f64dc8 100644 --- a/Tests/CMakeCommands/target_compile_definitions/main.cpp +++ b/Tests/CMakeCommands/target_compile_definitions/main.cpp @@ -1,14 +1,14 @@ #ifndef MY_PRIVATE_DEFINE -#error Expected MY_PRIVATE_DEFINE +# error Expected MY_PRIVATE_DEFINE #endif #ifndef MY_PUBLIC_DEFINE -#error Expected MY_PUBLIC_DEFINE +# error Expected MY_PUBLIC_DEFINE #endif #ifdef MY_INTERFACE_DEFINE -#error Unexpected MY_INTERFACE_DEFINE +# error Unexpected MY_INTERFACE_DEFINE #endif int main() diff --git a/Tests/CMakeCommands/target_compile_options/consumer.c b/Tests/CMakeCommands/target_compile_options/consumer.c index 420b4cc..f9b6654 100644 --- a/Tests/CMakeCommands/target_compile_options/consumer.c +++ b/Tests/CMakeCommands/target_compile_options/consumer.c @@ -2,37 +2,37 @@ // Visual Studio allows only one set of flags for C and C++. // In a target using C++ we pick the C++ flags even for C sources. #ifdef TEST_LANG_DEFINES_FOR_VISUAL_STUDIO -#ifndef CONSUMER_LANG_CXX -#error Expected CONSUMER_LANG_CXX -#endif +# ifndef CONSUMER_LANG_CXX +# error Expected CONSUMER_LANG_CXX +# endif -#ifdef CONSUMER_LANG_C -#error Unexpected CONSUMER_LANG_C -#endif +# ifdef CONSUMER_LANG_C +# error Unexpected CONSUMER_LANG_C +# endif -#if !LANG_IS_CXX -#error Expected LANG_IS_CXX -#endif +# if !LANG_IS_CXX +# error Expected LANG_IS_CXX +# endif -#if LANG_IS_C -#error Unexpected LANG_IS_C -#endif +# if LANG_IS_C +# error Unexpected LANG_IS_C +# endif #else -#ifdef CONSUMER_LANG_CXX -#error Unexpected CONSUMER_LANG_CXX -#endif +# ifdef CONSUMER_LANG_CXX +# error Unexpected CONSUMER_LANG_CXX +# endif -#ifndef CONSUMER_LANG_C -#error Expected CONSUMER_LANG_C -#endif +# ifndef CONSUMER_LANG_C +# error Expected CONSUMER_LANG_C +# endif -#if !LANG_IS_C -#error Expected LANG_IS_C -#endif +# if !LANG_IS_C +# error Expected LANG_IS_C +# endif -#if LANG_IS_CXX -#error Unexpected LANG_IS_CXX -#endif +# if LANG_IS_CXX +# error Unexpected LANG_IS_CXX +# endif #endif void consumer_c() diff --git a/Tests/CMakeCommands/target_compile_options/consumer.cpp b/Tests/CMakeCommands/target_compile_options/consumer.cpp index 7750950..fe79eb5 100644 --- a/Tests/CMakeCommands/target_compile_options/consumer.cpp +++ b/Tests/CMakeCommands/target_compile_options/consumer.cpp @@ -1,34 +1,34 @@ #ifdef DO_GNU_TESTS -#ifdef MY_PRIVATE_DEFINE -#error Unexpected MY_PRIVATE_DEFINE -#endif +# ifdef MY_PRIVATE_DEFINE +# error Unexpected MY_PRIVATE_DEFINE +# endif -#ifndef MY_PUBLIC_DEFINE -#error Expected MY_PUBLIC_DEFINE -#endif +# ifndef MY_PUBLIC_DEFINE +# error Expected MY_PUBLIC_DEFINE +# endif -#ifndef MY_INTERFACE_DEFINE -#error Expected MY_INTERFACE_DEFINE -#endif +# ifndef MY_INTERFACE_DEFINE +# error Expected MY_INTERFACE_DEFINE +# endif #endif #ifndef CONSUMER_LANG_CXX -#error Expected CONSUMER_LANG_CXX +# error Expected CONSUMER_LANG_CXX #endif #ifdef CONSUMER_LANG_C -#error Unexpected CONSUMER_LANG_C +# error Unexpected CONSUMER_LANG_C #endif #if !LANG_IS_CXX -#error Expected LANG_IS_CXX +# error Expected LANG_IS_CXX #endif #if LANG_IS_C -#error Unexpected LANG_IS_C +# error Unexpected LANG_IS_C #endif int main() diff --git a/Tests/CMakeCommands/target_compile_options/main.cpp b/Tests/CMakeCommands/target_compile_options/main.cpp index ac472ae..829a25e 100644 --- a/Tests/CMakeCommands/target_compile_options/main.cpp +++ b/Tests/CMakeCommands/target_compile_options/main.cpp @@ -1,17 +1,17 @@ #ifdef DO_GNU_TESTS -#ifndef MY_PRIVATE_DEFINE -#error Expected MY_PRIVATE_DEFINE -#endif +# ifndef MY_PRIVATE_DEFINE +# error Expected MY_PRIVATE_DEFINE +# endif -#ifndef MY_PUBLIC_DEFINE -#error Expected MY_PUBLIC_DEFINE -#endif +# ifndef MY_PUBLIC_DEFINE +# error Expected MY_PUBLIC_DEFINE +# endif -#ifdef MY_INTERFACE_DEFINE -#error Unexpected MY_INTERFACE_DEFINE -#endif +# ifdef MY_INTERFACE_DEFINE +# error Unexpected MY_INTERFACE_DEFINE +# endif #endif diff --git a/Tests/CMakeCommands/target_include_directories/consumer.c b/Tests/CMakeCommands/target_include_directories/consumer.c index 419c2d2..7fd694b 100644 --- a/Tests/CMakeCommands/target_include_directories/consumer.c +++ b/Tests/CMakeCommands/target_include_directories/consumer.c @@ -2,17 +2,17 @@ // Visual Studio allows only one set of flags for C and C++. // In a target using C++ we pick the C++ flags even for C sources. #ifdef TEST_LANG_DEFINES_FOR_VISUAL_STUDIO_OR_XCODE -#include "cxx_only.h" +# include "cxx_only.h" -#ifndef CXX_ONLY_DEFINE -#error Expected CXX_ONLY_DEFINE -#endif +# ifndef CXX_ONLY_DEFINE +# error Expected CXX_ONLY_DEFINE +# endif #else -#include "c_only.h" +# include "c_only.h" -#ifndef C_ONLY_DEFINE -#error Expected C_ONLY_DEFINE -#endif +# ifndef C_ONLY_DEFINE +# error Expected C_ONLY_DEFINE +# endif #endif int consumer_c() diff --git a/Tests/CMakeCommands/target_include_directories/consumer.cpp b/Tests/CMakeCommands/target_include_directories/consumer.cpp index 1e018ad..267b0a3 100644 --- a/Tests/CMakeCommands/target_include_directories/consumer.cpp +++ b/Tests/CMakeCommands/target_include_directories/consumer.cpp @@ -7,31 +7,31 @@ #include "relative_dir.h" #ifdef PRIVATEINCLUDE_DEFINE -#error Unexpected PRIVATEINCLUDE_DEFINE +# error Unexpected PRIVATEINCLUDE_DEFINE #endif #ifndef PUBLICINCLUDE_DEFINE -#error Expected PUBLICINCLUDE_DEFINE +# error Expected PUBLICINCLUDE_DEFINE #endif #ifndef INTERFACEINCLUDE_DEFINE -#error Expected INTERFACEINCLUDE_DEFINE +# error Expected INTERFACEINCLUDE_DEFINE #endif #ifndef CURE_DEFINE -#error Expected CURE_DEFINE +# error Expected CURE_DEFINE #endif #ifndef RELATIVE_DIR_DEFINE -#error Expected RELATIVE_DIR_DEFINE +# error Expected RELATIVE_DIR_DEFINE #endif #ifndef CONSUMER_DEFINE -#error Expected CONSUMER_DEFINE +# error Expected CONSUMER_DEFINE #endif #ifndef CXX_ONLY_DEFINE -#error Expected CXX_ONLY_DEFINE +# error Expected CXX_ONLY_DEFINE #endif int main() diff --git a/Tests/CMakeCommands/target_include_directories/main.cpp b/Tests/CMakeCommands/target_include_directories/main.cpp index 71298ce..dd591bf 100644 --- a/Tests/CMakeCommands/target_include_directories/main.cpp +++ b/Tests/CMakeCommands/target_include_directories/main.cpp @@ -4,19 +4,19 @@ #include "publicinclude.h" #ifndef PRIVATEINCLUDE_DEFINE -#error Expected PRIVATEINCLUDE_DEFINE +# error Expected PRIVATEINCLUDE_DEFINE #endif #ifndef PUBLICINCLUDE_DEFINE -#error Expected PUBLICINCLUDE_DEFINE +# error Expected PUBLICINCLUDE_DEFINE #endif #ifdef INTERFACEINCLUDE_DEFINE -#error Unexpected INTERFACEINCLUDE_DEFINE +# error Unexpected INTERFACEINCLUDE_DEFINE #endif #ifndef CURE_DEFINE -#error Expected CURE_DEFINE +# error Expected CURE_DEFINE #endif int main() diff --git a/Tests/CMakeCommands/target_link_libraries/libgenex.h b/Tests/CMakeCommands/target_link_libraries/libgenex.h index 733f9b6..59ac18a 100644 --- a/Tests/CMakeCommands/target_link_libraries/libgenex.h +++ b/Tests/CMakeCommands/target_link_libraries/libgenex.h @@ -2,7 +2,7 @@ #include "libgenex_export.h" #ifndef LIBGENEX_H -#define LIBGENEX_H +# define LIBGENEX_H struct LIBGENEX_EXPORT LibGenex { diff --git a/Tests/CMakeCommands/target_link_libraries/targetC.cpp b/Tests/CMakeCommands/target_link_libraries/targetC.cpp index 7c5c9e4..cae02b9 100644 --- a/Tests/CMakeCommands/target_link_libraries/targetC.cpp +++ b/Tests/CMakeCommands/target_link_libraries/targetC.cpp @@ -5,7 +5,7 @@ #include "foo.h" #ifndef TEST_DEF -#error Expected TEST_DEF definition +# error Expected TEST_DEF definition #endif int main(int, char**) |