diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake
index 7a36d5d35..480fc6264 100644
--- a/CMakeCPack.cmake
+++ b/CMakeCPack.cmake
@@ -23,7 +23,7 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
endif()
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_VENDOR "Kitware")
@@ -56,17 +56,17 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
# cygwin is good for the system name
if("${CMAKE_SYSTEM_NAME}" STREQUAL "CYGWIN")
set(CPACK_SYSTEM_NAME Cygwin)
- else("${CMAKE_SYSTEM_NAME}" STREQUAL "CYGWIN")
+ else()
set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
- endif("${CMAKE_SYSTEM_NAME}" STREQUAL "CYGWIN")
- endif(NOT DEFINED CPACK_SYSTEM_NAME)
+ endif()
+ endif()
if(${CPACK_SYSTEM_NAME} MATCHES Windows)
if(CMAKE_CL_64)
set(CPACK_SYSTEM_NAME win64-x64)
- else(CMAKE_CL_64)
+ else()
set(CPACK_SYSTEM_NAME win32-x86)
- endif(CMAKE_CL_64)
- endif(${CPACK_SYSTEM_NAME} MATCHES Windows)
+ endif()
+ endif()
if(NOT DEFINED CPACK_PACKAGE_FILE_NAME)
# if the CPACK_PACKAGE_FILE_NAME is not defined by the cache
@@ -74,11 +74,11 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
# needed
if(CYGWIN)
set(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}")
- else(CYGWIN)
+ else()
set(CPACK_PACKAGE_FILE_NAME
"${CPACK_SOURCE_PACKAGE_FILE_NAME}-${CPACK_SYSTEM_NAME}")
- endif(CYGWIN)
- endif(NOT DEFINED CPACK_PACKAGE_FILE_NAME)
+ endif()
+ endif()
set(CPACK_PACKAGE_CONTACT "cmake@cmake.org")
@@ -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_SOURCE_STRIP_FILES "")
set(CPACK_PACKAGE_EXECUTABLES "ccmake" "CMake")
- endif(UNIX)
+ endif()
# cygwin specific packaging stuff
if(CYGWIN)
@@ -110,7 +110,7 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
# configures some files and adds some install targets
# this file uses some of the package file name variables
include(Utilities/Release/Cygwin/CMakeLists.txt)
- endif(CYGWIN)
+ endif()
# 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)
@@ -120,4 +120,4 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
# include CPack model once all variables are set
include(CPack)
-endif(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
+endif()
diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in
index 868331f14..3a72eaa5c 100644
--- a/CMakeCPackOptions.cmake.in
+++ b/CMakeCPackOptions.cmake.in
@@ -32,7 +32,7 @@ if(CPACK_GENERATOR MATCHES "NSIS")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.kitware.com")
set(CPACK_NSIS_CONTACT @CPACK_PACKAGE_CONTACT@)
set(CPACK_NSIS_MODIFY_PATH ON)
-endif(CPACK_GENERATOR MATCHES "NSIS")
+endif()
# include the cpack options for qt dialog if they exisit
# they might not if qt was not enabled for the build
@@ -42,12 +42,12 @@ if(CPACK_GENERATOR MATCHES "CygwinSource")
# when packaging source make sure the .build directory is not included
set(CPACK_SOURCE_IGNORE_FILES
"/CVS/" "/\\.build/" "/\\.svn/" "\\.swp$" "\\.#" "/#" "~$")
-endif(CPACK_GENERATOR MATCHES "CygwinSource")
+endif()
if("${CPACK_GENERATOR}" STREQUAL "PackageMaker")
if(CMAKE_PACKAGE_QTGUI)
set(CPACK_PACKAGE_DEFAULT_LOCATION "/Applications")
- else(CMAKE_PACKAGE_QTGUI)
+ else()
set(CPACK_PACKAGE_DEFAULT_LOCATION "/usr")
- endif(CMAKE_PACKAGE_QTGUI)
-endif("${CPACK_GENERATOR}" STREQUAL "PackageMaker")
+ endif()
+endif()
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0beed6267..f0789a30b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -67,7 +67,7 @@ macro(CMAKE_HANDLE_SYSTEM_LIBRARIES)
else()
set(CMAKE_USE_SYSTEM_LIBRARY_${util} OFF)
endif()
- endforeach(util)
+ endforeach()
if(CMAKE_BOOTSTRAP)
unset(CMAKE_USE_SYSTEM_LIBRARIES CACHE)
endif()
@@ -87,15 +87,15 @@ macro(CMAKE_HANDLE_SYSTEM_LIBRARIES)
foreach(util ${UTILITIES})
if(CMAKE_USE_SYSTEM_${util})
message(STATUS "Using system-installed ${util}")
- endif(CMAKE_USE_SYSTEM_${util})
- endforeach(util)
+ endif()
+ endforeach()
# Inform utility library header wrappers whether to use system versions.
configure_file(${CMake_SOURCE_DIR}/Utilities/cmThirdParty.h.in
${CMake_BINARY_DIR}/Utilities/cmThirdParty.h
@ONLY)
-endmacro(CMAKE_HANDLE_SYSTEM_LIBRARIES)
+endmacro()
@@ -103,7 +103,7 @@ endmacro(CMAKE_HANDLE_SYSTEM_LIBRARIES)
set(CMAKE_BUILD_ON_VISUAL_STUDIO 0)
if(WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW )
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 )
macro(CMAKE_SETUP_TESTING)
if (NOT DART_ROOT)
set(MAKEPROGRAM ${CMAKE_MAKE_PROGRAM})
- endif (NOT DART_ROOT)
+ endif ()
if(BUILD_TESTING)
set(CMAKE_TEST_GENERATOR "" CACHE STRING
@@ -123,28 +123,28 @@ macro(CMAKE_SETUP_TESTING)
if(NOT CMAKE_TEST_GENERATOR)
set(CMAKE_TEST_GENERATOR "${CMAKE_GENERATOR}")
set(CMAKE_TEST_MAKEPROGRAM "${MAKEPROGRAM}")
- else(NOT CMAKE_TEST_GENERATOR)
+ else()
set(CMAKE_TEST_DIFFERENT_GENERATOR TRUE)
- endif(NOT CMAKE_TEST_GENERATOR)
+ endif()
# Are we testing with the MSVC compiler?
set(CMAKE_TEST_MSVC 0)
if(MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR)
set(CMAKE_TEST_MSVC 1)
- else(MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR)
+ else()
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(MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR)
+ endif()
set(CMAKE_TEST_SYSTEM_LIBRARIES 0)
foreach(util CURL EXPAT XMLRPC ZLIB)
if(CMAKE_USE_SYSTEM_${util})
set(CMAKE_TEST_SYSTEM_LIBRARIES 1)
- endif(CMAKE_USE_SYSTEM_${util})
- endforeach(util)
+ endif()
+ endforeach()
# This variable is set by cmake, however to
# test cmake we want to make sure that
@@ -154,7 +154,7 @@ macro(CMAKE_SETUP_TESTING)
set(CMAKE_CTEST_COMMAND "${CMake_BIN_DIR}/ctest")
set(CMAKE_CMAKE_COMMAND "${CMake_BIN_DIR}/cmake")
set(CMAKE_CPACK_COMMAND "${CMake_BIN_DIR}/cpack")
- endif(BUILD_TESTING)
+ endif()
# configure some files for testing
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Templates/CTestScript.cmake.in"
@@ -171,10 +171,10 @@ macro(CMAKE_SETUP_TESTING)
if(BUILD_TESTING AND DART_ROOT)
configure_file(${CMake_SOURCE_DIR}/CMakeLogo.gif
${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(CURL_TESTING)
-endmacro(CMAKE_SETUP_TESTING)
+endmacro()
# 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)
else()
set_property(GLOBAL PROPERTY USE_FOLDERS OFF)
endif()
-endmacro(CMAKE_SET_TARGET_FOLDER)
+endmacro()
#-----------------------------------------------------------------------
@@ -266,15 +266,15 @@ macro (CMAKE_BUILD_UTILITIES)
if(NOT ZLIB_FOUND)
message(FATAL_ERROR
"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_LIBRARIES ${ZLIB_LIBRARIES})
- else(CMAKE_USE_SYSTEM_ZLIB)
+ else()
set(CMAKE_ZLIB_INCLUDES ${CMake_SOURCE_DIR}/Utilities)
set(CMAKE_ZLIB_LIBRARIES cmzlib)
add_subdirectory(Utilities/cmzlib)
CMAKE_SET_TARGET_FOLDER(cmzlib "Utilities/3rdParty")
- endif(CMAKE_USE_SYSTEM_ZLIB)
+ endif()
#---------------------------------------------------------------------
# Build Curl library for CTest.
@@ -283,26 +283,26 @@ macro (CMAKE_BUILD_UTILITIES)
if(NOT CURL_FOUND)
message(FATAL_ERROR
"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_LIBRARIES ${CURL_LIBRARIES})
- else(CMAKE_USE_SYSTEM_CURL)
+ else()
set(CURL_SPECIAL_ZLIB_H ${CMAKE_ZLIB_HEADER})
set(CURL_SPECIAL_LIBZ_INCLUDES ${CMAKE_ZLIB_INCLUDES})
set(CURL_SPECIAL_LIBZ ${CMAKE_ZLIB_LIBRARIES})
option(CMAKE_BUILD_CURL_SHARED "Should curl be built shared" FALSE)
if(NOT CMAKE_BUILD_CURL_SHARED)
add_definitions(-DCURL_STATICLIB)
- endif(NOT CMAKE_BUILD_CURL_SHARED)
+ endif()
set(CMAKE_CURL_INCLUDES)
set(CMAKE_CURL_LIBRARIES cmcurl)
if(CMAKE_TESTS_CDASH_SERVER)
set(CMAKE_CURL_TEST_URL "${CMAKE_TESTS_CDASH_SERVER}/user.php")
- endif(CMAKE_TESTS_CDASH_SERVER)
+ endif()
add_subdirectory(Utilities/cmcurl)
CMAKE_SET_TARGET_FOLDER(cmcurl "Utilities/3rdParty")
CMAKE_SET_TARGET_FOLDER(LIBCURL "Utilities/3rdParty")
- endif(CMAKE_USE_SYSTEM_CURL)
+ endif()
#---------------------------------------------------------------------
# Build Compress library for CTest.
@@ -334,7 +334,7 @@ macro (CMAKE_BUILD_UTILITIES)
endif()
set(CMAKE_TAR_INCLUDES ${LibArchive_INCLUDE_DIRS})
set(CMAKE_TAR_LIBRARIES ${LibArchive_LIBRARIES})
- else(CMAKE_USE_SYSTEM_LIBARCHIVE)
+ else()
set(ZLIB_INCLUDE_DIR ${CMAKE_ZLIB_INCLUDES})
set(ZLIB_LIBRARY ${CMAKE_ZLIB_LIBRARIES})
add_definitions(-DLIBARCHIVE_STATIC)
@@ -346,7 +346,7 @@ macro (CMAKE_BUILD_UTILITIES)
add_subdirectory(Utilities/cmlibarchive)
CMAKE_SET_TARGET_FOLDER(cmlibarchive "Utilities/3rdParty")
set(CMAKE_TAR_LIBRARIES cmlibarchive ${BZIP2_LIBRARIES})
- endif(CMAKE_USE_SYSTEM_LIBARCHIVE)
+ endif()
#---------------------------------------------------------------------
# Build expat library for CMake and CTest.
@@ -355,15 +355,15 @@ macro (CMAKE_BUILD_UTILITIES)
if(NOT EXPAT_FOUND)
message(FATAL_ERROR
"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_LIBRARIES ${EXPAT_LIBRARIES})
- else(CMAKE_USE_SYSTEM_EXPAT)
+ else()
set(CMAKE_EXPAT_INCLUDES)
set(CMAKE_EXPAT_LIBRARIES cmexpat)
add_subdirectory(Utilities/cmexpat)
CMAKE_SET_TARGET_FOLDER(cmexpat "Utilities/3rdParty")
- endif(CMAKE_USE_SYSTEM_EXPAT)
+ endif()
#---------------------------------------------------------------------
# Build XMLRPC library for CMake and CTest.
@@ -372,10 +372,10 @@ macro (CMAKE_BUILD_UTILITIES)
if(NOT XMLRPC_FOUND)
message(FATAL_ERROR
"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_LIBRARIES ${XMLRPC_LIBRARIES})
- endif(CTEST_USE_XMLRPC)
+ endif()
#---------------------------------------------------------------------
# Use curses?
@@ -386,20 +386,20 @@ macro (CMAKE_BUILD_UTILITIES)
find_package(Curses QUIET)
if (CURSES_LIBRARY)
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.")
set(BUILD_CursesDialog 0)
- endif (CURSES_LIBRARY)
- else(NOT "${CMAKE_SYSTEM_NAME}" MATCHES syllable)
+ endif ()
+ else()
set(BUILD_CursesDialog 0)
- endif(NOT "${CMAKE_SYSTEM_NAME}" MATCHES syllable)
- else (UNIX)
+ endif()
+ else ()
set(BUILD_CursesDialog 0)
- endif (UNIX)
+ endif ()
if(BUILD_CursesDialog)
add_subdirectory(Source/CursesDialog/form)
- endif(BUILD_CursesDialog)
-endmacro (CMAKE_BUILD_UTILITIES)
+ endif()
+endmacro ()
#-----------------------------------------------------------------------
if(CMAKE_CXX_PLATFORM_ID MATCHES "OpenBSD")
@@ -509,7 +509,7 @@ CHECK_SYMBOL_EXISTS(environ "stdlib.h" HAVE_ENVIRON_NOT_REQUIRE_PROTOTYPE)
#
if("x${CMAKE_TESTS_CDASH_SERVER}" STREQUAL "x")
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)
CMAKE_BUILD_UTILITIES()
@@ -524,8 +524,8 @@ if(BUILD_CursesDialog)
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")
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(BUILD_CursesDialog)
+ endif()
+endif()
if(BUILD_QtDialog)
if(APPLE)
@@ -538,16 +538,16 @@ if(BUILD_QtDialog)
string(SUBSTRING "${CMAKE_INSTALL_PREFIX}" ${LEN} 1 ENDCH)
if(NOT "${ENDCH}" STREQUAL "/")
set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/")
- endif(NOT "${ENDCH}" STREQUAL "/")
+ endif()
set(CMAKE_INSTALL_PREFIX
"${CMAKE_INSTALL_PREFIX}${CMAKE_BUNDLE_NAME}.app/Contents")
- endif(APPLE)
+ endif()
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")
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(BUILD_QtDialog)
+ endif()
+endif()
# The same might be true on other systems for other libraries.
@@ -563,7 +563,7 @@ if (UNIX)
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 (UNIX)
+endif ()
# add the uninstall support
diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in
index 52173f3e2..1e6224b4b 100644
--- a/CTestCustom.cmake.in
+++ b/CTestCustom.cmake.in
@@ -61,14 +61,14 @@ if(NOT "@CMAKE_GENERATOR@" MATCHES "Xcode")
${CTEST_CUSTOM_COVERAGE_EXCLUDE}
"XCode"
)
-endif (NOT "@CMAKE_GENERATOR@" MATCHES "Xcode")
+endif ()
if(NOT "@CMAKE_GENERATOR@" MATCHES "KDevelop")
set(CTEST_CUSTOM_COVERAGE_EXCLUDE
${CTEST_CUSTOM_COVERAGE_EXCLUDE}
"Kdevelop"
)
-endif (NOT "@CMAKE_GENERATOR@" MATCHES "KDevelop")
+endif ()
set(CTEST_CUSTOM_COVERAGE_EXCLUDE
${CTEST_CUSTOM_COVERAGE_EXCLUDE}
diff --git a/CompileFlags.cmake b/CompileFlags.cmake
index f144337c3..b2044e441 100644
--- a/CompileFlags.cmake
+++ b/CompileFlags.cmake
@@ -15,10 +15,10 @@
#
if(CMAKE_GENERATOR MATCHES "Visual Studio 7")
set(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
-endif(CMAKE_GENERATOR MATCHES "Visual Studio 7")
+endif()
if(CMAKE_GENERATOR MATCHES "Visual Studio 6")
set(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
-endif(CMAKE_GENERATOR MATCHES "Visual Studio 6")
+endif()
include (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityCXX.cmake)
if(WIN32 AND "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$")
@@ -38,27 +38,27 @@ endif()
if(CMAKE_SYSTEM MATCHES "AIX.*")
if(NOT CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -bhalt:5 ")
- endif(NOT CMAKE_COMPILER_IS_GNUCXX)
-endif(CMAKE_SYSTEM MATCHES "AIX.*")
+ endif()
+endif()
if(CMAKE_SYSTEM MATCHES "IRIX.*")
if(NOT CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-woff84 -no_auto_include")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-woff15")
- endif(NOT CMAKE_COMPILER_IS_GNUCXX)
-endif(CMAKE_SYSTEM MATCHES "IRIX.*")
+ endif()
+endif()
if(CMAKE_SYSTEM MATCHES "OSF1-V.*")
if(NOT CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local -no_implicit_include ")
- endif(NOT CMAKE_COMPILER_IS_GNUCXX)
-endif(CMAKE_SYSTEM MATCHES "OSF1-V.*")
+ endif()
+endif()
# use the ansi CXX compile flag for building cmake
if (CMAKE_ANSI_CXXFLAGS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}")
-endif (CMAKE_ANSI_CXXFLAGS)
+endif ()
if (CMAKE_ANSI_CFLAGS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}")
-endif (CMAKE_ANSI_CFLAGS)
+endif ()
diff --git a/Modules/AddFileDependencies.cmake b/Modules/AddFileDependencies.cmake
index af7f42f53..e88025c14 100644
--- a/Modules/AddFileDependencies.cmake
+++ b/Modules/AddFileDependencies.cmake
@@ -20,10 +20,10 @@ macro(ADD_FILE_DEPENDENCIES _file)
get_source_file_property(_deps ${_file} OBJECT_DEPENDS)
if (_deps)
set(_deps ${_deps} ${ARGN})
- else (_deps)
+ else ()
set(_deps ${ARGN})
- endif (_deps)
+ endif ()
set_source_files_properties(${_file} PROPERTIES OBJECT_DEPENDS "${_deps}")
-endmacro(ADD_FILE_DEPENDENCIES)
+endmacro()
diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake
index 0143d593d..4557be6e0 100644
--- a/Modules/BundleUtilities.cmake
+++ b/Modules/BundleUtilities.cmake
@@ -184,17 +184,17 @@ function(get_bundle_main_executable bundle result_var)
if(line_is_main_executable)
string(REGEX REPLACE "^.*(.*).*$" "\\1" bundle_executable "${line}")
break()
- endif(line_is_main_executable)
+ endif()
if(line MATCHES "^.*CFBundleExecutable.*$")
set(line_is_main_executable 1)
- endif(line MATCHES "^.*CFBundleExecutable.*$")
- endforeach(line)
+ endif()
+ endforeach()
if(NOT "${bundle_executable}" STREQUAL "")
if(EXISTS "${bundle}/Contents/MacOS/${bundle_executable}")
set(result "${bundle}/Contents/MacOS/${bundle_executable}")
- else(EXISTS "${bundle}/Contents/MacOS/${bundle_executable}")
+ else()
# Ultimate goal:
# If not in "Contents/MacOS" then scan the bundle for matching files. If
@@ -207,9 +207,9 @@ function(get_bundle_main_executable bundle result_var)
# for the bundle to be in Contents/MacOS, it's an error if it's not:
#
set(result "error: '${bundle}/Contents/MacOS/${bundle_executable}' does not exist")
- endif(EXISTS "${bundle}/Contents/MacOS/${bundle_executable}")
- endif(NOT "${bundle_executable}" STREQUAL "")
- else(EXISTS "${bundle}/Contents/Info.plist")
+ endif()
+ endif()
+ else()
#
# More inclusive technique... (This one would work on Windows and Linux
# too, if a developer followed the typical Mac bundle naming convention...)
@@ -217,10 +217,10 @@ function(get_bundle_main_executable bundle result_var)
# If there is no Info.plist file, try to find an executable with the same
# base name as the .app directory:
#
- endif(EXISTS "${bundle}/Contents/Info.plist")
+ endif()
set(${result_var} "${result}" PARENT_SCOPE)
-endfunction(get_bundle_main_executable)
+endfunction()
function(get_dotapp_dir exe dotapp_dir_var)
@@ -240,9 +240,9 @@ function(get_dotapp_dir exe dotapp_dir_var)
if(sname MATCHES "\\.app$")
set(done 1)
set(dotapp_dir "${sdir}/${sname}")
- endif(sname MATCHES "\\.app$")
- endwhile(NOT ${done})
- else(s MATCHES "^.*/.*\\.app/.*$")
+ endif()
+ endwhile()
+ else()
# Otherwise use a directory containing the exe
# (typical of a non-bundle executable on Mac, Windows or Linux)
#
@@ -250,14 +250,14 @@ function(get_dotapp_dir exe dotapp_dir_var)
if(is_executable)
get_filename_component(sdir "${s}" PATH)
set(dotapp_dir "${sdir}")
- else(is_executable)
+ else()
set(dotapp_dir "${s}")
- endif(is_executable)
- endif(s MATCHES "^.*/.*\\.app/.*$")
+ endif()
+ endif()
set(${dotapp_dir_var} "${dotapp_dir}" PARENT_SCOPE)
-endfunction(get_dotapp_dir)
+endfunction()
function(get_bundle_and_executable app bundle_var executable_var valid_var)
@@ -273,13 +273,13 @@ function(get_bundle_and_executable app bundle_var executable_var valid_var)
set(${executable_var} "${executable}" PARENT_SCOPE)
set(valid 1)
#message(STATUS "info: handled .app directory case...")
- else(EXISTS "${app}" AND EXISTS "${executable}")
+ else()
message(STATUS "warning: *NOT* handled - .app directory case...")
- endif(EXISTS "${app}" AND EXISTS "${executable}")
- else(app MATCHES "\\.app$")
+ endif()
+ else()
message(STATUS "warning: *NOT* handled - directory but not .app case...")
- endif(app MATCHES "\\.app$")
- else(IS_DIRECTORY "${app}")
+ endif()
+ else()
# Is it an executable file?
is_file_executable("${app}" is_executable)
if(is_executable)
@@ -296,21 +296,21 @@ function(get_bundle_and_executable app bundle_var executable_var valid_var)
set(valid 1)
#message(STATUS "info: handled executable file in any dir case...")
endif()
- else(is_executable)
+ else()
message(STATUS "warning: *NOT* handled - not .app dir, not executable file...")
- endif(is_executable)
- endif(IS_DIRECTORY "${app}")
- else(EXISTS "${app}")
+ endif()
+ endif()
+ else()
message(STATUS "warning: *NOT* handled - directory/file does not exist...")
- endif(EXISTS "${app}")
+ endif()
if(NOT valid)
set(${bundle_var} "error: not a bundle" PARENT_SCOPE)
set(${executable_var} "error: not a bundle" PARENT_SCOPE)
- endif(NOT valid)
+ endif()
set(${valid_var} ${valid} PARENT_SCOPE)
-endfunction(get_bundle_and_executable)
+endfunction()
function(get_bundle_all_executables bundle exes_var)
@@ -321,11 +321,11 @@ function(get_bundle_all_executables bundle exes_var)
is_file_executable("${f}" is_executable)
if(is_executable)
set(exes ${exes} "${f}")
- endif(is_executable)
- endforeach(f)
+ endif()
+ endforeach()
set(${exes_var} "${exes}" PARENT_SCOPE)
-endfunction(get_bundle_all_executables)
+endfunction()
function(get_item_key item key_var)
@@ -335,7 +335,7 @@ function(get_item_key item key_var)
endif()
string(REGEX REPLACE "\\." "_" ${key_var} "${item_name}")
set(${key_var} ${${key_var}} PARENT_SCOPE)
-endfunction(get_item_key)
+endfunction()
function(clear_bundle_keys keys_var)
@@ -346,9 +346,9 @@ function(clear_bundle_keys keys_var)
set(${key}_EMBEDDED_ITEM PARENT_SCOPE)
set(${key}_RESOLVED_EMBEDDED_ITEM PARENT_SCOPE)
set(${key}_COPYFLAG PARENT_SCOPE)
- endforeach(key)
+ endforeach()
set(${keys_var} PARENT_SCOPE)
-endfunction(clear_bundle_keys)
+endfunction()
function(set_bundle_key_values keys_var context item exepath dirs copyflag)
@@ -370,12 +370,12 @@ function(set_bundle_key_values keys_var context item exepath dirs copyflag)
# opening "${item_name}.framework/" to the closing "/${item_name}":
#
string(REGEX REPLACE "^.*(${item_name}.framework/.*/${item_name}).*$" "${default_embedded_path}/\\1" embedded_item "${item}")
- else(item MATCHES "[^/]+\\.framework/")
+ else()
# For other items, just use the same name as the original, but in the
# embedded path:
#
set(embedded_item "${default_embedded_path}/${item_name}")
- endif(item MATCHES "[^/]+\\.framework/")
+ endif()
# Replace @executable_path and resolve ".." references:
#
@@ -391,7 +391,7 @@ function(set_bundle_key_values keys_var context item exepath dirs copyflag)
#
if(NOT copyflag)
set(resolved_embedded_item "${resolved_item}")
- endif(NOT copyflag)
+ endif()
set(${keys_var} ${${keys_var}} PARENT_SCOPE)
set(${key}_ITEM "${item}" PARENT_SCOPE)
@@ -400,10 +400,10 @@ function(set_bundle_key_values keys_var context item exepath dirs copyflag)
set(${key}_EMBEDDED_ITEM "${embedded_item}" PARENT_SCOPE)
set(${key}_RESOLVED_EMBEDDED_ITEM "${resolved_embedded_item}" PARENT_SCOPE)
set(${key}_COPYFLAG "${copyflag}" PARENT_SCOPE)
- else(NOT length_before EQUAL length_after)
+ else()
#message("warning: item key '${key}' already in the list, subsequent references assumed identical to first")
- endif(NOT length_before EQUAL length_after)
-endfunction(set_bundle_key_values)
+ endif()
+endfunction()
function(get_bundle_keys app libs dirs keys_var)
@@ -432,8 +432,8 @@ function(get_bundle_keys app libs dirs keys_var)
get_prerequisites("${lib}" prereqs 1 1 "${exepath}" "${dirs}")
foreach(pr ${prereqs})
set_bundle_key_values(${keys_var} "${lib}" "${pr}" "${exepath}" "${dirs}" 1)
- endforeach(pr)
- endforeach(lib)
+ endforeach()
+ endforeach()
# For each executable found in the bundle, accumulate keys as we go.
# The list of keys should be complete when all prerequisites of all
@@ -450,8 +450,8 @@ function(get_bundle_keys app libs dirs keys_var)
get_prerequisites("${exe}" prereqs 1 1 "${exepath}" "${dirs}")
foreach(pr ${prereqs})
set_bundle_key_values(${keys_var} "${exe}" "${pr}" "${exepath}" "${dirs}" 1)
- endforeach(pr)
- endforeach(exe)
+ endforeach()
+ endforeach()
# Propagate values to caller's scope:
#
@@ -463,9 +463,9 @@ function(get_bundle_keys app libs dirs keys_var)
set(${key}_EMBEDDED_ITEM "${${key}_EMBEDDED_ITEM}" PARENT_SCOPE)
set(${key}_RESOLVED_EMBEDDED_ITEM "${${key}_RESOLVED_EMBEDDED_ITEM}" PARENT_SCOPE)
set(${key}_COPYFLAG "${${key}_COPYFLAG}" PARENT_SCOPE)
- endforeach(key)
- endif(valid)
-endfunction(get_bundle_keys)
+ endforeach()
+ endif()
+endfunction()
function(copy_resolved_item_into_bundle resolved_item resolved_embedded_item)
@@ -485,10 +485,10 @@ function(copy_resolved_item_into_bundle resolved_item resolved_embedded_item)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy "${resolved_item}" "${resolved_embedded_item}")
if(UNIX AND NOT APPLE)
file(RPATH_REMOVE FILE "${resolved_embedded_item}")
- endif(UNIX AND NOT APPLE)
+ endif()
endif()
-endfunction(copy_resolved_item_into_bundle)
+endfunction()
function(copy_resolved_framework_into_bundle resolved_item resolved_embedded_item)
@@ -527,10 +527,10 @@ function(copy_resolved_framework_into_bundle resolved_item resolved_embedded_ite
endif()
if(UNIX AND NOT APPLE)
file(RPATH_REMOVE FILE "${resolved_embedded_item}")
- endif(UNIX AND NOT APPLE)
+ endif()
endif()
-endfunction(copy_resolved_framework_into_bundle)
+endfunction()
function(fixup_bundle_item resolved_embedded_item exepath dirs)
@@ -580,10 +580,10 @@ function(fixup_bundle_item resolved_embedded_item exepath dirs)
if(NOT "${${rkey}_EMBEDDED_ITEM}" STREQUAL "")
set(changes ${changes} "-change" "${pr}" "${${rkey}_EMBEDDED_ITEM}")
- else(NOT "${${rkey}_EMBEDDED_ITEM}" STREQUAL "")
+ else()
message("warning: unexpected reference to '${pr}'")
- endif(NOT "${${rkey}_EMBEDDED_ITEM}" STREQUAL "")
- endforeach(pr)
+ endif()
+ endforeach()
if(BU_CHMOD_BUNDLE_ITEMS)
execute_process(COMMAND chmod u+w "${resolved_embedded_item}")
@@ -595,7 +595,7 @@ function(fixup_bundle_item resolved_embedded_item exepath dirs)
execute_process(COMMAND install_name_tool
${changes} -id "${${ikey}_EMBEDDED_ITEM}" "${resolved_embedded_item}"
)
-endfunction(fixup_bundle_item)
+endfunction()
function(fixup_bundle app libs dirs)
@@ -620,9 +620,9 @@ function(fixup_bundle app libs dirs)
math(EXPR i ${i}+1)
if(${${key}_COPYFLAG})
message(STATUS "${i}/${n}: copying '${${key}_RESOLVED_ITEM}'")
- else(${${key}_COPYFLAG})
+ else()
message(STATUS "${i}/${n}: *NOT* copying '${${key}_RESOLVED_ITEM}'")
- endif(${${key}_COPYFLAG})
+ endif()
set(show_status 0)
if(show_status)
@@ -634,7 +634,7 @@ function(fixup_bundle app libs dirs)
message(STATUS "resolved_embedded_item='${${key}_RESOLVED_EMBEDDED_ITEM}'")
message(STATUS "copyflag='${${key}_COPYFLAG}'")
message(STATUS "")
- endif(show_status)
+ endif()
if(${${key}_COPYFLAG})
set(item "${${key}_ITEM}")
@@ -645,8 +645,8 @@ function(fixup_bundle app libs dirs)
copy_resolved_item_into_bundle("${${key}_RESOLVED_ITEM}"
"${${key}_RESOLVED_EMBEDDED_ITEM}")
endif()
- endif(${${key}_COPYFLAG})
- endforeach(key)
+ endif()
+ endforeach()
message(STATUS "fixup_bundle: fixing...")
foreach(key ${keys})
@@ -654,28 +654,28 @@ function(fixup_bundle app libs dirs)
if(APPLE)
message(STATUS "${i}/${n}: fixing up '${${key}_RESOLVED_EMBEDDED_ITEM}'")
fixup_bundle_item("${${key}_RESOLVED_EMBEDDED_ITEM}" "${exepath}" "${dirs}")
- else(APPLE)
+ else()
message(STATUS "${i}/${n}: fix-up not required on this platform '${${key}_RESOLVED_EMBEDDED_ITEM}'")
- endif(APPLE)
- endforeach(key)
+ endif()
+ endforeach()
message(STATUS "fixup_bundle: cleaning up...")
clear_bundle_keys(keys)
message(STATUS "fixup_bundle: verifying...")
verify_app("${app}")
- else(valid)
+ else()
message(SEND_ERROR "error: fixup_bundle: not a valid bundle")
- endif(valid)
+ endif()
message(STATUS "fixup_bundle: done")
-endfunction(fixup_bundle)
+endfunction()
function(copy_and_fixup_bundle src dst libs dirs)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory "${src}" "${dst}")
fixup_bundle("${dst}" "${libs}" "${dirs}")
-endfunction(copy_and_fixup_bundle)
+endfunction()
function(verify_bundle_prerequisites bundle result_var info_var)
@@ -720,23 +720,23 @@ function(verify_bundle_prerequisites bundle result_var info_var)
set(external_prereqs ${external_prereqs} "${p}")
endif()
endif()
- endforeach(p)
+ endforeach()
if(external_prereqs)
# Found non-system/somehow-unacceptable prerequisites:
set(result 0)
set(info ${info} "external prerequisites found:\nf='${f}'\nexternal_prereqs='${external_prereqs}'\n")
- endif(external_prereqs)
- endif(is_executable)
- endforeach(f)
+ endif()
+ endif()
+ endforeach()
if(result)
set(info "Verified ${count} executable files in '${bundle}'")
- endif(result)
+ endif()
set(${result_var} "${result}" PARENT_SCOPE)
set(${info_var} "${info}" PARENT_SCOPE)
-endfunction(verify_bundle_prerequisites)
+endfunction()
function(verify_bundle_symlinks bundle result_var info_var)
@@ -749,7 +749,7 @@ function(verify_bundle_symlinks bundle result_var info_var)
set(${result_var} "${result}" PARENT_SCOPE)
set(${info_var} "${info}" PARENT_SCOPE)
-endfunction(verify_bundle_symlinks)
+endfunction()
function(verify_app app)
@@ -778,9 +778,9 @@ function(verify_app app)
message(STATUS "verified='${verified}'")
message(STATUS "info='${info}'")
message(STATUS "")
- endif(verified)
+ endif()
if(NOT verified)
message(FATAL_ERROR "error: verify_app failed")
- endif(NOT verified)
-endfunction(verify_app)
+ endif()
+endfunction()
diff --git a/Modules/CMakeASMInformation.cmake b/Modules/CMakeASMInformation.cmake
index 69554e4cc..dce162496 100644
--- a/Modules/CMakeASMInformation.cmake
+++ b/Modules/CMakeASMInformation.cmake
@@ -14,9 +14,9 @@
if(UNIX)
set(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .o)
-else(UNIX)
+else()
set(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .obj)
-endif(UNIX)
+endif()
set(CMAKE_INCLUDE_FLAG_ASM${ASM_DIALECT} "-I") # -I
set(CMAKE_BASE_NAME)
@@ -24,36 +24,36 @@ get_filename_component(CMAKE_BASE_NAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAM
if("${CMAKE_BASE_NAME}" STREQUAL "as")
set(CMAKE_BASE_NAME gas)
-endif("${CMAKE_BASE_NAME}" STREQUAL "as")
+endif()
# Load compiler-specific information.
set(_INCLUDED_FILE "")
if(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
include(Compiler/${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
-endif(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
+endif()
if(NOT _INCLUDED_FILE)
if("ASM${ASM_DIALECT}" STREQUAL "ASM")
message(STATUS "Warning: Did not find file Compiler/${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT}")
- endif("ASM${ASM_DIALECT}" STREQUAL "ASM")
+ endif()
include(Platform/${CMAKE_BASE_NAME} OPTIONAL)
-endif(NOT _INCLUDED_FILE)
+endif()
if(CMAKE_SYSTEM_PROCESSOR)
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
if(NOT _INCLUDED_FILE)
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
- endif(NOT _INCLUDED_FILE)
-endif(CMAKE_SYSTEM_PROCESSOR)
+ endif()
+endif()
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
if(NOT _INCLUDED_FILE)
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
-endif(NOT _INCLUDED_FILE)
+endif()
# Set default assembler file extensions:
if(NOT CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS)
set(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS s;S;asm)
-endif(NOT CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS)
+endif()
# Support for CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT and friends:
@@ -61,7 +61,7 @@ set(CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT "$ENV{ASM${ASM_DIALECT}FLAGS} ${CMAKE_ASM
# avoid just having a space as the initial value for the cache
if(CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT STREQUAL " ")
set(CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT)
-endif(CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT STREQUAL " ")
+endif()
set (CMAKE_ASM${ASM_DIALECT}_FLAGS "${CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT}" CACHE STRING
"Flags used by the assembler during all build types.")
@@ -70,7 +70,7 @@ if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
if(NOT CMAKE_NO_BUILD_TYPE)
set (CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_INIT} CACHE STRING
"Choose the type of build, options are: None, Debug Release RelWithDebInfo MinSizeRel.")
- endif(NOT CMAKE_NO_BUILD_TYPE)
+ endif()
set (CMAKE_ASM${ASM_DIALECT}_FLAGS_DEBUG "${CMAKE_ASM${ASM_DIALECT}_FLAGS_DEBUG_INIT}" CACHE STRING
"Flags used by the assembler during debug builds.")
set (CMAKE_ASM${ASM_DIALECT}_FLAGS_MINSIZEREL "${CMAKE_ASM${ASM_DIALECT}_FLAGS_MINSIZEREL_INIT}" CACHE STRING
@@ -79,7 +79,7 @@ if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
"Flags used by the assembler during release builds.")
set (CMAKE_ASM${ASM_DIALECT}_FLAGS_RELWITHDEBINFO "${CMAKE_ASM${ASM_DIALECT}_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
"Flags used by the assembler during Release with Debug Info builds.")
-endif(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
+endif()
mark_as_advanced(CMAKE_ASM${ASM_DIALECT}_FLAGS
CMAKE_ASM${ASM_DIALECT}_FLAGS_DEBUG
@@ -91,18 +91,18 @@ mark_as_advanced(CMAKE_ASM${ASM_DIALECT}_FLAGS
if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT)
set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT " -o