From 33b4976d7a1d23f31a46eb0acc9ece8d8dfd821d Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Thu, 29 Oct 2020 03:48:57 +0100 Subject: CMakeLists.txt: omit end{if,foreach} expressions Their usefulness was almost negative. --- CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 15f769d..00f7ad7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ project (nncmpp VERSION 0.9.0 LANGUAGES C) if ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC) set (wdisabled "-Wno-unused-function") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall -Wextra ${wdisabled}") -endif ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC) +endif () # For custom modules set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/liberty/cmake) @@ -26,7 +26,7 @@ if (USE_SYSTEM_TERMO) if (NOT Termo_FOUND) message (FATAL_ERROR "System termo library not found") endif (NOT Termo_FOUND) -else (USE_SYSTEM_TERMO) +else () add_subdirectory (termo EXCLUDE_FROM_ALL) # We don't have many good choices when we don't want to install it and want # to support older versions of CMake; this is a relatively clean approach @@ -36,7 +36,7 @@ else (USE_SYSTEM_TERMO) get_directory_property (Termo_INCLUDE_DIRS DIRECTORY termo INCLUDE_DIRECTORIES) set (Termo_LIBRARIES termo-static) -endif (USE_SYSTEM_TERMO) +endif () include_directories (${Unistring_INCLUDE_DIRS} ${Ncursesw_INCLUDE_DIRS} ${Termo_INCLUDE_DIRS} ${curl_INCLUDE_DIRS}) @@ -67,7 +67,7 @@ install (FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR}) find_program (HELP2MAN_EXECUTABLE help2man) if (NOT HELP2MAN_EXECUTABLE) message (FATAL_ERROR "help2man not found") -endif (NOT HELP2MAN_EXECUTABLE) +endif () foreach (page ${PROJECT_NAME}) set (page_output "${PROJECT_BINARY_DIR}/${page}.1") @@ -77,7 +77,7 @@ foreach (page ${PROJECT_NAME}) "${PROJECT_BINARY_DIR}/${page}" -o ${page_output} DEPENDS ${page} COMMENT "Generating man page for ${page}" VERBATIM) -endforeach (page) +endforeach () add_custom_target (docs ALL DEPENDS ${project_MAN_PAGES}) @@ -85,7 +85,7 @@ foreach (page ${project_MAN_PAGES}) string (REGEX MATCH "\\.([0-9])$" manpage_suffix "${page}") install (FILES "${page}" DESTINATION "${CMAKE_INSTALL_MANDIR}/man${CMAKE_MATCH_1}") -endforeach (page) +endforeach () # CPack set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "MPD client") -- cgit v1.2.3-70-g09d2