From 11345aedd8007fce31d7e59609833a87f4d3c6de Mon Sep 17 00:00:00 2001 From: Serge Gautherie <32623169+SergeGautherie@users.noreply.github.com> Date: Tue, 26 May 2020 20:24:02 +0200 Subject: [PATCH] [FORMATTING] [CMAKE] Remove space in 'if (' (#2847) --- CMakeLists.txt | 2 +- base/applications/wordpad/CMakeLists.txt | 2 +- base/services/nfsd/CMakeLists.txt | 2 +- boot/environ/CMakeLists.txt | 2 +- dll/keyboard/CMakeLists.txt | 2 +- drivers/base/CMakeLists.txt | 2 +- drivers/network/dd/netkvm/CMakeLists.txt | 2 +- hal/halx86/CMakeLists.txt | 2 +- modules/rosapps/applications/CMakeLists.txt | 2 +- modules/rosapps/applications/sysutils/CMakeLists.txt | 2 +- modules/rostests/winetests/CMakeLists.txt | 4 ++-- sdk/cmake/CMakeMacros.cmake | 8 ++++---- sdk/cmake/gcc.cmake | 2 +- sdk/cmake/msvc.cmake | 8 ++++---- sdk/tools/mkisofs/CMakeLists.txt | 2 +- toolchain-clang.cmake | 4 ++-- toolchain-gcc.cmake | 4 ++-- 17 files changed, 26 insertions(+), 26 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 703d92f3bbe..c3613211a66 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -249,7 +249,7 @@ else() endif() # For MSVC builds, this puts all debug symbols file in the same directory. - if (MSVC) + if(MSVC) set(CMAKE_PDB_OUTPUT_DIRECTORY "${REACTOS_BINARY_DIR}/msvc_pdb") elseif(SEPARATE_DBG) set(CMAKE_PDB_OUTPUT_DIRECTORY "${REACTOS_BINARY_DIR}/symbols") diff --git a/base/applications/wordpad/CMakeLists.txt b/base/applications/wordpad/CMakeLists.txt index 80d9117a270..4953dd84bbc 100644 --- a/base/applications/wordpad/CMakeLists.txt +++ b/base/applications/wordpad/CMakeLists.txt @@ -4,7 +4,7 @@ remove_definitions(-D_WIN32_IE=0x600) add_definitions(-D__ROS_LONG64__) include_directories(BEFORE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine) -if (MSVC) +if(MSVC) # Disable warning C4477 (printf format warnings) add_compile_flags("/wd4477") endif() diff --git a/base/services/nfsd/CMakeLists.txt b/base/services/nfsd/CMakeLists.txt index d92ff83d858..0da38928297 100644 --- a/base/services/nfsd/CMakeLists.txt +++ b/base/services/nfsd/CMakeLists.txt @@ -7,7 +7,7 @@ include_directories( ${REACTOS_SOURCE_DIR}/drivers/filesystems/nfs ${REACTOS_SOURCE_DIR}/dll/np/nfs) -if (MSVC) +if(MSVC) # Disable warning C4477 (printf format warnings) add_compile_flags("/wd4477") endif() diff --git a/boot/environ/CMakeLists.txt b/boot/environ/CMakeLists.txt index 9bafea5eef7..4f62a8b111b 100644 --- a/boot/environ/CMakeLists.txt +++ b/boot/environ/CMakeLists.txt @@ -82,7 +82,7 @@ add_executable(bootmgfw ${BOOTMGR_BASE_SOURCE} app/bootmgr/bootmgr.rc) set_target_properties(bootmgfw PROPERTIES SUFFIX ".efi") if(MSVC) - if (ARCH STREQUAL "arm") + if(ARCH STREQUAL "arm") add_target_link_flags(bootmgfw "/ignore:4078 /ignore:4254 /DRIVER") else() add_target_link_flags(bootmgfw "/ignore:4078 /ignore:4254 /DRIVER /FIXED") diff --git a/dll/keyboard/CMakeLists.txt b/dll/keyboard/CMakeLists.txt index 088cb6acad3..f728060633c 100644 --- a/dll/keyboard/CMakeLists.txt +++ b/dll/keyboard/CMakeLists.txt @@ -108,7 +108,7 @@ foreach(_keyboard_layout ${_keyboard_layouts}) endif() # dynamic analysis switches - if (STACK_PROTECTOR) + if(STACK_PROTECTOR) target_link_libraries(${_keyboard_layout} gcc_ssp) endif() diff --git a/drivers/base/CMakeLists.txt b/drivers/base/CMakeLists.txt index c2f2b4609f7..a984b21f4b3 100644 --- a/drivers/base/CMakeLists.txt +++ b/drivers/base/CMakeLists.txt @@ -4,7 +4,7 @@ add_subdirectory(bootvid) add_subdirectory(condrv) if(_WINKD_) - if (GDB) + if(GDB) add_subdirectory(kdgdb) else() add_subdirectory(kdcom) diff --git a/drivers/network/dd/netkvm/CMakeLists.txt b/drivers/network/dd/netkvm/CMakeLists.txt index 881653525ad..73a4a2fe323 100644 --- a/drivers/network/dd/netkvm/CMakeLists.txt +++ b/drivers/network/dd/netkvm/CMakeLists.txt @@ -26,7 +26,7 @@ add_importlibs(netkvm ndis ntoskrnl hal) add_cd_file(TARGET netkvm DESTINATION reactos/system32/drivers FOR all) add_driver_inf(netkvm netkvm.inf) -if (NOT MSVC) +if(NOT MSVC) add_compile_flags("-Wno-unused-function") add_compile_flags("-Wno-old-style-declaration") add_compile_flags("-Wno-unknown-pragmas") diff --git a/hal/halx86/CMakeLists.txt b/hal/halx86/CMakeLists.txt index c462dc1e69d..4dabc83e5b8 100644 --- a/hal/halx86/CMakeLists.txt +++ b/hal/halx86/CMakeLists.txt @@ -32,7 +32,7 @@ function(add_hal _halname) target_link_libraries(${_halname} ${_haldata_LIBS}) endif() - if (${_halname} STREQUAL "hal") + if(${_halname} STREQUAL "hal") target_link_libraries(${_halname} libcntpr arbiter) else() target_link_libraries(${_halname} libcntpr) diff --git a/modules/rosapps/applications/CMakeLists.txt b/modules/rosapps/applications/CMakeLists.txt index 19c0ecfe9a5..fd2658b0114 100644 --- a/modules/rosapps/applications/CMakeLists.txt +++ b/modules/rosapps/applications/CMakeLists.txt @@ -1,6 +1,6 @@ add_subdirectory(cmdutils) add_subdirectory(devutils) -if (ARCH STREQUAL "i386") +if(ARCH STREQUAL "i386") add_subdirectory(explorer-old) add_subdirectory(fraginator) endif() diff --git a/modules/rosapps/applications/sysutils/CMakeLists.txt b/modules/rosapps/applications/sysutils/CMakeLists.txt index be5a99d959e..989e06f1ccd 100644 --- a/modules/rosapps/applications/sysutils/CMakeLists.txt +++ b/modules/rosapps/applications/sysutils/CMakeLists.txt @@ -6,7 +6,7 @@ add_subdirectory(kill) add_subdirectory(logevent) add_subdirectory(lsdd) add_subdirectory(man) -if (ARCH STREQUAL "i386") +if(ARCH STREQUAL "i386") add_subdirectory(pedump) endif() add_subdirectory(regexpl) diff --git a/modules/rostests/winetests/CMakeLists.txt b/modules/rostests/winetests/CMakeLists.txt index c4553c5a09c..fb8df2e9709 100644 --- a/modules/rostests/winetests/CMakeLists.txt +++ b/modules/rostests/winetests/CMakeLists.txt @@ -1,14 +1,14 @@ add_definitions(-D__ROS_LONG64__) -if (MSVC) +if(MSVC) add_compile_flags("/wd4090") # C4090: 'function': different 'const' qualifiers add_compile_flags("/wd4133") # C4133: 'function': incompatible types - from ' *' to 'UINT *' add_compile_flags("/wd4146") # C4146: unary minus operator applied to unsigned type, result still unsigned add_compile_flags("/wd4189") # C4189: 'x': local variable is initialized but not referenced add_compile_flags("/wd4267") # C4267: '=': conversion from 'size_t' to 'int', possible loss of data add_compile_flags("/wd4305") # C4305: '=': truncation from 'double' to 'FLOAT' - if (ARCH STREQUAL "amd64") + if(ARCH STREQUAL "amd64") add_compile_flags("/wd4101") # C4101: 'x': unreferenced local variable add_compile_flags("/wd4312") # C4312: 'type cast': conversion from 'unsigned int' to 'char *' of greater size add_compile_flags("/wd4334") # C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) diff --git a/sdk/cmake/CMakeMacros.cmake b/sdk/cmake/CMakeMacros.cmake index 1f3043667f0..51ec82d904e 100644 --- a/sdk/cmake/CMakeMacros.cmake +++ b/sdk/cmake/CMakeMacros.cmake @@ -535,7 +535,7 @@ if(NOT MSVC_IDE) add_clean_target(${name}) # cmake adds a module_EXPORTS define when compiling a module or a shared library. We don't use that. get_target_property(_type ${name} TYPE) - if (_type MATCHES SHARED_LIBRARY|MODULE_LIBRARY) + if(_type MATCHES SHARED_LIBRARY|MODULE_LIBRARY) set_target_properties(${name} PROPERTIES DEFINE_SYMBOL "") endif() endfunction() @@ -565,7 +565,7 @@ elseif(USE_FOLDER_STRUCTURE) endif() # cmake adds a module_EXPORTS define when compiling a module or a shared library. We don't use that. get_target_property(_type ${name} TYPE) - if (_type MATCHES SHARED_LIBRARY|MODULE_LIBRARY) + if(_type MATCHES SHARED_LIBRARY|MODULE_LIBRARY) set_target_properties(${name} PROPERTIES DEFINE_SYMBOL "") endif() endfunction() @@ -580,7 +580,7 @@ else() _add_library(${name} ${ARGN}) # cmake adds a module_EXPORTS define when compiling a module or a shared library. We don't use that. get_target_property(_type ${name} TYPE) - if (_type MATCHES SHARED_LIBRARY|MODULE_LIBRARY) + if(_type MATCHES SHARED_LIBRARY|MODULE_LIBRARY) set_target_properties(${name} PROPERTIES DEFINE_SYMBOL "") endif() endfunction() @@ -652,7 +652,7 @@ function(set_module_type MODULE TYPE) endif() # Set the PE image version numbers from the NT OS version ReactOS is based on - if (MSVC) + if(MSVC) add_target_link_flags(${MODULE} "/VERSION:5.01") else() add_target_link_flags(${MODULE} "-Wl,--major-image-version,5 -Wl,--minor-image-version,01") diff --git a/sdk/cmake/gcc.cmake b/sdk/cmake/gcc.cmake index 616d4578f47..fa04065b851 100644 --- a/sdk/cmake/gcc.cmake +++ b/sdk/cmake/gcc.cmake @@ -388,7 +388,7 @@ function(spec2def _dllname _spec_file) message(FATAL_ERROR "spec2def only takes spec files as input.") endif() - if (__spec2def_WITH_RELAY) + if(__spec2def_WITH_RELAY) set(__with_relay_arg "--with-tracing") endif() diff --git a/sdk/cmake/msvc.cmake b/sdk/cmake/msvc.cmake index 01bbfee00e0..4e4e0478d59 100644 --- a/sdk/cmake/msvc.cmake +++ b/sdk/cmake/msvc.cmake @@ -52,12 +52,12 @@ endif() # default for older compilers. See CORE-6507 if(ARCH STREQUAL "i386") add_compile_flags("/arch:IA32") -endif () +endif() # VS 12+ requires /FS when used in parallel compilations if(NOT MSVC_IDE) add_compile_flags("/FS") -endif () +endif() # VS14+ tries to use thread-safe initialization add_compile_flags("/Zc:threadSafeInit-") @@ -67,7 +67,7 @@ add_compile_flags("/Zc:threadSafeInit-") if(ARCH STREQUAL "amd64" AND MSVC_VERSION GREATER 1922) add_compile_flags("/d2FH4-") add_link_options("/d2:-FH4-") -endif () +endif() # Generate Warnings Level 3 add_compile_flags("/W3") @@ -438,7 +438,7 @@ function(spec2def _dllname _spec_file) message(FATAL_ERROR "spec2def only takes spec files as input.") endif() - if (__spec2def_WITH_RELAY) + if(__spec2def_WITH_RELAY) set(__with_relay_arg "--with-tracing") endif() diff --git a/sdk/tools/mkisofs/CMakeLists.txt b/sdk/tools/mkisofs/CMakeLists.txt index 0caa8c8bc79..86cd3270b0b 100644 --- a/sdk/tools/mkisofs/CMakeLists.txt +++ b/sdk/tools/mkisofs/CMakeLists.txt @@ -85,7 +85,7 @@ if(MSVC) # MSVC complains about the resulting foo() vs. foo(void) mismatches. target_compile_options(mkisofs PRIVATE "/wd4113") - if (ARCH STREQUAL "amd64") + if(ARCH STREQUAL "amd64") # Disable warning "conversion from 'size_t' to 'int', possible loss of data" target_compile_options(mkisofs PRIVATE "/wd4267") diff --git a/toolchain-clang.cmake b/toolchain-clang.cmake index 70c5ba73078..1c9ad5d6ca8 100644 --- a/toolchain-clang.cmake +++ b/toolchain-clang.cmake @@ -4,7 +4,7 @@ if(NOT ARCH) endif() # Choose the right MinGW toolchain prefix -if (NOT DEFINED MINGW_TOOLCHAIN_PREFIX) +if(NOT DEFINED MINGW_TOOLCHAIN_PREFIX) if(ARCH STREQUAL "i386") if(CMAKE_HOST_WIN32) @@ -24,7 +24,7 @@ if (NOT DEFINED MINGW_TOOLCHAIN_PREFIX) endif() endif() -if (NOT DEFINED MINGW_TOOLCHAIN_SUFFIX) +if(NOT DEFINED MINGW_TOOLCHAIN_SUFFIX) set(MINGW_TOOLCHAIN_SUFFIX "" CACHE STRING "MinGW Toolchain Suffix") endif() diff --git a/toolchain-gcc.cmake b/toolchain-gcc.cmake index e1487b3225c..1d2a3a2be6e 100644 --- a/toolchain-gcc.cmake +++ b/toolchain-gcc.cmake @@ -10,7 +10,7 @@ if(NOT DEFINED CMAKE_BUILD_TYPE) endif() # Choose the right MinGW toolchain prefix -if (NOT DEFINED MINGW_TOOLCHAIN_PREFIX) +if(NOT DEFINED MINGW_TOOLCHAIN_PREFIX) if(ARCH STREQUAL "i386") if(CMAKE_HOST_WIN32) @@ -30,7 +30,7 @@ if (NOT DEFINED MINGW_TOOLCHAIN_PREFIX) endif() endif() -if (NOT DEFINED MINGW_TOOLCHAIN_SUFFIX) +if(NOT DEFINED MINGW_TOOLCHAIN_SUFFIX) set(MINGW_TOOLCHAIN_SUFFIX "" CACHE STRING "MinGW Toolchain Suffix") endif() -- 2.17.1