From 84b49be8f02aaf230164163a39c09049ed9f306d Mon Sep 17 00:00:00 2001 From: Marcin Wojdyr Date: Wed, 15 Aug 2012 16:59:36 +0100 Subject: [PATCH] Remove CMake multiline block-end command arguments removing arguments omitted in 9db3116226cb99fcf54e936c833953abcde9b729 --- CMakeLists.txt | 6 ++---- Modules/CMakeDetermineCCompiler.cmake | 4 +--- Modules/CMakeDetermineCXXCompiler.cmake | 4 +--- Modules/CMakeFindBinUtils.cmake | 8 ++------ Modules/FindGTK.cmake | 6 +----- Tests/BuildDepends/CMakeLists.txt | 12 ++++-------- Tests/CMakeLists.txt | 8 ++------ Tests/Properties/CMakeLists.txt | 6 ++---- Utilities/CMakeLists.txt | 3 +-- 9 files changed, 16 insertions(+), 41 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f0789a30b..ea1c0339e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -135,8 +135,7 @@ macro(CMAKE_SETUP_TESTING) if("${CMAKE_TEST_GENERATOR}" MATCHES "NMake" OR "${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio") set(CMAKE_TEST_MSVC 1) - endif("${CMAKE_TEST_GENERATOR}" MATCHES "NMake" OR - "${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio") + endif() endif() set(CMAKE_TEST_SYSTEM_LIBRARIES 0) @@ -561,8 +560,7 @@ if (UNIX) set(CMAKE_SKIP_RPATH OFF CACHE INTERNAL "CMake built with RPATH.") set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) - endif(CMAKE_USE_SYSTEM_CURL OR CMAKE_USE_SYSTEM_ZLIB - OR CMAKE_USE_SYSTEM_EXPAT OR CTEST_USE_XMLRPC OR CURSES_NEED_RPATH OR QT_NEED_RPATH) + endif() endif () diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake index 171eaddfe..16e2f53b3 100644 --- a/Modules/CMakeDetermineCCompiler.cmake +++ b/Modules/CMakeDetermineCCompiler.cmake @@ -160,9 +160,7 @@ if (CMAKE_CROSSCOMPILING set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1}) endif () -endif (CMAKE_CROSSCOMPILING - AND "${CMAKE_C_COMPILER_ID}" MATCHES "GNU" - AND NOT _CMAKE_TOOLCHAIN_PREFIX) +endif () include(${CMAKE_ROOT}/Modules/CMakeClDeps.cmake) include(CMakeFindBinUtils) diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake index 898947ad1..8e4d59ff1 100644 --- a/Modules/CMakeDetermineCXXCompiler.cmake +++ b/Modules/CMakeDetermineCXXCompiler.cmake @@ -167,9 +167,7 @@ if (CMAKE_CROSSCOMPILING set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1}) endif () -endif (CMAKE_CROSSCOMPILING - AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" - AND NOT _CMAKE_TOOLCHAIN_PREFIX) +endif () include(${CMAKE_ROOT}/Modules/CMakeClDeps.cmake) include(CMakeFindBinUtils) diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake index 362052fb5..e08c1c6a5 100644 --- a/Modules/CMakeFindBinUtils.cmake +++ b/Modules/CMakeFindBinUtils.cmake @@ -39,9 +39,7 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC" mark_as_advanced(CMAKE_LINKER) # in all other cases search for ar, ranlib, etc. -else("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC" - OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC" - OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio") +else() find_program(CMAKE_AR NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ar HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) @@ -58,9 +56,7 @@ else("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC" mark_as_advanced(CMAKE_AR CMAKE_RANLIB CMAKE_STRIP CMAKE_LINKER CMAKE_NM CMAKE_OBJDUMP CMAKE_OBJCOPY) -endif("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC" - OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC" - OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio") +endif() # on Apple there really should be install_name_tool diff --git a/Modules/FindGTK.cmake b/Modules/FindGTK.cmake index 505a05123..8a44ade41 100644 --- a/Modules/FindGTK.cmake +++ b/Modules/FindGTK.cmake @@ -139,11 +139,7 @@ if(UNIX) ) endif() - endif(GTK_gtk_INCLUDE_PATH - AND GTK_glibconfig_INCLUDE_PATH - AND GTK_glib_INCLUDE_PATH - AND GTK_gtk_LIBRARY - AND GTK_glib_LIBRARY) + endif() mark_as_advanced( GTK_gdk_LIBRARY diff --git a/Tests/BuildDepends/CMakeLists.txt b/Tests/BuildDepends/CMakeLists.txt index d3b1f3c0d..2a70b6eae 100644 --- a/Tests/BuildDepends/CMakeLists.txt +++ b/Tests/BuildDepends/CMakeLists.txt @@ -93,16 +93,14 @@ if(EXISTS message("found debug") set(bar "${BuildDepends_BINARY_DIR}/Project/Debug/bar${CMAKE_EXECUTABLE_SUFFIX}") -endif(EXISTS - "${BuildDepends_BINARY_DIR}/Project/Debug/bar${CMAKE_EXECUTABLE_SUFFIX}") +endif() set(zot ${BuildDepends_BINARY_DIR}/Project/zot${CMAKE_EXECUTABLE_SUFFIX}) if(EXISTS "${BuildDepends_BINARY_DIR}/Project/Debug/zot${CMAKE_EXECUTABLE_SUFFIX}" ) message("found debug") set(zot "${BuildDepends_BINARY_DIR}/Project/Debug/zot${CMAKE_EXECUTABLE_SUFFIX}") -endif(EXISTS - "${BuildDepends_BINARY_DIR}/Project/Debug/zot${CMAKE_EXECUTABLE_SUFFIX}") +endif() message("Running ${bar} ") execute_process(COMMAND ${bar} OUTPUT_VARIABLE out RESULT_VARIABLE runResult) @@ -178,13 +176,11 @@ endif() if(EXISTS "${BuildDepends_BINARY_DIR}/Project/Debug/bar${CMAKE_EXECUTABLE_SUFFIX}" ) message("found debug") -endif(EXISTS - "${BuildDepends_BINARY_DIR}/Project/Debug/bar${CMAKE_EXECUTABLE_SUFFIX}") +endif() if(EXISTS "${BuildDepends_BINARY_DIR}/Project/Debug/zot${CMAKE_EXECUTABLE_SUFFIX}" ) message("found debug") -endif(EXISTS - "${BuildDepends_BINARY_DIR}/Project/Debug/zot${CMAKE_EXECUTABLE_SUFFIX}") +endif() message("Running ${bar} ") execute_process(COMMAND ${bar} OUTPUT_VARIABLE out RESULT_VARIABLE runResult) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 9512ea6e6..d69e133f3 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -794,9 +794,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ NOT "$ENV{COVFILE}" STREQUAL "" OR CMAKE_RUN_LONG_TESTS) set(CTEST_RUN_CPackTestAllGenerators ${CTEST_TEST_CPACK}) - endif(CMAKE_CXX_FLAGS MATCHES "-ftest-coverage" OR - NOT "$ENV{COVFILE}" STREQUAL "" OR - CMAKE_RUN_LONG_TESTS) + endif() endif() if(CTEST_RUN_CPackTestAllGenerators) @@ -1217,9 +1215,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ "${CMake_BINARY_DIR}/Tests/SubDirSpaces/testfromsubdir.obj" ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/SubDirSpaces") - endif (MAKE_IS_GNU OR - "${CMAKE_TEST_MAKEPROGRAM}" MATCHES "nmake|gmake|wmake" OR - "${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio|XCode|Borland") + endif () if (WIN32) add_test(SubDir ${CMAKE_CTEST_COMMAND} diff --git a/Tests/Properties/CMakeLists.txt b/Tests/Properties/CMakeLists.txt index 7bf9c2dcc..285d5965e 100644 --- a/Tests/Properties/CMakeLists.txt +++ b/Tests/Properties/CMakeLists.txt @@ -53,15 +53,13 @@ get_property(SOURCERESULT if (RESULT1 AND RESULT2 AND RESULT3 AND GLOBALRESULT AND DIRECTORYRESULT AND SOURCERESULT) add_executable (Properties SubDir/properties3.cxx properties) -else (RESULT1 AND RESULT2 AND RESULT3 AND GLOBALRESULT AND - DIRECTORYRESULT AND SOURCERESULT) +else () message(SEND_ERROR "Error: test results are RESULT1=${RESULT1} RESULT2=${RESULT2} " "RESULT3=${RESULT3} GLOBALRESULT=${GLOBALRESULT} " "DIRECTORYRESULT=${DIRECTORYRESULT} " "SOURCERESULT=${SOURCERESULT}") -endif (RESULT1 AND RESULT2 AND RESULT3 AND GLOBALRESULT AND - DIRECTORYRESULT AND SOURCERESULT) +endif () # test the target property set_property(TARGET Properties PROPERTY TARGETTEST 1) diff --git a/Utilities/CMakeLists.txt b/Utilities/CMakeLists.txt index c39be8ba8..233d5e23a 100644 --- a/Utilities/CMakeLists.txt +++ b/Utilities/CMakeLists.txt @@ -81,8 +81,7 @@ if(BUILD_QtDialog AND "${CMAKE_GENERATOR}" MATCHES "${WIN_SHELL_GENS}" string(REPLACE ";" "\\;" _PATH "PATH=${Qt_BIN_DIR};%PATH%") set(cmake-gui-PATH COMMAND set "${_PATH}") endif() -endif(BUILD_QtDialog AND "${CMAKE_GENERATOR}" MATCHES "${WIN_SHELL_GENS}" - AND EXISTS "${QT_QMAKE_EXECUTABLE}" AND NOT CMAKE_NO_AUTO_QT_ENV) +endif() # add the docs for the executables ADD_DOCS(ctest ${CMake_SOURCE_DIR}/Utilities/Doxygen/authors.txt)