Commit 9db31162 authored by Kitware Robot's avatar Kitware Robot Committed by Brad King
Browse files

Remove CMake-language block-end command arguments

Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block.  This is no longer the preferred style.

Run the following shell code:

for c in else endif endforeach endfunction endmacro endwhile; do
    echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
parent 77543bde
...@@ -23,7 +23,7 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") ...@@ -23,7 +23,7 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
endif() endif()
include(${CMake_SOURCE_DIR}/Modules/InstallRequiredSystemLibraries.cmake) include(${CMake_SOURCE_DIR}/Modules/InstallRequiredSystemLibraries.cmake)
endif(EXISTS "${CMAKE_ROOT}/Modules/InstallRequiredSystemLibraries.cmake") endif()
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CMake is a build tool") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CMake is a build tool")
set(CPACK_PACKAGE_VENDOR "Kitware") set(CPACK_PACKAGE_VENDOR "Kitware")
...@@ -56,17 +56,17 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") ...@@ -56,17 +56,17 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
# cygwin is good for the system name # cygwin is good for the system name
if("${CMAKE_SYSTEM_NAME}" STREQUAL "CYGWIN") if("${CMAKE_SYSTEM_NAME}" STREQUAL "CYGWIN")
set(CPACK_SYSTEM_NAME Cygwin) set(CPACK_SYSTEM_NAME Cygwin)
else("${CMAKE_SYSTEM_NAME}" STREQUAL "CYGWIN") else()
set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}) set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
endif("${CMAKE_SYSTEM_NAME}" STREQUAL "CYGWIN") endif()
endif(NOT DEFINED CPACK_SYSTEM_NAME) endif()
if(${CPACK_SYSTEM_NAME} MATCHES Windows) if(${CPACK_SYSTEM_NAME} MATCHES Windows)
if(CMAKE_CL_64) if(CMAKE_CL_64)
set(CPACK_SYSTEM_NAME win64-x64) set(CPACK_SYSTEM_NAME win64-x64)
else(CMAKE_CL_64) else()
set(CPACK_SYSTEM_NAME win32-x86) set(CPACK_SYSTEM_NAME win32-x86)
endif(CMAKE_CL_64) endif()
endif(${CPACK_SYSTEM_NAME} MATCHES Windows) endif()
if(NOT DEFINED CPACK_PACKAGE_FILE_NAME) if(NOT DEFINED CPACK_PACKAGE_FILE_NAME)
# if the CPACK_PACKAGE_FILE_NAME is not defined by the cache # if the CPACK_PACKAGE_FILE_NAME is not defined by the cache
...@@ -74,11 +74,11 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") ...@@ -74,11 +74,11 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
# needed # needed
if(CYGWIN) if(CYGWIN)
set(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}") set(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}")
else(CYGWIN) else()
set(CPACK_PACKAGE_FILE_NAME set(CPACK_PACKAGE_FILE_NAME
"${CPACK_SOURCE_PACKAGE_FILE_NAME}-${CPACK_SYSTEM_NAME}") "${CPACK_SOURCE_PACKAGE_FILE_NAME}-${CPACK_SYSTEM_NAME}")
endif(CYGWIN) endif()
endif(NOT DEFINED CPACK_PACKAGE_FILE_NAME) endif()
set(CPACK_PACKAGE_CONTACT "cmake@cmake.org") set(CPACK_PACKAGE_CONTACT "cmake@cmake.org")
...@@ -86,7 +86,7 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") ...@@ -86,7 +86,7 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
set(CPACK_STRIP_FILES "bin/ccmake;bin/cmake;bin/cpack;bin/ctest") set(CPACK_STRIP_FILES "bin/ccmake;bin/cmake;bin/cpack;bin/ctest")
set(CPACK_SOURCE_STRIP_FILES "") set(CPACK_SOURCE_STRIP_FILES "")
set(CPACK_PACKAGE_EXECUTABLES "ccmake" "CMake") set(CPACK_PACKAGE_EXECUTABLES "ccmake" "CMake")
endif(UNIX) endif()
# cygwin specific packaging stuff # cygwin specific packaging stuff
if(CYGWIN) if(CYGWIN)
...@@ -110,7 +110,7 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") ...@@ -110,7 +110,7 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
# configures some files and adds some install targets # configures some files and adds some install targets
# this file uses some of the package file name variables # this file uses some of the package file name variables
include(Utilities/Release/Cygwin/CMakeLists.txt) include(Utilities/Release/Cygwin/CMakeLists.txt)
endif(CYGWIN) endif()
# Set the options file that needs to be included inside CMakeCPackOptions.cmake # Set the options file that needs to be included inside CMakeCPackOptions.cmake
set(QT_DIALOG_CPACK_OPTIONS_FILE ${CMake_BINARY_DIR}/Source/QtDialog/QtDialogCPack.cmake) set(QT_DIALOG_CPACK_OPTIONS_FILE ${CMake_BINARY_DIR}/Source/QtDialog/QtDialogCPack.cmake)
...@@ -120,4 +120,4 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") ...@@ -120,4 +120,4 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
# include CPack model once all variables are set # include CPack model once all variables are set
include(CPack) include(CPack)
endif(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") endif()
...@@ -32,7 +32,7 @@ if(CPACK_GENERATOR MATCHES "NSIS") ...@@ -32,7 +32,7 @@ if(CPACK_GENERATOR MATCHES "NSIS")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.kitware.com") set(CPACK_NSIS_URL_INFO_ABOUT "http://www.kitware.com")
set(CPACK_NSIS_CONTACT @CPACK_PACKAGE_CONTACT@) set(CPACK_NSIS_CONTACT @CPACK_PACKAGE_CONTACT@)
set(CPACK_NSIS_MODIFY_PATH ON) set(CPACK_NSIS_MODIFY_PATH ON)
endif(CPACK_GENERATOR MATCHES "NSIS") endif()
# include the cpack options for qt dialog if they exisit # include the cpack options for qt dialog if they exisit
# they might not if qt was not enabled for the build # they might not if qt was not enabled for the build
...@@ -42,12 +42,12 @@ if(CPACK_GENERATOR MATCHES "CygwinSource") ...@@ -42,12 +42,12 @@ if(CPACK_GENERATOR MATCHES "CygwinSource")
# when packaging source make sure the .build directory is not included # when packaging source make sure the .build directory is not included
set(CPACK_SOURCE_IGNORE_FILES set(CPACK_SOURCE_IGNORE_FILES
"/CVS/" "/\\.build/" "/\\.svn/" "\\.swp$" "\\.#" "/#" "~$") "/CVS/" "/\\.build/" "/\\.svn/" "\\.swp$" "\\.#" "/#" "~$")
endif(CPACK_GENERATOR MATCHES "CygwinSource") endif()
if("${CPACK_GENERATOR}" STREQUAL "PackageMaker") if("${CPACK_GENERATOR}" STREQUAL "PackageMaker")
if(CMAKE_PACKAGE_QTGUI) if(CMAKE_PACKAGE_QTGUI)
set(CPACK_PACKAGE_DEFAULT_LOCATION "/Applications") set(CPACK_PACKAGE_DEFAULT_LOCATION "/Applications")
else(CMAKE_PACKAGE_QTGUI) else()
set(CPACK_PACKAGE_DEFAULT_LOCATION "/usr") set(CPACK_PACKAGE_DEFAULT_LOCATION "/usr")
endif(CMAKE_PACKAGE_QTGUI) endif()
endif("${CPACK_GENERATOR}" STREQUAL "PackageMaker") endif()
...@@ -67,7 +67,7 @@ macro(CMAKE_HANDLE_SYSTEM_LIBRARIES) ...@@ -67,7 +67,7 @@ macro(CMAKE_HANDLE_SYSTEM_LIBRARIES)
else() else()
set(CMAKE_USE_SYSTEM_LIBRARY_${util} OFF) set(CMAKE_USE_SYSTEM_LIBRARY_${util} OFF)
endif() endif()
endforeach(util) endforeach()
if(CMAKE_BOOTSTRAP) if(CMAKE_BOOTSTRAP)
unset(CMAKE_USE_SYSTEM_LIBRARIES CACHE) unset(CMAKE_USE_SYSTEM_LIBRARIES CACHE)
endif() endif()
...@@ -87,15 +87,15 @@ macro(CMAKE_HANDLE_SYSTEM_LIBRARIES) ...@@ -87,15 +87,15 @@ macro(CMAKE_HANDLE_SYSTEM_LIBRARIES)
foreach(util ${UTILITIES}) foreach(util ${UTILITIES})
if(CMAKE_USE_SYSTEM_${util}) if(CMAKE_USE_SYSTEM_${util})
message(STATUS "Using system-installed ${util}") message(STATUS "Using system-installed ${util}")
endif(CMAKE_USE_SYSTEM_${util}) endif()
endforeach(util) endforeach()
# Inform utility library header wrappers whether to use system versions. # Inform utility library header wrappers whether to use system versions.
configure_file(${CMake_SOURCE_DIR}/Utilities/cmThirdParty.h.in configure_file(${CMake_SOURCE_DIR}/Utilities/cmThirdParty.h.in
${CMake_BINARY_DIR}/Utilities/cmThirdParty.h ${CMake_BINARY_DIR}/Utilities/cmThirdParty.h
@ONLY) @ONLY)
endmacro(CMAKE_HANDLE_SYSTEM_LIBRARIES) endmacro()
...@@ -103,7 +103,7 @@ endmacro(CMAKE_HANDLE_SYSTEM_LIBRARIES) ...@@ -103,7 +103,7 @@ endmacro(CMAKE_HANDLE_SYSTEM_LIBRARIES)
set(CMAKE_BUILD_ON_VISUAL_STUDIO 0) set(CMAKE_BUILD_ON_VISUAL_STUDIO 0)
if(WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW ) if(WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW )
set(CMAKE_BUILD_ON_VISUAL_STUDIO 1) set(CMAKE_BUILD_ON_VISUAL_STUDIO 1)
endif(WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW ) endif()
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
...@@ -113,7 +113,7 @@ endif(WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW ) ...@@ -113,7 +113,7 @@ endif(WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW )
macro(CMAKE_SETUP_TESTING) macro(CMAKE_SETUP_TESTING)
if (NOT DART_ROOT) if (NOT DART_ROOT)
set(MAKEPROGRAM ${CMAKE_MAKE_PROGRAM}) set(MAKEPROGRAM ${CMAKE_MAKE_PROGRAM})
endif (NOT DART_ROOT) endif ()
if(BUILD_TESTING) if(BUILD_TESTING)
set(CMAKE_TEST_GENERATOR "" CACHE STRING set(CMAKE_TEST_GENERATOR "" CACHE STRING
...@@ -123,28 +123,28 @@ macro(CMAKE_SETUP_TESTING) ...@@ -123,28 +123,28 @@ macro(CMAKE_SETUP_TESTING)
if(NOT CMAKE_TEST_GENERATOR) if(NOT CMAKE_TEST_GENERATOR)
set(CMAKE_TEST_GENERATOR "${CMAKE_GENERATOR}") set(CMAKE_TEST_GENERATOR "${CMAKE_GENERATOR}")
set(CMAKE_TEST_MAKEPROGRAM "${MAKEPROGRAM}") set(CMAKE_TEST_MAKEPROGRAM "${MAKEPROGRAM}")
else(NOT CMAKE_TEST_GENERATOR) else()
set(CMAKE_TEST_DIFFERENT_GENERATOR TRUE) set(CMAKE_TEST_DIFFERENT_GENERATOR TRUE)
endif(NOT CMAKE_TEST_GENERATOR) endif()
# Are we testing with the MSVC compiler? # Are we testing with the MSVC compiler?
set(CMAKE_TEST_MSVC 0) set(CMAKE_TEST_MSVC 0)
if(MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR) if(MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR)
set(CMAKE_TEST_MSVC 1) set(CMAKE_TEST_MSVC 1)
else(MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR) else()
if("${CMAKE_TEST_GENERATOR}" MATCHES "NMake" OR if("${CMAKE_TEST_GENERATOR}" MATCHES "NMake" OR
"${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio") "${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio")
set(CMAKE_TEST_MSVC 1) set(CMAKE_TEST_MSVC 1)
endif("${CMAKE_TEST_GENERATOR}" MATCHES "NMake" OR endif("${CMAKE_TEST_GENERATOR}" MATCHES "NMake" OR
"${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio") "${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio")
endif(MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR) endif()
set(CMAKE_TEST_SYSTEM_LIBRARIES 0) set(CMAKE_TEST_SYSTEM_LIBRARIES 0)
foreach(util CURL EXPAT XMLRPC ZLIB) foreach(util CURL EXPAT XMLRPC ZLIB)
if(CMAKE_USE_SYSTEM_${util}) if(CMAKE_USE_SYSTEM_${util})
set(CMAKE_TEST_SYSTEM_LIBRARIES 1) set(CMAKE_TEST_SYSTEM_LIBRARIES 1)
endif(CMAKE_USE_SYSTEM_${util}) endif()
endforeach(util) endforeach()
# This variable is set by cmake, however to # This variable is set by cmake, however to
# test cmake we want to make sure that # test cmake we want to make sure that
...@@ -154,7 +154,7 @@ macro(CMAKE_SETUP_TESTING) ...@@ -154,7 +154,7 @@ macro(CMAKE_SETUP_TESTING)
set(CMAKE_CTEST_COMMAND "${CMake_BIN_DIR}/ctest") set(CMAKE_CTEST_COMMAND "${CMake_BIN_DIR}/ctest")
set(CMAKE_CMAKE_COMMAND "${CMake_BIN_DIR}/cmake") set(CMAKE_CMAKE_COMMAND "${CMake_BIN_DIR}/cmake")
set(CMAKE_CPACK_COMMAND "${CMake_BIN_DIR}/cpack") set(CMAKE_CPACK_COMMAND "${CMake_BIN_DIR}/cpack")
endif(BUILD_TESTING) endif()
# configure some files for testing # configure some files for testing
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Templates/CTestScript.cmake.in" configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Templates/CTestScript.cmake.in"
...@@ -171,10 +171,10 @@ macro(CMAKE_SETUP_TESTING) ...@@ -171,10 +171,10 @@ macro(CMAKE_SETUP_TESTING)
if(BUILD_TESTING AND DART_ROOT) if(BUILD_TESTING AND DART_ROOT)
configure_file(${CMake_SOURCE_DIR}/CMakeLogo.gif configure_file(${CMake_SOURCE_DIR}/CMakeLogo.gif
${CMake_BINARY_DIR}/Testing/HTML/TestingResults/Icons/Logo.gif COPYONLY) ${CMake_BINARY_DIR}/Testing/HTML/TestingResults/Icons/Logo.gif COPYONLY)
endif(BUILD_TESTING AND DART_ROOT) endif()
mark_as_advanced(DART_ROOT) mark_as_advanced(DART_ROOT)
mark_as_advanced(CURL_TESTING) mark_as_advanced(CURL_TESTING)
endmacro(CMAKE_SETUP_TESTING) endmacro()
# Provide a way for Visual Studio Express users to turn OFF the new FOLDER # Provide a way for Visual Studio Express users to turn OFF the new FOLDER
...@@ -205,7 +205,7 @@ macro(CMAKE_SET_TARGET_FOLDER tgt folder) ...@@ -205,7 +205,7 @@ macro(CMAKE_SET_TARGET_FOLDER tgt folder)
else() else()
set_property(GLOBAL PROPERTY USE_FOLDERS OFF) set_property(GLOBAL PROPERTY USE_FOLDERS OFF)
endif() endif()
endmacro(CMAKE_SET_TARGET_FOLDER) endmacro()
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
...@@ -266,15 +266,15 @@ macro (CMAKE_BUILD_UTILITIES) ...@@ -266,15 +266,15 @@ macro (CMAKE_BUILD_UTILITIES)
if(NOT ZLIB_FOUND) if(NOT ZLIB_FOUND)
message(FATAL_ERROR message(FATAL_ERROR
"CMAKE_USE_SYSTEM_ZLIB is ON but a zlib is not found!") "CMAKE_USE_SYSTEM_ZLIB is ON but a zlib is not found!")
endif(NOT ZLIB_FOUND) endif()
set(CMAKE_ZLIB_INCLUDES ${ZLIB_INCLUDE_DIR}) set(CMAKE_ZLIB_INCLUDES ${ZLIB_INCLUDE_DIR})
set(CMAKE_ZLIB_LIBRARIES ${ZLIB_LIBRARIES}) set(CMAKE_ZLIB_LIBRARIES ${ZLIB_LIBRARIES})
else(CMAKE_USE_SYSTEM_ZLIB) else()
set(CMAKE_ZLIB_INCLUDES ${CMake_SOURCE_DIR}/Utilities) set(CMAKE_ZLIB_INCLUDES ${CMake_SOURCE_DIR}/Utilities)
set(CMAKE_ZLIB_LIBRARIES cmzlib) set(CMAKE_ZLIB_LIBRARIES cmzlib)
add_subdirectory(Utilities/cmzlib) add_subdirectory(Utilities/cmzlib)
CMAKE_SET_TARGET_FOLDER(cmzlib "Utilities/3rdParty") CMAKE_SET_TARGET_FOLDER(cmzlib "Utilities/3rdParty")
endif(CMAKE_USE_SYSTEM_ZLIB) endif()
#--------------------------------------------------------------------- #---------------------------------------------------------------------
# Build Curl library for CTest. # Build Curl library for CTest.
...@@ -283,26 +283,26 @@ macro (CMAKE_BUILD_UTILITIES) ...@@ -283,26 +283,26 @@ macro (CMAKE_BUILD_UTILITIES)
if(NOT CURL_FOUND) if(NOT CURL_FOUND)
message(FATAL_ERROR message(FATAL_ERROR
"CMAKE_USE_SYSTEM_CURL is ON but a curl is not found!") "CMAKE_USE_SYSTEM_CURL is ON but a curl is not found!")
endif(NOT CURL_FOUND) endif()
set(CMAKE_CURL_INCLUDES ${CURL_INCLUDE_DIRS}) set(CMAKE_CURL_INCLUDES ${CURL_INCLUDE_DIRS})
set(CMAKE_CURL_LIBRARIES ${CURL_LIBRARIES}) set(CMAKE_CURL_LIBRARIES ${CURL_LIBRARIES})
else(CMAKE_USE_SYSTEM_CURL) else()
set(CURL_SPECIAL_ZLIB_H ${CMAKE_ZLIB_HEADER}) set(CURL_SPECIAL_ZLIB_H ${CMAKE_ZLIB_HEADER})
set(CURL_SPECIAL_LIBZ_INCLUDES ${CMAKE_ZLIB_INCLUDES}) set(CURL_SPECIAL_LIBZ_INCLUDES ${CMAKE_ZLIB_INCLUDES})
set(CURL_SPECIAL_LIBZ ${CMAKE_ZLIB_LIBRARIES}) set(CURL_SPECIAL_LIBZ ${CMAKE_ZLIB_LIBRARIES})
option(CMAKE_BUILD_CURL_SHARED "Should curl be built shared" FALSE) option(CMAKE_BUILD_CURL_SHARED "Should curl be built shared" FALSE)
if(NOT CMAKE_BUILD_CURL_SHARED) if(NOT CMAKE_BUILD_CURL_SHARED)
add_definitions(-DCURL_STATICLIB) add_definitions(-DCURL_STATICLIB)
endif(NOT CMAKE_BUILD_CURL_SHARED) endif()
set(CMAKE_CURL_INCLUDES) set(CMAKE_CURL_INCLUDES)
set(CMAKE_CURL_LIBRARIES cmcurl) set(CMAKE_CURL_LIBRARIES cmcurl)
if(CMAKE_TESTS_CDASH_SERVER) if(CMAKE_TESTS_CDASH_SERVER)
set(CMAKE_CURL_TEST_URL "${CMAKE_TESTS_CDASH_SERVER}/user.php") set(CMAKE_CURL_TEST_URL "${CMAKE_TESTS_CDASH_SERVER}/user.php")
endif(CMAKE_TESTS_CDASH_SERVER) endif()
add_subdirectory(Utilities/cmcurl) add_subdirectory(Utilities/cmcurl)
CMAKE_SET_TARGET_FOLDER(cmcurl "Utilities/3rdParty") CMAKE_SET_TARGET_FOLDER(cmcurl "Utilities/3rdParty")
CMAKE_SET_TARGET_FOLDER(LIBCURL "Utilities/3rdParty") CMAKE_SET_TARGET_FOLDER(LIBCURL "Utilities/3rdParty")
endif(CMAKE_USE_SYSTEM_CURL) endif()
#--------------------------------------------------------------------- #---------------------------------------------------------------------
# Build Compress library for CTest. # Build Compress library for CTest.
...@@ -334,7 +334,7 @@ macro (CMAKE_BUILD_UTILITIES) ...@@ -334,7 +334,7 @@ macro (CMAKE_BUILD_UTILITIES)
endif() endif()
set(CMAKE_TAR_INCLUDES ${LibArchive_INCLUDE_DIRS}) set(CMAKE_TAR_INCLUDES ${LibArchive_INCLUDE_DIRS})
set(CMAKE_TAR_LIBRARIES ${LibArchive_LIBRARIES}) set(CMAKE_TAR_LIBRARIES ${LibArchive_LIBRARIES})
else(CMAKE_USE_SYSTEM_LIBARCHIVE) else()
set(ZLIB_INCLUDE_DIR ${CMAKE_ZLIB_INCLUDES}) set(ZLIB_INCLUDE_DIR ${CMAKE_ZLIB_INCLUDES})
set(ZLIB_LIBRARY ${CMAKE_ZLIB_LIBRARIES}) set(ZLIB_LIBRARY ${CMAKE_ZLIB_LIBRARIES})
add_definitions(-DLIBARCHIVE_STATIC) add_definitions(-DLIBARCHIVE_STATIC)
...@@ -346,7 +346,7 @@ macro (CMAKE_BUILD_UTILITIES) ...@@ -346,7 +346,7 @@ macro (CMAKE_BUILD_UTILITIES)
add_subdirectory(Utilities/cmlibarchive) add_subdirectory(Utilities/cmlibarchive)
CMAKE_SET_TARGET_FOLDER(cmlibarchive "Utilities/3rdParty") CMAKE_SET_TARGET_FOLDER(cmlibarchive "Utilities/3rdParty")
set(CMAKE_TAR_LIBRARIES cmlibarchive ${BZIP2_LIBRARIES}) set(CMAKE_TAR_LIBRARIES cmlibarchive ${BZIP2_LIBRARIES})
endif(CMAKE_USE_SYSTEM_LIBARCHIVE) endif()
#--------------------------------------------------------------------- #---------------------------------------------------------------------
# Build expat library for CMake and CTest. # Build expat library for CMake and CTest.
...@@ -355,15 +355,15 @@ macro (CMAKE_BUILD_UTILITIES) ...@@ -355,15 +355,15 @@ macro (CMAKE_BUILD_UTILITIES)
if(NOT EXPAT_FOUND) if(NOT EXPAT_FOUND)
message(FATAL_ERROR message(FATAL_ERROR
"CMAKE_USE_SYSTEM_EXPAT is ON but a expat is not found!") "CMAKE_USE_SYSTEM_EXPAT is ON but a expat is not found!")
endif(NOT EXPAT_FOUND) endif()
set(CMAKE_EXPAT_INCLUDES ${EXPAT_INCLUDE_DIRS}) set(CMAKE_EXPAT_INCLUDES ${EXPAT_INCLUDE_DIRS})
set(CMAKE_EXPAT_LIBRARIES ${EXPAT_LIBRARIES}) set(CMAKE_EXPAT_LIBRARIES ${EXPAT_LIBRARIES})
else(CMAKE_USE_SYSTEM_EXPAT) else()
set(CMAKE_EXPAT_INCLUDES) set(CMAKE_EXPAT_INCLUDES)
set(CMAKE_EXPAT_LIBRARIES cmexpat) set(CMAKE_EXPAT_LIBRARIES cmexpat)
add_subdirectory(Utilities/cmexpat) add_subdirectory(Utilities/cmexpat)
CMAKE_SET_TARGET_FOLDER(cmexpat "Utilities/3rdParty") CMAKE_SET_TARGET_FOLDER(cmexpat "Utilities/3rdParty")
endif(CMAKE_USE_SYSTEM_EXPAT) endif()
#--------------------------------------------------------------------- #---------------------------------------------------------------------
# Build XMLRPC library for CMake and CTest. # Build XMLRPC library for CMake and CTest.
...@@ -372,10 +372,10 @@ macro (CMAKE_BUILD_UTILITIES) ...@@ -372,10 +372,10 @@ macro (CMAKE_BUILD_UTILITIES)
if(NOT XMLRPC_FOUND) if(NOT XMLRPC_FOUND)
message(FATAL_ERROR message(FATAL_ERROR
"CTEST_USE_XMLRPC is ON but xmlrpc is not found!") "CTEST_USE_XMLRPC is ON but xmlrpc is not found!")
endif(NOT XMLRPC_FOUND) endif()
set(CMAKE_XMLRPC_INCLUDES ${XMLRPC_INCLUDE_DIRS}) set(CMAKE_XMLRPC_INCLUDES ${XMLRPC_INCLUDE_DIRS})
set(CMAKE_XMLRPC_LIBRARIES ${XMLRPC_LIBRARIES}) set(CMAKE_XMLRPC_LIBRARIES ${XMLRPC_LIBRARIES})
endif(CTEST_USE_XMLRPC) endif()
#--------------------------------------------------------------------- #---------------------------------------------------------------------
# Use curses? # Use curses?
...@@ -386,20 +386,20 @@ macro (CMAKE_BUILD_UTILITIES) ...@@ -386,20 +386,20 @@ macro (CMAKE_BUILD_UTILITIES)
find_package(Curses QUIET) find_package(Curses QUIET)
if (CURSES_LIBRARY) if (CURSES_LIBRARY)
option(BUILD_CursesDialog "Build the CMake Curses Dialog ccmake" ON) option(BUILD_CursesDialog "Build the CMake Curses Dialog ccmake" ON)
else (CURSES_LIBRARY) else ()
message("Curses libraries were not found. Curses GUI for CMake will not be built.") message("Curses libraries were not found. Curses GUI for CMake will not be built.")
set(BUILD_CursesDialog 0) set(BUILD_CursesDialog 0)
endif (CURSES_LIBRARY) endif ()
else(NOT "${CMAKE_SYSTEM_NAME}" MATCHES syllable) else()
set(BUILD_CursesDialog 0) set(BUILD_CursesDialog 0)
endif(NOT "${CMAKE_SYSTEM_NAME}" MATCHES syllable) endif()
else (UNIX) else ()
set(BUILD_CursesDialog 0) set(BUILD_CursesDialog 0)
endif (UNIX) endif ()
if(BUILD_CursesDialog) if(BUILD_CursesDialog)
add_subdirectory(Source/CursesDialog/form) add_subdirectory(Source/CursesDialog/form)
endif(BUILD_CursesDialog) endif()
endmacro (CMAKE_BUILD_UTILITIES) endmacro ()
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
if(CMAKE_CXX_PLATFORM_ID MATCHES "OpenBSD") if(CMAKE_CXX_PLATFORM_ID MATCHES "OpenBSD")
...@@ -509,7 +509,7 @@ CHECK_SYMBOL_EXISTS(environ "stdlib.h" HAVE_ENVIRON_NOT_REQUIRE_PROTOTYPE) ...@@ -509,7 +509,7 @@ CHECK_SYMBOL_EXISTS(environ "stdlib.h" HAVE_ENVIRON_NOT_REQUIRE_PROTOTYPE)
# #
if("x${CMAKE_TESTS_CDASH_SERVER}" STREQUAL "x") if("x${CMAKE_TESTS_CDASH_SERVER}" STREQUAL "x")
set(CMAKE_TESTS_CDASH_SERVER "http://www.cdash.org/CDash") set(CMAKE_TESTS_CDASH_SERVER "http://www.cdash.org/CDash")
endif("x${CMAKE_TESTS_CDASH_SERVER}" STREQUAL "x") endif()
# build the utilities (a macro defined in this file) # build the utilities (a macro defined in this file)
CMAKE_BUILD_UTILITIES() CMAKE_BUILD_UTILITIES()
...@@ -524,8 +524,8 @@ if(BUILD_CursesDialog) ...@@ -524,8 +524,8 @@ if(BUILD_CursesDialog)
set(CURSES_NEED_RPATH FALSE) set(CURSES_NEED_RPATH FALSE)
if(NOT "${_CURSES_DIR}" STREQUAL "/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/lib64" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib64") if(NOT "${_CURSES_DIR}" STREQUAL "/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/lib64" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib64")
set(CURSES_NEED_RPATH TRUE) set(CURSES_NEED_RPATH TRUE)
endif(NOT "${_CURSES_DIR}" STREQUAL "/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/lib64" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib64") endif()
endif(BUILD_CursesDialog) endif()
if(BUILD_QtDialog) if(BUILD_QtDialog)
if(APPLE) if(APPLE)
...@@ -538,16 +538,16 @@ if(BUILD_QtDialog) ...@@ -538,16 +538,16 @@ if(BUILD_QtDialog)
string(SUBSTRING "${CMAKE_INSTALL_PREFIX}" ${LEN} 1 ENDCH) string(SUBSTRING "${CMAKE_INSTALL_PREFIX}" ${LEN} 1 ENDCH)
if(NOT "${ENDCH}" STREQUAL "/") if(NOT "${ENDCH}" STREQUAL "/")
set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/") set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/")
endif(NOT "${ENDCH}" STREQUAL "/") endif()
set(CMAKE_INSTALL_PREFIX set(CMAKE_INSTALL_PREFIX
"${CMAKE_INSTALL_PREFIX}${CMAKE_BUNDLE_NAME}.app/Contents") "${CMAKE_INSTALL_PREFIX}${CMAKE_BUNDLE_NAME}.app/Contents")
endif(APPLE) endif()
set(QT_NEED_RPATH FALSE) set(QT_NEED_RPATH FALSE)
if(NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib64" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib64") if(NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib64" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib64")
set(QT_NEED_RPATH TRUE) set(QT_NEED_RPATH TRUE)
endif(NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib64" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib64") endif()
endif(BUILD_QtDialog) endif()
# The same might be true on other systems for other libraries. # The same might be true on other systems for other libraries.
...@@ -563,7 +563,7 @@ if (UNIX) ...@@ -563,7 +563,7 @@ if (UNIX)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
endif(CMAKE_USE_SYSTEM_CURL OR CMAKE_USE_SYSTEM_ZLIB 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) OR CMAKE_USE_SYSTEM_EXPAT OR CTEST_USE_XMLRPC OR CURSES_NEED_RPATH OR QT_NEED_RPATH)
endif (UNIX) endif ()
# add the uninstall support # add the uninstall support
......
...@@ -61,14 +61,14 @@ if(NOT "@CMAKE_GENERATOR@" MATCHES "Xcode") ...@@ -61,14 +61,14 @@ if(NOT "@CMAKE_GENERATOR@" MATCHES "Xcode")
${CTEST_CUSTOM_COVERAGE_EXCLUDE} ${CTEST_CUSTOM_COVERAGE_EXCLUDE}
"XCode" "XCode"
) )
endif (NOT "@CMAKE_GENERATOR@" MATCHES "Xcode") endif ()
if(NOT "@CMAKE_GENERATOR@" MATCHES "KDevelop") if(NOT "@CMAKE_GENERATOR@" MATCHES "KDevelop")
set(CTEST_CUSTOM_COVERAGE_EXCLUDE set(CTEST_CUSTOM_COVERAGE_EXCLUDE
${CTEST_CUSTOM_COVERAGE_EXCLUDE} ${CTEST_CUSTOM_COVERAGE_EXCLUDE}
"Kdevelop" "Kdevelop"
) )
endif (NOT "@CMAKE_GENERATOR@" MATCHES "KDevelop") endif ()
set(CTEST_CUSTOM_COVERAGE_EXCLUDE set(CTEST_CUSTOM_COVERAGE_EXCLUDE
${CTEST_CUSTOM_COVERAGE_EXCLUDE} ${CTEST_CUSTOM_COVERAGE_EXCLUDE}
......
...@@ -15,10 +15,10 @@ ...@@ -15,10 +15,10 @@
# #
if(CMAKE_GENERATOR MATCHES "Visual Studio 7") if(CMAKE_GENERATOR MATCHES "Visual Studio 7")
set(CMAKE_SKIP_COMPATIBILITY_TESTS 1) set(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
endif(CMAKE_GENERATOR MATCHES "Visual Studio 7") endif()
if(CMAKE_GENERATOR MATCHES "Visual Studio 6") if(CMAKE_GENERATOR MATCHES "Visual Studio 6")
set(CMAKE_SKIP_COMPATIBILITY_TESTS 1) set(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
endif(CMAKE_GENERATOR MATCHES "Visual Studio 6") endif()
include (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityCXX.cmake) include (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityCXX.cmake)
if(WIN32 AND "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$") if(WIN32 AND "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$")
...@@ -38,27 +38,27 @@ endif() ...@@ -38,27 +38,27 @@ endif()
if(CMAKE_SYSTEM MATCHES "AIX.*") if(CMAKE_SYSTEM MATCHES "AIX.*")
if(NOT CMAKE_COMPILER_IS_GNUCXX) if(NOT CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -bhalt:5 ") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -bhalt:5 ")
endif(NOT CMAKE_COMPILER_IS_GNUCXX) endif()
endif(CMAKE_SYSTEM MATCHES "AIX.*") endif()
if(CMAKE_SYSTEM MATCHES "IRIX.*") if(CMAKE_SYSTEM MATCHES "IRIX.*")
if(NOT CMAKE_COMPILER_IS_GNUCXX) if(NOT CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-woff84 -no_auto_include") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-woff84 -no_auto_include")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-woff15") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-woff15")
endif(NOT CMAKE_COMPILER_IS_GNUCXX) endif()