Skip to content

Commit

Permalink
CMakeLists: Remove redundant spaces around CMake command calls
Browse files Browse the repository at this point in the history
  • Loading branch information
zaufi authored and bradking committed Sep 22, 2022
1 parent a509602 commit dd28d76
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 84 deletions.
25 changes: 13 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ if(NOT DEFINED CMAKE_C_STANDARD AND NOT CMake_NO_C_STANDARD)
endif()
endif()
if(NOT DEFINED CMAKE_CXX_STANDARD AND NOT CMake_NO_CXX_STANDARD)
if (CMAKE_CXX_COMPILER_ID STREQUAL SunPro AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.14)
if(CMAKE_CXX_COMPILER_ID STREQUAL SunPro AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.14)
set(CMAKE_CXX_STANDARD 98)
else()
if(NOT CMAKE_VERSION VERSION_LESS 3.8)
Expand Down Expand Up @@ -143,7 +143,7 @@ option(CMake_BUILD_DEVELOPER_REFERENCE
mark_as_advanced(CMake_BUILD_DEVELOPER_REFERENCE)

# option to build using interprocedural optimizations (IPO/LTO)
if (NOT CMAKE_VERSION VERSION_LESS 3.12.2)
if(NOT CMAKE_VERSION VERSION_LESS 3.12.2)
option(CMake_BUILD_LTO "Compile CMake with link-time optimization if supported" OFF)
if(CMake_BUILD_LTO)
include(CheckIPOSupported)
Expand Down Expand Up @@ -344,7 +344,7 @@ endmacro()
# a macro to build the utilities used by CMake
# Simply to improve readability of the main script.
#-----------------------------------------------------------------------
macro (CMAKE_BUILD_UTILITIES)
macro(CMAKE_BUILD_UTILITIES)
find_package(Threads)

# Suppress unnecessary checks in third-party code.
Expand Down Expand Up @@ -400,15 +400,15 @@ macro (CMAKE_BUILD_UTILITIES)
# Setup third-party libraries.
# Everything in the tree should be able to include files from the
# Utilities directory.
if ((CMAKE_SYSTEM_NAME STREQUAL "AIX" OR CMAKE_SYSTEM_NAME STREQUAL "OS400") AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if((CMAKE_SYSTEM_NAME STREQUAL "AIX" OR CMAKE_SYSTEM_NAME STREQUAL "OS400") AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# using -isystem option generate error "template with C linkage"
include_directories("${CMake_SOURCE_DIR}/Utilities/std")
else()
include_directories(SYSTEM "${CMake_SOURCE_DIR}/Utilities/std")
endif()

include_directories("${CMake_BINARY_DIR}/Utilities")
if ((CMAKE_SYSTEM_NAME STREQUAL "AIX" OR CMAKE_SYSTEM_NAME STREQUAL "OS400") AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if((CMAKE_SYSTEM_NAME STREQUAL "AIX" OR CMAKE_SYSTEM_NAME STREQUAL "OS400") AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# using -isystem option generate error "template with C linkage"
include_directories("${CMake_SOURCE_DIR}/Utilities")
else()
Expand Down Expand Up @@ -686,14 +686,14 @@ macro (CMAKE_BUILD_UTILITIES)
#---------------------------------------------------------------------
# Use curses?
if(NOT DEFINED BUILD_CursesDialog)
if (UNIX)
if(UNIX)
include(${CMake_SOURCE_DIR}/Source/Checks/Curses.cmake)
set(BUILD_CursesDialog_DEFAULT "${CMakeCheckCurses_COMPILED}")
elseif(WIN32)
set(BUILD_CursesDialog_DEFAULT "OFF")
endif()
option(BUILD_CursesDialog "Build the CMake Curses Dialog ccmake" "${BUILD_CursesDialog_DEFAULT}")
endif ()
endif()
if(BUILD_CursesDialog)
if(UNIX)
set(CURSES_NEED_NCURSES TRUE)
Expand All @@ -718,10 +718,10 @@ macro (CMAKE_BUILD_UTILITIES)
if(NOT CMAKE_USE_SYSTEM_FORM)
add_subdirectory(Source/CursesDialog/form)
elseif(NOT CURSES_FORM_LIBRARY)
message( FATAL_ERROR "CMAKE_USE_SYSTEM_FORM in ON but CURSES_FORM_LIBRARY is not set!" )
message(FATAL_ERROR "CMAKE_USE_SYSTEM_FORM in ON but CURSES_FORM_LIBRARY is not set!")
endif()
endif()
endmacro ()
endmacro()

#-----------------------------------------------------------------------
if(NOT CMake_TEST_EXTERNAL_CMAKE)
Expand Down Expand Up @@ -749,7 +749,7 @@ include(Source/CMakeVersion.cmake)

# Include the standard Dart testing module
enable_testing()
include (${CMAKE_ROOT}/Modules/Dart.cmake)
include(${CMAKE_ROOT}/Modules/Dart.cmake)

# Set up test-time configuration.
set_directory_properties(PROPERTIES
Expand Down Expand Up @@ -836,7 +836,7 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE)
add_custom_target(uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")

include (CMakeCPack.cmake)
include(CMakeCPack.cmake)

endif()

Expand Down Expand Up @@ -891,7 +891,8 @@ endif()

if(BUILD_TESTING)
add_test(SystemInformationNew "${CMAKE_CMAKE_COMMAND}"
--system-information -G "${CMAKE_GENERATOR}" )
--system-information -G "${CMAKE_GENERATOR}"
)
endif()

if(NOT CMake_TEST_EXTERNAL_CMAKE)
Expand Down
12 changes: 6 additions & 6 deletions Source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# To ensure maximum portability across various compilers and platforms
# deactivate any compiler extensions. Skip this for QNX, where additional
# work is needed to build without compiler extensions.
if (NOT CMAKE_SYSTEM_NAME STREQUAL "QNX")
if(NOT CMAKE_SYSTEM_NAME STREQUAL "QNX")
set(CMAKE_C_EXTENSIONS FALSE)
set(CMAKE_CXX_EXTENSIONS FALSE)
endif()
Expand Down Expand Up @@ -760,7 +760,7 @@ if(APPLE)
endif()


if (WIN32)
if(WIN32)
set(SRCS ${SRCS}
cmCallVisualStudioMacro.cxx
cmCallVisualStudioMacro.h
Expand Down Expand Up @@ -824,7 +824,7 @@ if (WIN32)
# GetVersion to work properly on Windows 8 and above.
set(MANIFEST_FILE ${CMAKE_CURRENT_SOURCE_DIR}/cmake.version.manifest)
endif()
endif ()
endif()

# Watcom support
if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
Expand Down Expand Up @@ -1084,7 +1084,7 @@ if(UNIX)
endif()
endif()

if (NOT FREEBSD_PKG_INCLUDE_DIRS OR NOT FREEBSD_PKG_LIBRARIES)
if(NOT FREEBSD_PKG_INCLUDE_DIRS OR NOT FREEBSD_PKG_LIBRARIES)
message(FATAL_ERROR "CPack needs libpkg(3) to produce FreeBSD packages natively.")
endif()
else()
Expand Down Expand Up @@ -1188,8 +1188,8 @@ if(BUILD_QtDialog)
add_subdirectory(QtDialog)
endif()

include (${CMake_BINARY_DIR}/Source/LocalUserOptions.cmake OPTIONAL)
include (${CMake_SOURCE_DIR}/Source/LocalUserOptions.cmake OPTIONAL)
include(${CMake_BINARY_DIR}/Source/LocalUserOptions.cmake OPTIONAL)
include(${CMake_SOURCE_DIR}/Source/LocalUserOptions.cmake OPTIONAL)

if(WIN32)
# Compute the binary version that appears in the RC file. Version
Expand Down
20 changes: 10 additions & 10 deletions Source/QtDialog/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

project(QtDialog)
CMake_OPTIONAL_COMPONENT(cmake-gui)
set (QT_COMPONENTS
set(QT_COMPONENTS
Core
Widgets
Gui
Expand Down Expand Up @@ -41,7 +41,7 @@ set(CMake_QT_EXTRA_LIBRARIES)
# Try to find the package WinExtras for the task bar progress
if(WIN32)
find_package(Qt${INSTALLED_QT_VERSION}WinExtras QUIET)
if (Qt${INSTALLED_QT_VERSION}WinExtras_FOUND)
if(Qt${INSTALLED_QT_VERSION}WinExtras_FOUND)
add_definitions(-DQT_WINEXTRAS)
list(APPEND CMake_QT_EXTRA_LIBRARIES Qt${INSTALLED_QT_VERSION}::WinExtras)
list(APPEND QT_COMPONENTS WinExtras)
Expand Down Expand Up @@ -101,13 +101,13 @@ if(CMake_INSTALL_DEPENDENCIES AND (APPLE OR WIN32))
endmacro()
macro(install_qt_plugins _comps _plugins_var)
foreach(_qt_comp IN LISTS ${_comps})
if (INSTALLED_QT_VERSION VERSION_LESS 6)
if(INSTALLED_QT_VERSION VERSION_LESS 6)
set(_qt_module_plugins ${Qt${INSTALLED_QT_VERSION}${_qt_comp}_PLUGINS})
else()
get_target_property(_qt_module_plugins Qt${INSTALLED_QT_VERSION}::${_qt_comp} QT_PLUGINS)
endif()
foreach(_qt_plugin IN LISTS _qt_module_plugins)
if (INSTALLED_QT_VERSION VERSION_GREATER_EQUAL 6)
if(INSTALLED_QT_VERSION VERSION_GREATER_EQUAL 6)
# Qt6 provides the plugins as individual packages that need to be found.
find_package(Qt${INSTALLED_QT_VERSION}${_qt_plugin} QUIET
PATHS ${Qt${INSTALLED_QT_VERSION}${_qt_comp}_DIR})
Expand All @@ -117,7 +117,7 @@ if(CMake_INSTALL_DEPENDENCIES AND (APPLE OR WIN32))
endforeach()
endmacro()
if(APPLE)
if (INSTALLED_QT_VERSION VERSION_EQUAL 5)
if(INSTALLED_QT_VERSION VERSION_EQUAL 5)
install_qt_plugin("Qt5::QCocoaIntegrationPlugin" QT_PLUGINS)
if(TARGET Qt5::QMacStylePlugin)
install_qt_plugin("Qt5::QMacStylePlugin" QT_PLUGINS)
Expand All @@ -132,7 +132,7 @@ if(CMake_INSTALL_DEPENDENCIES AND (APPLE OR WIN32))
DESTINATION "${CMAKE_INSTALL_PREFIX}/Resources"
${COMPONENT})
elseif(WIN32 AND NOT CMake_QT_STATIC_QWindowsIntegrationPlugin_LIBRARIES)
if (INSTALLED_QT_VERSION VERSION_EQUAL 5)
if(INSTALLED_QT_VERSION VERSION_EQUAL 5)
install_qt_plugin("Qt5::QWindowsIntegrationPlugin" QT_PLUGINS)
else()
# FIXME: Minimize plugins for Qt6.
Expand Down Expand Up @@ -204,7 +204,7 @@ set(MOC_SRCS
)
set(QRC_SRCS CMakeSetup.qrc)

if (INSTALLED_QT_VERSION VERSION_LESS 6)
if(INSTALLED_QT_VERSION VERSION_LESS 6)
qt5_wrap_ui(UI_BUILT_SRCS ${UI_SRCS})
qt5_wrap_cpp(MOC_BUILT_SRCS ${MOC_SRCS})
qt5_add_resources(QRC_BUILT_SRCS ${QRC_SRCS})
Expand All @@ -215,15 +215,15 @@ else()
endif()
add_library(CMakeGUIQRCLib OBJECT ${QRC_BUILT_SRCS})

if (FALSE) # CMake's bootstrap binary does not support automoc
if(FALSE) # CMake's bootstrap binary does not support automoc
set(CMAKE_AUTOMOC 1)
set(CMAKE_AUTORCC 1)
set(CMAKE_AUTOUIC 1)
else ()
else()
list(APPEND SRCS
${UI_BUILT_SRCS}
${MOC_BUILT_SRCS})
endif ()
endif()

if(USE_LGPL)
install(FILES ${CMake_SOURCE_DIR}/Licenses/LGPLv${USE_LGPL}.txt
Expand Down
Loading

0 comments on commit dd28d76

Please sign in to comment.