diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake
index c3c25f560..480fc6264 100644
--- a/CMakeCPack.cmake
+++ b/CMakeCPack.cmake
@@ -11,113 +11,113 @@
#=============================================================================
# If the cmake version includes cpack, use it
-IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
- IF(EXISTS "${CMAKE_ROOT}/Modules/InstallRequiredSystemLibraries.cmake")
- OPTION(CMAKE_INSTALL_DEBUG_LIBRARIES
+if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
+ if(EXISTS "${CMAKE_ROOT}/Modules/InstallRequiredSystemLibraries.cmake")
+ option(CMAKE_INSTALL_DEBUG_LIBRARIES
"Install Microsoft runtime debug libraries with CMake." FALSE)
- MARK_AS_ADVANCED(CMAKE_INSTALL_DEBUG_LIBRARIES)
+ mark_as_advanced(CMAKE_INSTALL_DEBUG_LIBRARIES)
# By default, do not warn when built on machines using only VS Express:
- IF(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
- SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
- ENDIF()
+ if(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
+ set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
+ endif()
- INCLUDE(${CMake_SOURCE_DIR}/Modules/InstallRequiredSystemLibraries.cmake)
- ENDIF(EXISTS "${CMAKE_ROOT}/Modules/InstallRequiredSystemLibraries.cmake")
+ include(${CMake_SOURCE_DIR}/Modules/InstallRequiredSystemLibraries.cmake)
+ endif()
- SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CMake is a build tool")
- SET(CPACK_PACKAGE_VENDOR "Kitware")
- SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt")
- SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt")
- SET(CPACK_PACKAGE_VERSION "${CMake_VERSION}")
- SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
- SET(CPACK_SOURCE_PACKAGE_FILE_NAME "cmake-${CMake_VERSION}")
+ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CMake is a build tool")
+ set(CPACK_PACKAGE_VENDOR "Kitware")
+ set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt")
+ set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt")
+ set(CPACK_PACKAGE_VERSION "${CMake_VERSION}")
+ set(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
+ set(CPACK_SOURCE_PACKAGE_FILE_NAME "cmake-${CMake_VERSION}")
# Make this explicit here, rather than accepting the CPack default value,
# so we can refer to it:
- SET(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
+ set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
# Installers for 32- vs. 64-bit CMake:
# - Root install directory (displayed to end user at installer-run time)
# - "NSIS package/display name" (text used in the installer GUI)
# - Registry key used to store info about the installation
- IF(CMAKE_CL_64)
- SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
- SET(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} (Win64)")
- SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION} (Win64)")
- ELSE()
- SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES")
- SET(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}")
- SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}")
- ENDIF()
+ if(CMAKE_CL_64)
+ set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
+ set(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} (Win64)")
+ set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION} (Win64)")
+ else()
+ set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES")
+ set(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}")
+ set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}")
+ endif()
- IF(NOT DEFINED CPACK_SYSTEM_NAME)
+ if(NOT DEFINED CPACK_SYSTEM_NAME)
# make sure package is not Cygwin-unknown, for Cygwin just
# cygwin is good for the system name
- IF("${CMAKE_SYSTEM_NAME}" STREQUAL "CYGWIN")
- SET(CPACK_SYSTEM_NAME Cygwin)
- ELSE("${CMAKE_SYSTEM_NAME}" STREQUAL "CYGWIN")
- SET(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
- ENDIF("${CMAKE_SYSTEM_NAME}" STREQUAL "CYGWIN")
- ENDIF(NOT DEFINED CPACK_SYSTEM_NAME)
- IF(${CPACK_SYSTEM_NAME} MATCHES Windows)
- IF(CMAKE_CL_64)
- SET(CPACK_SYSTEM_NAME win64-x64)
- ELSE(CMAKE_CL_64)
- SET(CPACK_SYSTEM_NAME win32-x86)
- ENDIF(CMAKE_CL_64)
- ENDIF(${CPACK_SYSTEM_NAME} MATCHES Windows)
+ if("${CMAKE_SYSTEM_NAME}" STREQUAL "CYGWIN")
+ set(CPACK_SYSTEM_NAME Cygwin)
+ else()
+ set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
+ endif()
+ endif()
+ if(${CPACK_SYSTEM_NAME} MATCHES Windows)
+ if(CMAKE_CL_64)
+ set(CPACK_SYSTEM_NAME win64-x64)
+ else()
+ set(CPACK_SYSTEM_NAME win32-x86)
+ endif()
+ 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
- # default to source package - system, on cygwin system is not
+ # default to source package - system, on cygwin system is not
# needed
- IF(CYGWIN)
- SET(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}")
- ELSE(CYGWIN)
- SET(CPACK_PACKAGE_FILE_NAME
+ if(CYGWIN)
+ set(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}")
+ 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")
+ set(CPACK_PACKAGE_CONTACT "cmake@cmake.org")
- IF(UNIX)
- 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)
+ if(UNIX)
+ set(CPACK_STRIP_FILES "bin/ccmake;bin/cmake;bin/cpack;bin/ctest")
+ set(CPACK_SOURCE_STRIP_FILES "")
+ set(CPACK_PACKAGE_EXECUTABLES "ccmake" "CMake")
+ endif()
# cygwin specific packaging stuff
- IF(CYGWIN)
+ if(CYGWIN)
# setup the cygwin package name
- SET(CPACK_PACKAGE_NAME cmake)
+ set(CPACK_PACKAGE_NAME cmake)
# setup the name of the package for cygwin cmake-2.4.3
- SET(CPACK_PACKAGE_FILE_NAME
+ set(CPACK_PACKAGE_FILE_NAME
"${CPACK_PACKAGE_NAME}-${CMake_VERSION}")
# the source has the same name as the binary
- SET(CPACK_SOURCE_PACKAGE_FILE_NAME ${CPACK_PACKAGE_FILE_NAME})
+ set(CPACK_SOURCE_PACKAGE_FILE_NAME ${CPACK_PACKAGE_FILE_NAME})
# Create a cygwin version number in case there are changes for cygwin
# that are not reflected upstream in CMake
- SET(CPACK_CYGWIN_PATCH_NUMBER 1)
+ set(CPACK_CYGWIN_PATCH_NUMBER 1)
# These files are required by the cmCPackCygwinSourceGenerator and the files
# put into the release tar files.
- SET(CPACK_CYGWIN_BUILD_SCRIPT
+ set(CPACK_CYGWIN_BUILD_SCRIPT
"${CMake_BINARY_DIR}/@CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.sh")
- SET(CPACK_CYGWIN_PATCH_FILE
+ set(CPACK_CYGWIN_PATCH_FILE
"${CMake_BINARY_DIR}/@CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.patch")
# include the sub directory cmake file for cygwin that
# 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)
+ include(Utilities/Release/Cygwin/CMakeLists.txt)
+ 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)
- CONFIGURE_FILE("${CMake_SOURCE_DIR}/CMakeCPackOptions.cmake.in"
+ set(QT_DIALOG_CPACK_OPTIONS_FILE ${CMake_BINARY_DIR}/Source/QtDialog/QtDialogCPack.cmake)
+ configure_file("${CMake_SOURCE_DIR}/CMakeCPackOptions.cmake.in"
"${CMake_BINARY_DIR}/CMakeCPackOptions.cmake" @ONLY)
- SET(CPACK_PROJECT_CONFIG_FILE "${CMake_BINARY_DIR}/CMakeCPackOptions.cmake")
+ set(CPACK_PROJECT_CONFIG_FILE "${CMake_BINARY_DIR}/CMakeCPackOptions.cmake")
# include CPack model once all variables are set
- INCLUDE(CPack)
-ENDIF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
+ include(CPack)
+endif()
diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in
index 69a150851..3a72eaa5c 100644
--- a/CMakeCPackOptions.cmake.in
+++ b/CMakeCPackOptions.cmake.in
@@ -1,18 +1,18 @@
# This file is configured at cmake time, and loaded at cpack time.
# To pass variables to cpack from cmake, they must be configured
-# in this file.
+# in this file.
if(CPACK_GENERATOR MATCHES "NSIS")
- SET(CPACK_NSIS_INSTALL_ROOT "@CPACK_NSIS_INSTALL_ROOT@")
+ set(CPACK_NSIS_INSTALL_ROOT "@CPACK_NSIS_INSTALL_ROOT@")
# set the install/unistall icon used for the installer itself
# There is a bug in NSI that does not handle full unix paths properly.
- SET(CPACK_NSIS_MUI_ICON "@CMake_SOURCE_DIR@/Utilities/Release\\CMakeLogo.ico")
- SET(CPACK_NSIS_MUI_UNIICON "@CMake_SOURCE_DIR@/Utilities/Release\\CMakeLogo.ico")
+ set(CPACK_NSIS_MUI_ICON "@CMake_SOURCE_DIR@/Utilities/Release\\CMakeLogo.ico")
+ set(CPACK_NSIS_MUI_UNIICON "@CMake_SOURCE_DIR@/Utilities/Release\\CMakeLogo.ico")
# set the package header icon for MUI
- SET(CPACK_PACKAGE_ICON "@CMake_SOURCE_DIR@/Utilities/Release\\CMakeInstall.bmp")
+ set(CPACK_PACKAGE_ICON "@CMake_SOURCE_DIR@/Utilities/Release\\CMakeInstall.bmp")
# tell cpack to create links to the doc files
- SET(CPACK_NSIS_MENU_LINKS
+ set(CPACK_NSIS_MENU_LINKS
"doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cmake-gui.html" "cmake-gui Help"
"doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cmake.html" "CMake Help"
"doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cmake-properties.html"
@@ -24,30 +24,30 @@ if(CPACK_GENERATOR MATCHES "NSIS")
"http://www.cmake.org" "CMake Web Site"
)
# Use the icon from cmake-gui for add-remove programs
- SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\cmake-gui.exe")
+ set(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\cmake-gui.exe")
- SET(CPACK_NSIS_PACKAGE_NAME "@CPACK_NSIS_PACKAGE_NAME@")
- SET(CPACK_NSIS_DISPLAY_NAME "@CPACK_NSIS_PACKAGE_NAME@, a cross-platform, open-source build system")
- SET(CPACK_NSIS_HELP_LINK "http://www.cmake.org")
- 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")
+ set(CPACK_NSIS_PACKAGE_NAME "@CPACK_NSIS_PACKAGE_NAME@")
+ set(CPACK_NSIS_DISPLAY_NAME "@CPACK_NSIS_PACKAGE_NAME@, a cross-platform, open-source build system")
+ set(CPACK_NSIS_HELP_LINK "http://www.cmake.org")
+ set(CPACK_NSIS_URL_INFO_ABOUT "http://www.kitware.com")
+ set(CPACK_NSIS_CONTACT @CPACK_PACKAGE_CONTACT@)
+ set(CPACK_NSIS_MODIFY_PATH ON)
+endif()
# include the cpack options for qt dialog if they exisit
# they might not if qt was not enabled for the build
-INCLUDE("@QT_DIALOG_CPACK_OPTIONS_FILE@" OPTIONAL)
+include("@QT_DIALOG_CPACK_OPTIONS_FILE@" OPTIONAL)
if(CPACK_GENERATOR MATCHES "CygwinSource")
# 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$" "\\.#" "/#" "~$")
-endif(CPACK_GENERATOR MATCHES "CygwinSource")
+endif()
if("${CPACK_GENERATOR}" STREQUAL "PackageMaker")
- if(CMAKE_PACKAGE_QTGUI)
+ 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/CMakeGraphVizOptions.cmake b/CMakeGraphVizOptions.cmake
index 038f17e9b..1add78c55 100644
--- a/CMakeGraphVizOptions.cmake
+++ b/CMakeGraphVizOptions.cmake
@@ -1 +1 @@
-SET(GRAPHVIZ_IGNORE_TARGETS "tartest;testSystemTools;testRegistry;testProcess;testIOS;testHashSTL;testFail;testCommandLineArguments;xrtest;LIBCURL;foo")
+set(GRAPHVIZ_IGNORE_TARGETS "tartest;testSystemTools;testRegistry;testProcess;testIOS;testHashSTL;testFail;testCommandLineArguments;xrtest;LIBCURL;foo")
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8522cad28..f0789a30b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,71 +9,71 @@
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2 FATAL_ERROR)
-SET(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required
-PROJECT(CMake)
+cmake_minimum_required(VERSION 2.8.2 FATAL_ERROR)
+set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required
+project(CMake)
-IF(CMAKE_BOOTSTRAP)
+if(CMAKE_BOOTSTRAP)
# Running from bootstrap script. Set local variable and remove from cache.
- SET(CMAKE_BOOTSTRAP 1)
- UNSET(CMAKE_BOOTSTRAP CACHE)
-ENDIF()
+ set(CMAKE_BOOTSTRAP 1)
+ unset(CMAKE_BOOTSTRAP CACHE)
+endif()
-SET(CMake_BIN_DIR ${CMake_BINARY_DIR}/bin)
+set(CMake_BIN_DIR ${CMake_BINARY_DIR}/bin)
-IF("${CMake_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
+if("${CMake_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
# Disallow architecture-specific try_run. It may not run on the host.
- MACRO(TRY_RUN)
- IF(CMAKE_TRY_COMPILE_OSX_ARCHITECTURES)
- MESSAGE(FATAL_ERROR "TRY_RUN not allowed with CMAKE_TRY_COMPILE_OSX_ARCHITECTURES=[${CMAKE_TRY_COMPILE_OSX_ARCHITECTURES}]")
- ELSE()
+ macro(TRY_RUN)
+ if(CMAKE_TRY_COMPILE_OSX_ARCHITECTURES)
+ message(FATAL_ERROR "TRY_RUN not allowed with CMAKE_TRY_COMPILE_OSX_ARCHITECTURES=[${CMAKE_TRY_COMPILE_OSX_ARCHITECTURES}]")
+ else()
_TRY_RUN(${ARGV})
- ENDIF()
- ENDMACRO()
-ENDIF()
+ endif()
+ endmacro()
+endif()
#-----------------------------------------------------------------------
# a macro to deal with system libraries, implemented as a macro
# simply to improve readability of the main script
#-----------------------------------------------------------------------
-MACRO(CMAKE_HANDLE_SYSTEM_LIBRARIES)
+macro(CMAKE_HANDLE_SYSTEM_LIBRARIES)
# Options have dependencies.
- INCLUDE(CMakeDependentOption)
+ include(CMakeDependentOption)
# Optionally use system xmlrpc. We no longer build or use it by default.
- OPTION(CTEST_USE_XMLRPC "Enable xmlrpc submission method in CTest." OFF)
- MARK_AS_ADVANCED(CTEST_USE_XMLRPC)
+ option(CTEST_USE_XMLRPC "Enable xmlrpc submission method in CTest." OFF)
+ mark_as_advanced(CTEST_USE_XMLRPC)
# Allow the user to enable/disable all system utility library options by
# defining CMAKE_USE_SYSTEM_LIBRARIES or CMAKE_USE_SYSTEM_LIBRARY_${util}.
- SET(UTILITIES BZIP2 CURL EXPAT LIBARCHIVE ZLIB)
- FOREACH(util ${UTILITIES})
- IF(NOT DEFINED CMAKE_USE_SYSTEM_LIBRARY_${util}
+ set(UTILITIES BZIP2 CURL EXPAT LIBARCHIVE ZLIB)
+ foreach(util ${UTILITIES})
+ if(NOT DEFINED CMAKE_USE_SYSTEM_LIBRARY_${util}
AND DEFINED CMAKE_USE_SYSTEM_LIBRARIES)
- SET(CMAKE_USE_SYSTEM_LIBRARY_${util} "${CMAKE_USE_SYSTEM_LIBRARIES}")
- ENDIF()
- IF(DEFINED CMAKE_USE_SYSTEM_LIBRARY_${util})
- IF(CMAKE_USE_SYSTEM_LIBRARY_${util})
- SET(CMAKE_USE_SYSTEM_LIBRARY_${util} ON)
- ELSE()
- SET(CMAKE_USE_SYSTEM_LIBRARY_${util} OFF)
- ENDIF()
- IF(CMAKE_BOOTSTRAP)
- UNSET(CMAKE_USE_SYSTEM_LIBRARY_${util} CACHE)
- ENDIF()
- STRING(TOLOWER "${util}" lutil)
- SET(CMAKE_USE_SYSTEM_${util} "${CMAKE_USE_SYSTEM_LIBRARY_${util}}"
+ set(CMAKE_USE_SYSTEM_LIBRARY_${util} "${CMAKE_USE_SYSTEM_LIBRARIES}")
+ endif()
+ if(DEFINED CMAKE_USE_SYSTEM_LIBRARY_${util})
+ if(CMAKE_USE_SYSTEM_LIBRARY_${util})
+ set(CMAKE_USE_SYSTEM_LIBRARY_${util} ON)
+ else()
+ set(CMAKE_USE_SYSTEM_LIBRARY_${util} OFF)
+ endif()
+ if(CMAKE_BOOTSTRAP)
+ unset(CMAKE_USE_SYSTEM_LIBRARY_${util} CACHE)
+ endif()
+ string(TOLOWER "${util}" lutil)
+ set(CMAKE_USE_SYSTEM_${util} "${CMAKE_USE_SYSTEM_LIBRARY_${util}}"
CACHE BOOL "Use system-installed ${lutil}" FORCE)
- ELSE()
- SET(CMAKE_USE_SYSTEM_LIBRARY_${util} OFF)
- ENDIF()
- ENDFOREACH(util)
- IF(CMAKE_BOOTSTRAP)
- UNSET(CMAKE_USE_SYSTEM_LIBRARIES CACHE)
- ENDIF()
+ else()
+ set(CMAKE_USE_SYSTEM_LIBRARY_${util} OFF)
+ endif()
+ endforeach()
+ if(CMAKE_BOOTSTRAP)
+ unset(CMAKE_USE_SYSTEM_LIBRARIES CACHE)
+ endif()
# Optionally use system utility libraries.
- OPTION(CMAKE_USE_SYSTEM_LIBARCHIVE "Use system-installed libarchive" "${CMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE}")
+ option(CMAKE_USE_SYSTEM_LIBARCHIVE "Use system-installed libarchive" "${CMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE}")
CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_CURL "Use system-installed curl"
"${CMAKE_USE_SYSTEM_LIBRARY_CURL}" "NOT CTEST_USE_XMLRPC" ON)
CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_EXPAT "Use system-installed expat"
@@ -84,155 +84,155 @@ MACRO(CMAKE_HANDLE_SYSTEM_LIBRARIES)
"${CMAKE_USE_SYSTEM_LIBRARY_BZIP2}" "NOT CMAKE_USE_SYSTEM_LIBARCHIVE" ON)
# Mention to the user what system libraries are being used.
- FOREACH(util ${UTILITIES})
- IF(CMAKE_USE_SYSTEM_${util})
- MESSAGE(STATUS "Using system-installed ${util}")
- ENDIF(CMAKE_USE_SYSTEM_${util})
- ENDFOREACH(util)
+ foreach(util ${UTILITIES})
+ if(CMAKE_USE_SYSTEM_${util})
+ message(STATUS "Using system-installed ${util}")
+ endif()
+ endforeach()
# 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
@ONLY)
-ENDMACRO(CMAKE_HANDLE_SYSTEM_LIBRARIES)
+endmacro()
-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 )
+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()
#-----------------------------------------------------------------------
# a macro to determine the generator and ctest executable to use
# for testing. Simply to improve readability of the main script.
#-----------------------------------------------------------------------
-MACRO(CMAKE_SETUP_TESTING)
- IF (NOT DART_ROOT)
- SET(MAKEPROGRAM ${CMAKE_MAKE_PROGRAM})
- ENDIF (NOT DART_ROOT)
-
- IF(BUILD_TESTING)
- SET(CMAKE_TEST_GENERATOR "" CACHE STRING
+macro(CMAKE_SETUP_TESTING)
+ if (NOT DART_ROOT)
+ set(MAKEPROGRAM ${CMAKE_MAKE_PROGRAM})
+ endif ()
+
+ if(BUILD_TESTING)
+ set(CMAKE_TEST_GENERATOR "" CACHE STRING
"Generator used when running tests")
- SET(CMAKE_TEST_MAKEPROGRAM "" CACHE FILEPATH
+ set(CMAKE_TEST_MAKEPROGRAM "" CACHE FILEPATH
"Generator used when running tests")
- IF(NOT CMAKE_TEST_GENERATOR)
- SET(CMAKE_TEST_GENERATOR "${CMAKE_GENERATOR}")
- SET(CMAKE_TEST_MAKEPROGRAM "${MAKEPROGRAM}")
- ELSE(NOT CMAKE_TEST_GENERATOR)
- SET(CMAKE_TEST_DIFFERENT_GENERATOR TRUE)
- ENDIF(NOT CMAKE_TEST_GENERATOR)
-
+ if(NOT CMAKE_TEST_GENERATOR)
+ set(CMAKE_TEST_GENERATOR "${CMAKE_GENERATOR}")
+ set(CMAKE_TEST_MAKEPROGRAM "${MAKEPROGRAM}")
+ else()
+ set(CMAKE_TEST_DIFFERENT_GENERATOR TRUE)
+ 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)
- IF("${CMAKE_TEST_GENERATOR}" MATCHES "NMake" OR
+ set(CMAKE_TEST_MSVC 0)
+ if(MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR)
+ set(CMAKE_TEST_MSVC 1)
+ 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
+ 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)
-
- 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()
+
+ set(CMAKE_TEST_SYSTEM_LIBRARIES 0)
+ foreach(util CURL EXPAT XMLRPC ZLIB)
+ if(CMAKE_USE_SYSTEM_${util})
+ set(CMAKE_TEST_SYSTEM_LIBRARIES 1)
+ endif()
+ endforeach()
+
# This variable is set by cmake, however to
# test cmake we want to make sure that
# the ctest from this cmake is used for testing
# and not the ctest from the cmake building and testing
# cmake.
- 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)
+ 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()
# 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"
"${CMAKE_CURRENT_BINARY_DIR}/CTestScript.cmake"
@ONLY)
- CONFIGURE_FILE(${CMake_SOURCE_DIR}/Tests/.NoDartCoverage
+ configure_file(${CMake_SOURCE_DIR}/Tests/.NoDartCoverage
${CMake_BINARY_DIR}/Tests/.NoDartCoverage)
- CONFIGURE_FILE(${CMake_SOURCE_DIR}/Tests/.NoDartCoverage
+ configure_file(${CMake_SOURCE_DIR}/Tests/.NoDartCoverage
${CMake_BINARY_DIR}/Modules/.NoDartCoverage)
- CONFIGURE_FILE(${CMake_SOURCE_DIR}/CTestCustom.cmake.in
+ configure_file(${CMake_SOURCE_DIR}/CTestCustom.cmake.in
${CMake_BINARY_DIR}/CTestCustom.cmake @ONLY)
- CONFIGURE_FILE(${CMake_SOURCE_DIR}/CTestCustom.ctest.in
+ configure_file(${CMake_SOURCE_DIR}/CTestCustom.ctest.in
${CMake_BINARY_DIR}/CTestCustom.ctest @ONLY)
- IF(BUILD_TESTING AND DART_ROOT)
- CONFIGURE_FILE(${CMake_SOURCE_DIR}/CMakeLogo.gif
+ 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)
- MARK_AS_ADVANCED(DART_ROOT)
- MARK_AS_ADVANCED(CURL_TESTING)
-ENDMACRO(CMAKE_SETUP_TESTING)
+ endif()
+ mark_as_advanced(DART_ROOT)
+ mark_as_advanced(CURL_TESTING)
+endmacro()
# Provide a way for Visual Studio Express users to turn OFF the new FOLDER
# organization feature. Default to ON for non-Express users. Express users must
# explicitly turn off this option to build CMake in the Express IDE...
#
-OPTION(CMAKE_USE_FOLDERS "Enable folder grouping of projects in IDEs." ON)
-MARK_AS_ADVANCED(CMAKE_USE_FOLDERS)
+option(CMAKE_USE_FOLDERS "Enable folder grouping of projects in IDEs." ON)
+mark_as_advanced(CMAKE_USE_FOLDERS)
#-----------------------------------------------------------------------
# a macro that only sets the FOLDER target property if it's
# "appropriate"
#-----------------------------------------------------------------------
-MACRO(CMAKE_SET_TARGET_FOLDER tgt folder)
- IF(CMAKE_USE_FOLDERS)
- SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON)
+macro(CMAKE_SET_TARGET_FOLDER tgt folder)
+ if(CMAKE_USE_FOLDERS)
+ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# Really, I just want this to be an "if(TARGET ${tgt})" ...
# but I'm not sure that our min req'd., CMake 2.4.5 can handle
# that... so I'm just activating this for now, with a version
# compare, and only for MSVC builds.
- IF(MSVC)
- IF(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.8)
- SET_PROPERTY(TARGET "${tgt}" PROPERTY FOLDER "${folder}")
- ENDIF()
- ENDIF()
- ELSE()
- SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS OFF)
- ENDIF()
-ENDMACRO(CMAKE_SET_TARGET_FOLDER)
+ if(MSVC)
+ if(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.8)
+ set_property(TARGET "${tgt}" PROPERTY FOLDER "${folder}")
+ endif()
+ endif()
+ else()
+ set_property(GLOBAL PROPERTY USE_FOLDERS OFF)
+ endif()
+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)
#---------------------------------------------------------------------
# Create the KWIML library for CMake.
- SET(KWIML cmIML)
- SET(KWIML_HEADER_ROOT ${CMake_BINARY_DIR}/Utilities)
- ADD_SUBDIRECTORY(Utilities/KWIML)
+ set(KWIML cmIML)
+ set(KWIML_HEADER_ROOT ${CMake_BINARY_DIR}/Utilities)
+ add_subdirectory(Utilities/KWIML)
#---------------------------------------------------------------------
# Create the kwsys library for CMake.
- SET(KWSYS_NAMESPACE cmsys)
- SET(KWSYS_USE_SystemTools 1)
- SET(KWSYS_USE_Directory 1)
- SET(KWSYS_USE_RegularExpression 1)
- SET(KWSYS_USE_Base64 1)
- SET(KWSYS_USE_MD5 1)
- SET(KWSYS_USE_Process 1)
- SET(KWSYS_USE_CommandLineArguments 1)
- SET(KWSYS_HEADER_ROOT ${CMake_BINARY_DIR}/Source)
- SET(KWSYS_INSTALL_DOC_DIR "${CMake_DOC_DEST}")
- ADD_SUBDIRECTORY(Source/kwsys)
- SET(kwsys_folder "Utilities/KWSys")
+ set(KWSYS_NAMESPACE cmsys)
+ set(KWSYS_USE_SystemTools 1)
+ set(KWSYS_USE_Directory 1)
+ set(KWSYS_USE_RegularExpression 1)
+ set(KWSYS_USE_Base64 1)
+ set(KWSYS_USE_MD5 1)
+ set(KWSYS_USE_Process 1)
+ set(KWSYS_USE_CommandLineArguments 1)
+ set(KWSYS_HEADER_ROOT ${CMake_BINARY_DIR}/Source)
+ set(KWSYS_INSTALL_DOC_DIR "${CMake_DOC_DEST}")
+ add_subdirectory(Source/kwsys)
+ set(kwsys_folder "Utilities/KWSys")
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE} "${kwsys_folder}")
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}_c "${kwsys_folder}")
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}EncodeExecutable "${kwsys_folder}")
@@ -249,248 +249,248 @@ MACRO (CMAKE_BUILD_UTILITIES)
# Setup third-party libraries.
# Everything in the tree should be able to include files from the
# Utilities directory.
- INCLUDE_DIRECTORIES(
+ include_directories(
${CMake_BINARY_DIR}/Utilities
${CMake_SOURCE_DIR}/Utilities
)
-
+
# check for the use of system libraries versus builtin ones
# (a macro defined in this file)
CMAKE_HANDLE_SYSTEM_LIBRARIES()
-
+
#---------------------------------------------------------------------
# Build zlib library for Curl, CMake, and CTest.
- SET(CMAKE_ZLIB_HEADER "cm_zlib.h")
- IF(CMAKE_USE_SYSTEM_ZLIB)
- FIND_PACKAGE(ZLIB)
- IF(NOT ZLIB_FOUND)
- MESSAGE(FATAL_ERROR
+ set(CMAKE_ZLIB_HEADER "cm_zlib.h")
+ if(CMAKE_USE_SYSTEM_ZLIB)
+ find_package(ZLIB)
+ if(NOT ZLIB_FOUND)
+ message(FATAL_ERROR
"CMAKE_USE_SYSTEM_ZLIB is ON but a zlib is not found!")
- ENDIF(NOT ZLIB_FOUND)
- SET(CMAKE_ZLIB_INCLUDES ${ZLIB_INCLUDE_DIR})
- SET(CMAKE_ZLIB_LIBRARIES ${ZLIB_LIBRARIES})
- ELSE(CMAKE_USE_SYSTEM_ZLIB)
- SET(CMAKE_ZLIB_INCLUDES ${CMake_SOURCE_DIR}/Utilities)
- SET(CMAKE_ZLIB_LIBRARIES cmzlib)
- ADD_SUBDIRECTORY(Utilities/cmzlib)
+ endif()
+ set(CMAKE_ZLIB_INCLUDES ${ZLIB_INCLUDE_DIR})
+ set(CMAKE_ZLIB_LIBRARIES ${ZLIB_LIBRARIES})
+ 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.
- IF(CMAKE_USE_SYSTEM_CURL)
- FIND_PACKAGE(CURL)
- IF(NOT CURL_FOUND)
- MESSAGE(FATAL_ERROR
+ if(CMAKE_USE_SYSTEM_CURL)
+ find_package(CURL)
+ if(NOT CURL_FOUND)
+ message(FATAL_ERROR
"CMAKE_USE_SYSTEM_CURL is ON but a curl is not found!")
- ENDIF(NOT CURL_FOUND)
- SET(CMAKE_CURL_INCLUDES ${CURL_INCLUDE_DIRS})
- SET(CMAKE_CURL_LIBRARIES ${CURL_LIBRARIES})
- ELSE(CMAKE_USE_SYSTEM_CURL)
- 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)
- 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)
- ADD_SUBDIRECTORY(Utilities/cmcurl)
+ endif()
+ set(CMAKE_CURL_INCLUDES ${CURL_INCLUDE_DIRS})
+ set(CMAKE_CURL_LIBRARIES ${CURL_LIBRARIES})
+ 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()
+ 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()
+ 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.
- SET(CMAKE_COMPRESS_INCLUDES
+ set(CMAKE_COMPRESS_INCLUDES
"${CMAKE_CURRENT_BINARY_DIR}/Utilities/cmcompress")
- SET(CMAKE_COMPRESS_LIBRARIES "cmcompress")
- ADD_SUBDIRECTORY(Utilities/cmcompress)
+ set(CMAKE_COMPRESS_LIBRARIES "cmcompress")
+ add_subdirectory(Utilities/cmcompress)
CMAKE_SET_TARGET_FOLDER(cmcompress "Utilities/3rdParty")
- IF(CMAKE_USE_SYSTEM_BZIP2)
- FIND_PACKAGE(BZip2)
- ELSE()
- SET(BZIP2_INCLUDE_DIR
+ if(CMAKE_USE_SYSTEM_BZIP2)
+ find_package(BZip2)
+ else()
+ set(BZIP2_INCLUDE_DIR
"${CMAKE_CURRENT_SOURCE_DIR}/Utilities/cmbzip2")
- SET(BZIP2_LIBRARIES cmbzip2)
- ADD_SUBDIRECTORY(Utilities/cmbzip2)
+ set(BZIP2_LIBRARIES cmbzip2)
+ add_subdirectory(Utilities/cmbzip2)
CMAKE_SET_TARGET_FOLDER(cmbzip2 "Utilities/3rdParty")
- ENDIF()
+ endif()
#---------------------------------------------------------------------
# Build or use system libarchive for CMake and CTest.
- IF(CMAKE_USE_SYSTEM_LIBARCHIVE)
- IF(EXISTS ${CMAKE_ROOT}/Modules/FindLibArchive.cmake) # added in 2.8.3
- FIND_PACKAGE(LibArchive)
- ELSE()
- INCLUDE(${CMake_SOURCE_DIR}/Modules/FindLibArchive.cmake)
- ENDIF()
- IF(NOT LibArchive_FOUND)
- MESSAGE(FATAL_ERROR "CMAKE_USE_SYSTEM_LIBARCHIVE is ON but LibArchive is not found!")
- ENDIF()
- SET(CMAKE_TAR_INCLUDES ${LibArchive_INCLUDE_DIRS})
- SET(CMAKE_TAR_LIBRARIES ${LibArchive_LIBRARIES})
- ELSE(CMAKE_USE_SYSTEM_LIBARCHIVE)
- SET(ZLIB_INCLUDE_DIR ${CMAKE_ZLIB_INCLUDES})
- SET(ZLIB_LIBRARY ${CMAKE_ZLIB_LIBRARIES})
- ADD_DEFINITIONS(-DLIBARCHIVE_STATIC)
- SET(ENABLE_NETTLE OFF CACHE INTERNAL "Enable use of Nettle")
- SET(ENABLE_OPENSSL ${CMAKE_USE_OPENSSL} CACHE INTERNAL "Enable use of OpenSSL")
- SET(ENABLE_XATTR OFF CACHE INTERNAL "Enable extended attribute support")
- SET(ENABLE_ACL OFF CACHE INTERNAL "Enable ACL support")
- SET(ENABLE_ICONV OFF CACHE INTERNAL "Enable iconv support")
- ADD_SUBDIRECTORY(Utilities/cmlibarchive)
+ if(CMAKE_USE_SYSTEM_LIBARCHIVE)
+ if(EXISTS ${CMAKE_ROOT}/Modules/FindLibArchive.cmake) # added in 2.8.3
+ find_package(LibArchive)
+ else()
+ include(${CMake_SOURCE_DIR}/Modules/FindLibArchive.cmake)
+ endif()
+ if(NOT LibArchive_FOUND)
+ message(FATAL_ERROR "CMAKE_USE_SYSTEM_LIBARCHIVE is ON but LibArchive is not found!")
+ endif()
+ set(CMAKE_TAR_INCLUDES ${LibArchive_INCLUDE_DIRS})
+ set(CMAKE_TAR_LIBRARIES ${LibArchive_LIBRARIES})
+ else()
+ set(ZLIB_INCLUDE_DIR ${CMAKE_ZLIB_INCLUDES})
+ set(ZLIB_LIBRARY ${CMAKE_ZLIB_LIBRARIES})
+ add_definitions(-DLIBARCHIVE_STATIC)
+ set(ENABLE_NETTLE OFF CACHE INTERNAL "Enable use of Nettle")
+ set(ENABLE_OPENSSL ${CMAKE_USE_OPENSSL} CACHE INTERNAL "Enable use of OpenSSL")
+ set(ENABLE_XATTR OFF CACHE INTERNAL "Enable extended attribute support")
+ set(ENABLE_ACL OFF CACHE INTERNAL "Enable ACL support")
+ set(ENABLE_ICONV OFF CACHE INTERNAL "Enable iconv support")
+ add_subdirectory(Utilities/cmlibarchive)
CMAKE_SET_TARGET_FOLDER(cmlibarchive "Utilities/3rdParty")
- SET(CMAKE_TAR_LIBRARIES cmlibarchive ${BZIP2_LIBRARIES})
- ENDIF(CMAKE_USE_SYSTEM_LIBARCHIVE)
+ set(CMAKE_TAR_LIBRARIES cmlibarchive ${BZIP2_LIBRARIES})
+ endif()
#---------------------------------------------------------------------
# Build expat library for CMake and CTest.
- IF(CMAKE_USE_SYSTEM_EXPAT)
- FIND_PACKAGE(EXPAT)
- IF(NOT EXPAT_FOUND)
- MESSAGE(FATAL_ERROR
+ if(CMAKE_USE_SYSTEM_EXPAT)
+ find_package(EXPAT)
+ if(NOT EXPAT_FOUND)
+ message(FATAL_ERROR
"CMAKE_USE_SYSTEM_EXPAT is ON but a expat is not found!")
- ENDIF(NOT EXPAT_FOUND)
- SET(CMAKE_EXPAT_INCLUDES ${EXPAT_INCLUDE_DIRS})
- SET(CMAKE_EXPAT_LIBRARIES ${EXPAT_LIBRARIES})
- ELSE(CMAKE_USE_SYSTEM_EXPAT)
- SET(CMAKE_EXPAT_INCLUDES)
- SET(CMAKE_EXPAT_LIBRARIES cmexpat)
- ADD_SUBDIRECTORY(Utilities/cmexpat)
+ endif()
+ set(CMAKE_EXPAT_INCLUDES ${EXPAT_INCLUDE_DIRS})
+ set(CMAKE_EXPAT_LIBRARIES ${EXPAT_LIBRARIES})
+ 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.
- IF(CTEST_USE_XMLRPC)
- FIND_PACKAGE(XMLRPC QUIET REQUIRED libwww-client)
- IF(NOT XMLRPC_FOUND)
- MESSAGE(FATAL_ERROR
+ if(CTEST_USE_XMLRPC)
+ find_package(XMLRPC QUIET REQUIRED libwww-client)
+ if(NOT XMLRPC_FOUND)
+ message(FATAL_ERROR
"CTEST_USE_XMLRPC is ON but xmlrpc is not found!")
- ENDIF(NOT XMLRPC_FOUND)
- SET(CMAKE_XMLRPC_INCLUDES ${XMLRPC_INCLUDE_DIRS})
- SET(CMAKE_XMLRPC_LIBRARIES ${XMLRPC_LIBRARIES})
- ENDIF(CTEST_USE_XMLRPC)
-
+ endif()
+ set(CMAKE_XMLRPC_INCLUDES ${XMLRPC_INCLUDE_DIRS})
+ set(CMAKE_XMLRPC_LIBRARIES ${XMLRPC_LIBRARIES})
+ endif()
+
#---------------------------------------------------------------------
# Use curses?
- IF (UNIX)
+ if (UNIX)
# there is a bug in the Syllable libraries which makes linking ccmake fail, Alex
- IF(NOT "${CMAKE_SYSTEM_NAME}" MATCHES syllable)
- SET(CURSES_NEED_NCURSES TRUE)
- FIND_PACKAGE(Curses QUIET)
- IF (CURSES_LIBRARY)
- OPTION(BUILD_CursesDialog "Build the CMake Curses Dialog ccmake" ON)
- ELSE (CURSES_LIBRARY)
- 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)
- SET(BUILD_CursesDialog 0)
- ENDIF(NOT "${CMAKE_SYSTEM_NAME}" MATCHES syllable)
- ELSE (UNIX)
- SET(BUILD_CursesDialog 0)
- ENDIF (UNIX)
- IF(BUILD_CursesDialog)
- ADD_SUBDIRECTORY(Source/CursesDialog/form)
- ENDIF(BUILD_CursesDialog)
-ENDMACRO (CMAKE_BUILD_UTILITIES)
+ if(NOT "${CMAKE_SYSTEM_NAME}" MATCHES syllable)
+ set(CURSES_NEED_NCURSES TRUE)
+ find_package(Curses QUIET)
+ if (CURSES_LIBRARY)
+ option(BUILD_CursesDialog "Build the CMake Curses Dialog ccmake" ON)
+ else ()
+ message("Curses libraries were not found. Curses GUI for CMake will not be built.")
+ set(BUILD_CursesDialog 0)
+ endif ()
+ else()
+ set(BUILD_CursesDialog 0)
+ endif()
+ else ()
+ set(BUILD_CursesDialog 0)
+ endif ()
+ if(BUILD_CursesDialog)
+ add_subdirectory(Source/CursesDialog/form)
+ endif()
+endmacro ()
#-----------------------------------------------------------------------
-IF(CMAKE_CXX_PLATFORM_ID MATCHES "OpenBSD")
- EXECUTE_PROCESS(COMMAND ${CMAKE_CXX_COMPILER}
+if(CMAKE_CXX_PLATFORM_ID MATCHES "OpenBSD")
+ execute_process(COMMAND ${CMAKE_CXX_COMPILER}
${CMAKE_CXX_COMPILER_ARG1} -dumpversion
OUTPUT_VARIABLE _GXX_VERSION
)
- STRING(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2"
+ string(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2"
_GXX_VERSION_SHORT ${_GXX_VERSION})
- IF(_GXX_VERSION_SHORT EQUAL 33)
- MESSAGE(FATAL_ERROR
+ if(_GXX_VERSION_SHORT EQUAL 33)
+ message(FATAL_ERROR
"GXX 3.3 on OpenBSD is known to cause CPack to Crash.\n"
"Please use GXX 4.2 or greater to build CMake on OpenBSD\n"
"${CMAKE_CXX_COMPILER} version is: ${_GXX_VERSION}")
- ENDIF()
-ENDIF()
+ endif()
+endif()
#-----------------------------------------------------------------------
# The main section of the CMakeLists file
#
#-----------------------------------------------------------------------
-INCLUDE(Source/CMakeVersion.cmake)
+include(Source/CMakeVersion.cmake)
# Releases define a small tweak level.
-IF("${CMake_VERSION_TWEAK}" VERSION_LESS 20000000)
- SET(CMake_VERSION_IS_RELEASE 1)
- SET(CMake_VERSION_SOURCE "")
-ELSE()
- SET(CMake_VERSION_IS_RELEASE 0)
- INCLUDE(${CMake_SOURCE_DIR}/Source/CMakeVersionSource.cmake)
-ENDIF()
+if("${CMake_VERSION_TWEAK}" VERSION_LESS 20000000)
+ set(CMake_VERSION_IS_RELEASE 1)
+ set(CMake_VERSION_SOURCE "")
+else()
+ set(CMake_VERSION_IS_RELEASE 0)
+ include(${CMake_SOURCE_DIR}/Source/CMakeVersionSource.cmake)
+endif()
# Compute the full version string.
-SET(CMake_VERSION ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH})
-IF(${CMake_VERSION_TWEAK} GREATER 0)
- SET(CMake_VERSION ${CMake_VERSION}.${CMake_VERSION_TWEAK})
-ENDIF()
-IF(CMake_VERSION_RC)
- SET(CMake_VERSION ${CMake_VERSION}-rc${CMake_VERSION_RC})
-ENDIF()
-IF(CMake_VERSION_SOURCE)
- SET(CMake_VERSION ${CMake_VERSION}-${CMake_VERSION_SOURCE})
-ENDIF()
+set(CMake_VERSION ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH})
+if(${CMake_VERSION_TWEAK} GREATER 0)
+ set(CMake_VERSION ${CMake_VERSION}.${CMake_VERSION_TWEAK})
+endif()
+if(CMake_VERSION_RC)
+ set(CMake_VERSION ${CMake_VERSION}-rc${CMake_VERSION_RC})
+endif()
+if(CMake_VERSION_SOURCE)
+ set(CMake_VERSION ${CMake_VERSION}-${CMake_VERSION_SOURCE})
+endif()
# Include the standard Dart testing module
-ENABLE_TESTING()
-INCLUDE (${CMAKE_ROOT}/Modules/Dart.cmake)
+enable_testing()
+include (${CMAKE_ROOT}/Modules/Dart.cmake)
# Set up test-time configuration.
-SET_DIRECTORY_PROPERTIES(PROPERTIES
+set_directory_properties(PROPERTIES
TEST_INCLUDE_FILE "${CMake_BINARY_DIR}/Tests/EnforceConfig.cmake")
# where to write the resulting executables and libraries
-SET(BUILD_SHARED_LIBS OFF)
-SET(EXECUTABLE_OUTPUT_PATH "" CACHE INTERNAL "No configurable exe dir.")
-SET(LIBRARY_OUTPUT_PATH "" CACHE INTERNAL
+set(BUILD_SHARED_LIBS OFF)
+set(EXECUTABLE_OUTPUT_PATH "" CACHE INTERNAL "No configurable exe dir.")
+set(LIBRARY_OUTPUT_PATH "" CACHE INTERNAL
"Where to put the libraries for CMake")
# The CMake executables usually do not need any rpath to run in the build or
# install tree.
-SET(CMAKE_SKIP_RPATH ON CACHE INTERNAL "CMake does not need RPATHs.")
+set(CMAKE_SKIP_RPATH ON CACHE INTERNAL "CMake does not need RPATHs.")
-SET(CMAKE_DATA_DIR "/share/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}" CACHE STRING
+set(CMAKE_DATA_DIR "/share/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}" CACHE STRING
"Install location for data (relative to prefix).")
-SET(CMAKE_DOC_DIR "/doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}" CACHE STRING
+set(CMAKE_DOC_DIR "/doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}" CACHE STRING
"Install location for documentation (relative to prefix).")
-SET(CMAKE_MAN_DIR "/man" CACHE STRING
+set(CMAKE_MAN_DIR "/man" CACHE STRING
"Install location for man pages (relative to prefix).")
-MARK_AS_ADVANCED(CMAKE_DATA_DIR CMAKE_DOC_DIR CMAKE_MAN_DIR)
-IF(CYGWIN AND EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
+mark_as_advanced(CMAKE_DATA_DIR CMAKE_DOC_DIR CMAKE_MAN_DIR)
+if(CYGWIN AND EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
# Force doc, data and man dirs to conform to cygwin layout.
- SET(CMAKE_DOC_DIR "/share/doc/cmake-${CMake_VERSION}")
- SET(CMAKE_DATA_DIR "/share/cmake-${CMake_VERSION}")
- SET(CMAKE_MAN_DIR "/share/man")
+ set(CMAKE_DOC_DIR "/share/doc/cmake-${CMake_VERSION}")
+ set(CMAKE_DATA_DIR "/share/cmake-${CMake_VERSION}")
+ set(CMAKE_MAN_DIR "/share/man")
# let the user know we just forced these values
- MESSAGE(STATUS "Setup for Cygwin packaging")
- MESSAGE(STATUS "Override cache CMAKE_DOC_DIR = ${CMAKE_DOC_DIR}")
- MESSAGE(STATUS "Override cache CMAKE_DATA_DIR = ${CMAKE_DATA_DIR}")
- MESSAGE(STATUS "Override cache CMAKE_MAN_DIR = ${CMAKE_MAN_DIR}")
-ENDIF()
-STRING(REGEX REPLACE "^/" "" CMake_DATA_DEST "${CMAKE_DATA_DIR}")
-STRING(REGEX REPLACE "^/" "" CMake_DOC_DEST "${CMAKE_DOC_DIR}")
+ message(STATUS "Setup for Cygwin packaging")
+ message(STATUS "Override cache CMAKE_DOC_DIR = ${CMAKE_DOC_DIR}")
+ message(STATUS "Override cache CMAKE_DATA_DIR = ${CMAKE_DATA_DIR}")
+ message(STATUS "Override cache CMAKE_MAN_DIR = ${CMAKE_MAN_DIR}")
+endif()
+string(REGEX REPLACE "^/" "" CMake_DATA_DEST "${CMAKE_DATA_DIR}")
+string(REGEX REPLACE "^/" "" CMake_DOC_DEST "${CMAKE_DOC_DIR}")
-IF(BUILD_TESTING)
- INCLUDE(${CMake_SOURCE_DIR}/Tests/CMakeInstall.cmake)
-ENDIF()
+if(BUILD_TESTING)
+ include(${CMake_SOURCE_DIR}/Tests/CMakeInstall.cmake)
+endif()
# include special compile flags for some compilers
-INCLUDE(CompileFlags.cmake)
+include(CompileFlags.cmake)
# no clue why we are testing for this here
-INCLUDE(CheckSymbolExists)
+include(CheckSymbolExists)
CHECK_SYMBOL_EXISTS(unsetenv "stdlib.h" HAVE_UNSETENV)
CHECK_SYMBOL_EXISTS(environ "stdlib.h" HAVE_ENVIRON_NOT_REQUIRE_PROTOTYPE)
@@ -507,91 +507,91 @@ CHECK_SYMBOL_EXISTS(environ "stdlib.h" HAVE_ENVIRON_NOT_REQUIRE_PROTOTYPE)
# to a cdash4simpletest database. In these cases, the CDash dashboards
# should be run first.
#
-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")
+if("x${CMAKE_TESTS_CDASH_SERVER}" STREQUAL "x")
+ set(CMAKE_TESTS_CDASH_SERVER "http://www.cdash.org/CDash")
+endif()
-# build the utilities (a macro defined in this file)
+# build the utilities (a macro defined in this file)
CMAKE_BUILD_UTILITIES()
# On NetBSD ncurses is required, since curses doesn't have the wsyncup()
# function. ncurses is installed via pkgsrc, so the library is in /usr/pkg/lib,
-# which isn't in the default linker search path. So without RPATH ccmake
+# which isn't in the default linker search path. So without RPATH ccmake
# doesn't run and the build doesn't succeed since ccmake is executed for
# generating the documentation.
-IF(BUILD_CursesDialog)
- GET_FILENAME_COMPONENT(_CURSES_DIR "${CURSES_LIBRARY}" PATH)
- 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)
+if(BUILD_CursesDialog)
+ get_filename_component(_CURSES_DIR "${CURSES_LIBRARY}" PATH)
+ 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()
+endif()
-IF(BUILD_QtDialog)
- IF(APPLE)
- SET(CMAKE_BUNDLE_NAME
+if(BUILD_QtDialog)
+ if(APPLE)
+ set(CMAKE_BUNDLE_NAME
"CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}-${CMake_VERSION_PATCH}")
- SET(CMAKE_BUNDLE_LOCATION "${CMAKE_INSTALL_PREFIX}")
+ set(CMAKE_BUNDLE_LOCATION "${CMAKE_INSTALL_PREFIX}")
# make sure CMAKE_INSTALL_PREFIX ends in /
- STRING(LENGTH "${CMAKE_INSTALL_PREFIX}" LEN)
- MATH(EXPR LEN "${LEN} -1" )
- STRING(SUBSTRING "${CMAKE_INSTALL_PREFIX}" ${LEN} 1 ENDCH)
- IF(NOT "${ENDCH}" STREQUAL "/")
- SET(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/")
- ENDIF(NOT "${ENDCH}" STREQUAL "/")
- SET(CMAKE_INSTALL_PREFIX
+ string(LENGTH "${CMAKE_INSTALL_PREFIX}" LEN)
+ math(EXPR LEN "${LEN} -1" )
+ string(SUBSTRING "${CMAKE_INSTALL_PREFIX}" ${LEN} 1 ENDCH)
+ if(NOT "${ENDCH}" STREQUAL "/")
+ set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/")
+ endif()
+ set(CMAKE_INSTALL_PREFIX
"${CMAKE_INSTALL_PREFIX}${CMAKE_BUNDLE_NAME}.app/Contents")
- ENDIF(APPLE)
-
- 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()
+
+ 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()
+endif()
# The same might be true on other systems for other libraries.
-# Then only enable RPATH if we have are building at least with cmake 2.4,
+# Then only enable RPATH if we have are building at least with cmake 2.4,
# since this one has much better RPATH features than cmake 2.2.
# The executables are then built with the RPATH for the libraries outside
# the build tree, which is both the build and the install RPATH.
-IF (UNIX)
- IF( CMAKE_USE_SYSTEM_CURL OR CMAKE_USE_SYSTEM_ZLIB
+if (UNIX)
+ if( 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)
- 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
+ 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 (UNIX)
+endif ()
# add the uninstall support
-CONFIGURE_FILE(
+configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
@ONLY)
-ADD_CUSTOM_TARGET(uninstall
+add_custom_target(uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
-INCLUDE (CMakeCPack.cmake)
+include (CMakeCPack.cmake)
# setup some Testing support (a macro defined in this file)
CMAKE_SETUP_TESTING()
-CONFIGURE_FILE(
+configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/DartLocal.conf.in"
"${CMAKE_CURRENT_BINARY_DIR}/DartLocal.conf"
COPYONLY)
-OPTION(CMAKE_STRICT
+option(CMAKE_STRICT
"Perform strict testing to record property and variable access. Can be used to report any undefined properties or variables" OFF)
-MARK_AS_ADVANCED(CMAKE_STRICT)
+mark_as_advanced(CMAKE_STRICT)
# build the remaining subdirectories
-ADD_SUBDIRECTORY(Source)
-ADD_SUBDIRECTORY(Utilities)
-ADD_SUBDIRECTORY(Tests)
+add_subdirectory(Source)
+add_subdirectory(Utilities)
+add_subdirectory(Tests)
if(BUILD_TESTING)
CMAKE_SET_TARGET_FOLDER(CMakeLibTests "Tests")
@@ -600,14 +600,14 @@ CMAKE_SET_TARGET_FOLDER(cmw9xcom "Utilities/Win9xCompat")
CMAKE_SET_TARGET_FOLDER(documentation "Documentation")
# add a test
-ADD_TEST(SystemInformationNew "${CMAKE_CMAKE_COMMAND}"
+add_test(SystemInformationNew "${CMAKE_CMAKE_COMMAND}"
--system-information -G "${CMAKE_TEST_GENERATOR}" )
# Install license file as it requires.
-INSTALL(FILES Copyright.txt DESTINATION ${CMake_DOC_DEST})
+install(FILES Copyright.txt DESTINATION ${CMake_DOC_DEST})
# Install script directories.
-INSTALL(
+install(
DIRECTORY Modules Templates
DESTINATION "${CMake_DATA_DEST}"
FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
@@ -620,7 +620,7 @@ INSTALL(
)
# process docs related install
-ADD_SUBDIRECTORY(Docs)
+add_subdirectory(Docs)
#-----------------------------------------------------------------------
# End of the main section of the CMakeLists file
@@ -631,4 +631,4 @@ ADD_SUBDIRECTORY(Docs)
# to compute the location of the "cmake" executable. We set it here
# so that those CMake versions can find it. We wait until after all
# the add_subdirectory() calls to avoid affecting the subdirectories.
-SET(EXECUTABLE_OUTPUT_PATH ${CMake_BIN_DIR})
+set(EXECUTABLE_OUTPUT_PATH ${CMake_BIN_DIR})
diff --git a/CTestConfig.cmake b/CTestConfig.cmake
index 39032220e..92eacd8e3 100644
--- a/CTestConfig.cmake
+++ b/CTestConfig.cmake
@@ -19,7 +19,7 @@ set(CTEST_DROP_SITE_CDASH TRUE)
set(CTEST_CDASH_VERSION "1.6")
set(CTEST_CDASH_QUERY_VERSION TRUE)
-# use old trigger stuff so that cmake 2.4 and below will not
+# use old trigger stuff so that cmake 2.4 and below will not
# get errors on trigger
-SET (TRIGGER_SITE
+set (TRIGGER_SITE
"http://public.kitware.com/cgi-bin/Submit-CMake-TestingResults.cgi")
diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in
index 982919198..1e6224b4b 100644
--- a/CTestCustom.cmake.in
+++ b/CTestCustom.cmake.in
@@ -1,8 +1,8 @@
-SET(CTEST_CUSTOM_ERROR_MATCH
+set(CTEST_CUSTOM_ERROR_MATCH
${CTEST_CUSTOM_ERROR_MATCH}
"ERROR:")
-SET(CTEST_CUSTOM_WARNING_EXCEPTION
+set(CTEST_CUSTOM_WARNING_EXCEPTION
${CTEST_CUSTOM_WARNING_EXCEPTION}
"xtree.[0-9]+. : warning C4702: unreachable code"
"warning LNK4221"
@@ -56,21 +56,21 @@ SET(CTEST_CUSTOM_WARNING_EXCEPTION
"[0-9,]+ warnings? generated."
)
-IF(NOT "@CMAKE_GENERATOR@" MATCHES "Xcode")
- SET(CTEST_CUSTOM_COVERAGE_EXCLUDE
+if(NOT "@CMAKE_GENERATOR@" MATCHES "Xcode")
+ set(CTEST_CUSTOM_COVERAGE_EXCLUDE
${CTEST_CUSTOM_COVERAGE_EXCLUDE}
"XCode"
)
-ENDIF (NOT "@CMAKE_GENERATOR@" MATCHES "Xcode")
+endif ()
-IF(NOT "@CMAKE_GENERATOR@" MATCHES "KDevelop")
- SET(CTEST_CUSTOM_COVERAGE_EXCLUDE
+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
+set(CTEST_CUSTOM_COVERAGE_EXCLUDE
${CTEST_CUSTOM_COVERAGE_EXCLUDE}
# Exclude kwsys files from coverage results. They are reported
diff --git a/CompileFlags.cmake b/CompileFlags.cmake
index 3b455b96f..b2044e441 100644
--- a/CompileFlags.cmake
+++ b/CompileFlags.cmake
@@ -13,52 +13,52 @@
#-----------------------------------------------------------------------------
# set some special flags for different compilers
#
-IF(CMAKE_GENERATOR MATCHES "Visual Studio 7")
- SET(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
-ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7")
-IF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
- SET(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
-ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
-INCLUDE (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityCXX.cmake)
+if(CMAKE_GENERATOR MATCHES "Visual Studio 7")
+ set(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
+endif()
+if(CMAKE_GENERATOR MATCHES "Visual Studio 6")
+ set(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
+endif()
+include (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityCXX.cmake)
-IF(WIN32 AND "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$")
- SET(_INTEL_WINDOWS 1)
-ENDIF()
+if(WIN32 AND "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$")
+ set(_INTEL_WINDOWS 1)
+endif()
# Disable deprecation warnings for standard C functions.
# really only needed for newer versions of VS, but should
-# not hurt other versions, and this will work into the
+# not hurt other versions, and this will work into the
# future
-IF(MSVC OR _INTEL_WINDOWS)
- ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
-ELSE()
-ENDIF()
+if(MSVC OR _INTEL_WINDOWS)
+ add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
+else()
+endif()
#silence duplicate symbol warnings on AIX
-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.*")
+if(CMAKE_SYSTEM MATCHES "AIX.*")
+ if(NOT CMAKE_COMPILER_IS_GNUCXX)
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -bhalt:5 ")
+ 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.*")
+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()
+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.*")
+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()
+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)
+if (CMAKE_ANSI_CXXFLAGS)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}")
+endif ()
-IF (CMAKE_ANSI_CFLAGS)
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}")
-ENDIF (CMAKE_ANSI_CFLAGS)
+if (CMAKE_ANSI_CFLAGS)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}")
+endif ()
diff --git a/Docs/CMakeLists.txt b/Docs/CMakeLists.txt
index b04b32d5e..a5e91c9d1 100644
--- a/Docs/CMakeLists.txt
+++ b/Docs/CMakeLists.txt
@@ -1,4 +1,4 @@
string(REGEX REPLACE "^/(.*)" "\\1" REL_CMAKE_DATA_DIR "${CMAKE_DATA_DIR}")
install(FILES cmake-help.vim cmake-indent.vim cmake-syntax.vim DESTINATION ${REL_CMAKE_DATA_DIR}/editors/vim)
install(FILES cmake-mode.el DESTINATION ${REL_CMAKE_DATA_DIR}/editors/emacs)
-ADD_SUBDIRECTORY (bash-completion)
+add_subdirectory (bash-completion)
diff --git a/Docs/cmake-indent.vim b/Docs/cmake-indent.vim
index f149873ed..a26dd06a2 100644
--- a/Docs/cmake-indent.vim
+++ b/Docs/cmake-indent.vim
@@ -1,11 +1,11 @@
" =============================================================================
-"
+"
" Program: CMake - Cross-Platform Makefile Generator
" Module: $RCSfile$
" Language: VIM
" Date: $Date$
" Version: $Revision$
-"
+"
" =============================================================================
" Vim indent file
diff --git a/Docs/cmake-mode.el b/Docs/cmake-mode.el
index 951745515..478bc7abe 100644
--- a/Docs/cmake-mode.el
+++ b/Docs/cmake-mode.el
@@ -34,7 +34,7 @@
;; cmake executable variable used to run cmake --help-command
;; on commands in cmake-mode
;;
-;; cmake-command-help Written by James Bigler
+;; cmake-command-help Written by James Bigler
;;
(defcustom cmake-mode-cmake-executable "cmake"
@@ -191,11 +191,11 @@ the indentation. Otherwise it retains the same position on the line"
(setq save-point (point))
(goto-char (point-min))
(while (re-search-forward "^\\([ \t]*\\)\\(\\w+\\)\\([ \t]*(\\)" nil t)
- (replace-match
- (concat
- (match-string 1)
- (downcase (match-string 2))
- (match-string 3))
+ (replace-match
+ (concat
+ (match-string 1)
+ (downcase (match-string 2))
+ (match-string 3))
t))
(goto-char save-point)
)
diff --git a/Docs/cmake-syntax.vim b/Docs/cmake-syntax.vim
index 80b348eef..80395ab1a 100644
--- a/Docs/cmake-syntax.vim
+++ b/Docs/cmake-syntax.vim
@@ -36,9 +36,9 @@ syn region cmakeVariableValue start=/\${/ end=/}/
\ contained oneline contains=CONTAINED,cmakeTodo
syn region cmakeEnvironment start=/\$ENV{/ end=/}/
\ contained oneline contains=CONTAINED,cmakeTodo
-syn region cmakeString start=/"/ end=/"/
+syn region cmakeString start=/"/ end=/"/
\ contains=CONTAINED,cmakeTodo,cmakeOperators
-syn region cmakeArguments start=/(/ end=/)/
+syn region cmakeArguments start=/(/ end=/)/
\ contains=ALLBUT,cmakeArguments,cmakeTodo
syn keyword cmakeSystemVariables
\ WIN32 UNIX APPLE CYGWIN BORLAND MINGW MSVC MSVC_IDE MSVC60 MSVC70 MSVC71 MSVC80 MSVC90
@@ -49,11 +49,11 @@ syn keyword cmakeDeprecated ABSTRACT_FILES BUILD_NAME SOURCE_FILES SOURCE_FILES_
\ nextgroup=cmakeArguments
" The keywords are generated as: cmake --help-command-list | tr "\n" " "
-syn keyword cmakeStatement
+syn keyword cmakeStatement
\ ADD_CUSTOM_COMMAND ADD_CUSTOM_TARGET ADD_DEFINITIONS ADD_DEPENDENCIES ADD_EXECUTABLE ADD_LIBRARY ADD_SUBDIRECTORY ADD_TEST AUX_SOURCE_DIRECTORY BUILD_COMMAND BUILD_NAME CMAKE_MINIMUM_REQUIRED CONFIGURE_FILE CREATE_TEST_SOURCELIST ELSE ELSEIF ENABLE_LANGUAGE ENABLE_TESTING ENDFOREACH ENDFUNCTION ENDIF ENDMACRO ENDWHILE EXEC_PROGRAM EXECUTE_PROCESS EXPORT_LIBRARY_DEPENDENCIES FILE FIND_FILE FIND_LIBRARY FIND_PACKAGE FIND_PATH FIND_PROGRAM FLTK_WRAP_UI FOREACH FUNCTION GET_CMAKE_PROPERTY GET_DIRECTORY_PROPERTY GET_FILENAME_COMPONENT GET_SOURCE_FILE_PROPERTY GET_TARGET_PROPERTY GET_TEST_PROPERTY IF INCLUDE INCLUDE_DIRECTORIES INCLUDE_EXTERNAL_MSPROJECT INCLUDE_REGULAR_EXPRESSION INSTALL INSTALL_FILES INSTALL_PROGRAMS INSTALL_TARGETS LINK_DIRECTORIES LINK_LIBRARIES LIST LOAD_CACHE LOAD_COMMAND MACRO MAKE_DIRECTORY MARK_AS_ADVANCED MATH MESSAGE OPTION OUTPUT_REQUIRED_FILES PROJECT QT_WRAP_CPP QT_WRAP_UI REMOVE REMOVE_DEFINITIONS SEPARATE_ARGUMENTS SET SET_DIRECTORY_PROPERTIES SET_SOURCE_FILES_PROPERTIES SET_TARGET_PROPERTIES SET_TESTS_PROPERTIES SITE_NAME SOURCE_GROUP STRING SUBDIR_DEPENDS SUBDIRS TARGET_LINK_LIBRARIES TRY_COMPILE TRY_RUN UNSET USE_MANGLED_MESA UTILITY_SOURCE VARIABLE_REQUIRES VTK_MAKE_INSTANTIATOR VTK_WRAP_JAVA VTK_WRAP_PYTHON VTK_WRAP_TCL WHILE WRITE_FILE
\ nextgroup=cmakeArguments
-syn keyword cmakeTodo
- \ TODO FIXME XXX
+syn keyword cmakeTodo
+ \ TODO FIXME XXX
\ contained
" Define the default highlighting.
diff --git a/Example/Demo/demo.cxx b/Example/Demo/demo.cxx
index 31de0386c..815c8149e 100644
--- a/Example/Demo/demo.cxx
+++ b/Example/Demo/demo.cxx
@@ -5,6 +5,6 @@ extern Hello hello;
int main()
{
hello.Print();
-
+
return 0;
}
diff --git a/Modules/AddFileDependencies.cmake b/Modules/AddFileDependencies.cmake
index f971e37f5..e88025c14 100644
--- a/Modules/AddFileDependencies.cmake
+++ b/Modules/AddFileDependencies.cmake
@@ -15,15 +15,15 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-MACRO(ADD_FILE_DEPENDENCIES _file)
+macro(ADD_FILE_DEPENDENCIES _file)
- GET_SOURCE_FILE_PROPERTY(_deps ${_file} OBJECT_DEPENDS)
- IF (_deps)
- SET(_deps ${_deps} ${ARGN})
- ELSE (_deps)
- SET(_deps ${ARGN})
- ENDIF (_deps)
+ get_source_file_property(_deps ${_file} OBJECT_DEPENDS)
+ if (_deps)
+ set(_deps ${_deps} ${ARGN})
+ else ()
+ set(_deps ${ARGN})
+ endif ()
- SET_SOURCE_FILES_PROPERTIES(${_file} PROPERTIES OBJECT_DEPENDS "${_deps}")
+ 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/CMakeASM-ATTInformation.cmake b/Modules/CMakeASM-ATTInformation.cmake
index cb1f5d69c..675c13bb3 100644
--- a/Modules/CMakeASM-ATTInformation.cmake
+++ b/Modules/CMakeASM-ATTInformation.cmake
@@ -14,12 +14,12 @@
# support for AT&T syntax assemblers, e.g. GNU as
-SET(ASM_DIALECT "-ATT")
+set(ASM_DIALECT "-ATT")
# *.S files are supposed to be preprocessed, so they should not be passed to
# assembler but should be processed by gcc
-SET(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS s;asm)
+set(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS s;asm)
-SET(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT " -o