From 18bf641777d1f4baf5eb63f552b63685958f02f4 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Fri, 12 Feb 2021 16:40:33 +0100 Subject: Use newlines more consistently in generate compile-test code The generated code contained many repeated blank lines. Most main()s were preceded by one, but not all. Only include blank lines for actual empty entries in lists, where configure.json specified them, plus one before main if anything else precedes it. Change-Id: I6e6c34940e08712a1aa848a3c9ad1b0fb5806d77 Reviewed-by: Joerg Bornemann --- configure.cmake | 34 ++++++++-------------------------- 1 file changed, 8 insertions(+), 26 deletions(-) (limited to 'configure.cmake') diff --git a/configure.cmake b/configure.cmake index 5686aa36ab..858f580a0e 100644 --- a/configure.cmake +++ b/configure.cmake @@ -27,11 +27,9 @@ qt_config_compile_test(cxx14 # error __cplusplus must be > 201103L (the value of C++11) #endif - int main(void) { /* BEGIN TEST: */ - /* END TEST: */ return 0; } @@ -51,7 +49,6 @@ qt_config_compile_test(cxx17 #include // https://bugs.llvm.org//show_bug.cgi?id=33117 #include - int main(void) { /* BEGIN TEST: */ @@ -75,11 +72,9 @@ qt_config_compile_test(cxx20 # error __cplusplus must be > 201703L (the value for C++17) #endif - int main(void) { /* BEGIN TEST: */ - /* END TEST: */ return 0; } @@ -91,15 +86,13 @@ int main(void) qt_config_compile_test(precompile_header LABEL "precompiled header support" CODE -" - -#ifndef HEADER_H +"#ifndef HEADER_H #error no go #endif + int main(void) { /* BEGIN TEST: */ - /* END TEST: */ return 0; } @@ -144,11 +137,9 @@ qt_config_compile_test(reduce_relocations # error Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129). #endif - int main(void) { /* BEGIN TEST: */ - /* END TEST: */ return 0; } @@ -166,7 +157,6 @@ qt_config_compile_test(signaling_nan CODE "#include - int main(void) { /* BEGIN TEST: */ @@ -244,8 +234,7 @@ qt_config_compile_test_x86simd(avx512vbmi "AVX512 VBMI instructions") qt_config_compile_test(posix_fallocate LABEL "POSIX fallocate()" CODE -" -#include +"#include #include int main(void) @@ -261,8 +250,7 @@ int main(void) qt_config_compile_test(alloca_stdlib_h LABEL "alloca() in stdlib.h" CODE -" -#include +"#include int main(void) { @@ -277,12 +265,12 @@ alloca(1); qt_config_compile_test(alloca_h LABEL "alloca() in alloca.h" CODE -" -#include +"#include #ifdef __QNXNTO__ // extra include needed in QNX7 to define NULL for the alloca() macro # include #endif + int main(void) { /* BEGIN TEST: */ @@ -296,8 +284,7 @@ alloca(1); qt_config_compile_test(alloca_malloc_h LABEL "alloca() in malloc.h" CODE -" -#include +"#include int main(void) { @@ -320,11 +307,9 @@ qt_config_compile_test(stack_protector # endif #endif - int main(void) { /* BEGIN TEST: */ - /* END TEST: */ return 0; } @@ -334,10 +319,7 @@ int main(void) qt_config_compile_test(intelcet LABEL "Support for Intel Control-flow Enforcement Technology" CODE -" - - -int main(void) +"int main(void) { /* BEGIN TEST: */ #if !defined(__CET__) -- cgit v1.2.3