summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Docs/cmake-mode.el4
-rw-r--r--Modules/CMakeCCompilerId.c.in6
-rw-r--r--Modules/CMakeCXXCompilerId.cpp.in6
-rw-r--r--Modules/CPack.cmake184
-rw-r--r--Modules/CPackBundle.cmake29
-rw-r--r--Modules/CPackCygwin.cmake33
-rw-r--r--Modules/CPackDMG.cmake58
-rw-r--r--Modules/CheckCCompilerFlag.cmake1
-rw-r--r--Modules/CheckCXXCompilerFlag.cmake1
-rw-r--r--Modules/FindHSPELL.cmake5
-rw-r--r--Modules/FindOpenMP.cmake12
-rw-r--r--Modules/FindOpenSceneGraph.cmake10
-rw-r--r--Modules/FindPythonInterp.cmake4
-rw-r--r--Modules/FindPythonLibs.cmake70
-rw-r--r--Modules/GenerateExportHeader.cmake46
-rw-r--r--Modules/Platform/Windows-Borland-C.cmake3
-rw-r--r--Modules/Platform/Windows-Borland-CXX.cmake3
-rw-r--r--Modules/Platform/Windows-Embarcadero-C.cmake3
-rw-r--r--Modules/Platform/Windows-Embarcadero-CXX.cmake3
-rw-r--r--Modules/Platform/Windows-Embarcadero.cmake (renamed from Modules/Platform/Windows-Borland.cmake)58
-rw-r--r--Modules/UseSWIG.cmake13
-rw-r--r--Source/CPack/cmCPackDocumentVariables.cxx64
-rw-r--r--Source/cmFindProgramCommand.cxx3
-rw-r--r--Source/kwsys/kwsysDateStamp.cmake4
-rw-r--r--Templates/CPackConfig.cmake.in33
-rw-r--r--cmake.1112
26 files changed, 399 insertions, 369 deletions
diff --git a/Docs/cmake-mode.el b/Docs/cmake-mode.el
index 4418bfa..9517455 100644
--- a/Docs/cmake-mode.el
+++ b/Docs/cmake-mode.el
@@ -68,9 +68,9 @@ set the path with these commands:
"\\|" "[ \t\r\n]"
"\\)*"))
(defconst cmake-regex-block-open
- "^\\(IF\\|MACRO\\|FOREACH\\|ELSE\\|ELSEIF\\|WHILE\\|FUNCTION\\)$")
+ "^\\([iI][fF]\\|[mM][aA][cC][rR][oO]\\|[fF][oO][rR][eE][aA][cC][hH]\\|[eE][lL][sS][eE]\\|[eE][lL][sS][eE][iI][fF]\\|[wW][hH][iI][lL][eE]\\|[fF][uU][nN][cC][tT][iI][oO][nN]\\)$")
(defconst cmake-regex-block-close
- "^[ \t]*\\(ENDIF\\|ENDFOREACH\\|ENDMACRO\\|ELSE\\|ELSEIF\\|ENDWHILE\\|ENDFUNCTION\\)[ \t]*(")
+ "^[ \t]*\\([eE][nN][dD][iI][fF]\\|[eE][nN][dD][fF][oO][rR][eE][aA][cC][hH]\\|[eE][nN][dD][mM][aA][cC][rR][oO]\\|[eE][lL][sS][eE]\\|[eE][lL][sS][eE][iI][fF]\\|[eE][nN][dD][wW][hH][iI][lL][eE]\\|[eE][nN][dD][fF][uU][nN][cC][tT][iI][oO][nN]\\)[ \t]*(")
;------------------------------------------------------------------------------
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in
index b0f5eb6..06aa9bf 100644
--- a/Modules/CMakeCCompilerId.c.in
+++ b/Modules/CMakeCCompilerId.c.in
@@ -26,6 +26,12 @@
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
+#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
+# define COMPILER_ID "Embarcadero"
+# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
+# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
+# define COMPILER_VERSION_PATCH HEX(__CODEGEARC_VERSION__ & 0xFFFF)
+
#elif defined(__BORLANDC__)
# define COMPILER_ID "Borland"
/* __BORLANDC__ = 0xVRR */
diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in
index 927f7f4..95fc852 100644
--- a/Modules/CMakeCXXCompilerId.cpp.in
+++ b/Modules/CMakeCXXCompilerId.cpp.in
@@ -28,6 +28,12 @@
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
+#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
+# define COMPILER_ID "Embarcadero"
+# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
+# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
+# define COMPILER_VERSION_PATCH HEX(__CODEGEARC_VERSION__ & 0xFFFF)
+
#elif defined(__BORLANDC__)
# define COMPILER_ID "Borland"
/* __BORLANDC__ = 0xVRR */
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index e0a5518..b506711 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -53,176 +53,198 @@
##end
#
##variable
-# CPACK_PACKAGE_NAME - The name of the package (or application). If
-# not specified, defaults to the project name.
+# CPACK_PACKAGE_NAME - The name of the package (or application). If
+# not specified, defaults to the project name.
##end
#
##variable
-# CPACK_PACKAGE_VENDOR - The name of the package vendor. (e.g.,
-# "Kitware").
+# CPACK_PACKAGE_VENDOR - The name of the package vendor. (e.g.,
+# "Kitware").
##end
#
##variable
-# CPACK_PACKAGE_VERSION_MAJOR - Package major Version
+# CPACK_PACKAGE_VERSION_MAJOR - Package major Version
##end
#
##variable
-# CPACK_PACKAGE_VERSION_MINOR - Package minor Version
+# CPACK_PACKAGE_VERSION_MINOR - Package minor Version
##end
#
##variable
-# CPACK_PACKAGE_VERSION_PATCH - Package patch Version
+# CPACK_PACKAGE_VERSION_PATCH - Package patch Version
##end
#
##variable
-# CPACK_PACKAGE_DESCRIPTION_FILE - A text file used to describe the
-# project. Used, for example, the introduction screen of a
-# CPack-generated Windows installer to describe the project.
+# CPACK_PACKAGE_DESCRIPTION_FILE - A text file used to describe the
+# project. Used, for example, the introduction screen of a
+# CPack-generated Windows installer to describe the project.
##end
#
##variable
-# CPACK_PACKAGE_DESCRIPTION_SUMMARY - Short description of the
-# project (only a few words).
+# CPACK_PACKAGE_DESCRIPTION_SUMMARY - Short description of the
+# project (only a few words).
##end
#
##variable
-# CPACK_PACKAGE_FILE_NAME - The name of the package file to generate,
-# not including the extension. For example, cmake-2.6.1-Linux-i686.
+# CPACK_PACKAGE_FILE_NAME - The name of the package file to generate,
+# not including the extension. For example, cmake-2.6.1-Linux-i686.
+# The default value is
+# ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}.
##end
#
##variable
-# CPACK_PACKAGE_INSTALL_DIRECTORY - Installation directory on the
-# target system, e.g., "CMake 2.5".
+# CPACK_PACKAGE_INSTALL_DIRECTORY - Installation directory on the
+# target system. This may be used by some CPack generators
+# like NSIS to create an installation directory e.g., "CMake 2.5"
+# below the installation prefix. All installed element will be
+# put inside this directory.
##end
#
##variable
-# CPACK_PROJECT_CONFIG_FILE - File included at cpack time, once per
-# generator after setting CPACK_GENERATOR to the actual generator
-# being used. Allows per-generator setting of CPACK_* variables at
-# cpack time.
+# CPACK_PROJECT_CONFIG_FILE - CPack-time project CPack configuration
+# file. This file included at cpack time, once per
+# generator after CPack has set CPACK_GENERATOR to the actual generator
+# being used. It allows per-generator setting of CPACK_* variables at
+# cpack time.
##end
#
##variable
-# CPACK_RESOURCE_FILE_LICENSE - License file for the project, which
-# will typically be displayed to the user (often with an explicit
-# "Accept" button, for graphical installers) prior to installation.
+# CPACK_RESOURCE_FILE_LICENSE - License to be embedded in the installer. It
+# will typically be displayed to the user by the produced installer
+# (often with an explicit "Accept" button, for graphical installers)
+# prior to installation. This license file is NOT added to installed
+# file but is used by some CPack generators like NSIS. If you want
+# to install a license file (may be the same as this one)
+# along with your project you must add an appropriate CMake INSTALL
+# command in your CMakeLists.txt.
##end
#
##variable
-# CPACK_RESOURCE_FILE_README - ReadMe file for the project, which
-# typically describes in some detail
+# CPACK_RESOURCE_FILE_README - ReadMe file to be embedded in the installer. It
+# typically describes in some detail the purpose of the project
+# during the installation. Not all CPack generators uses
+# this file.
##end
#
##variable
-# CPACK_RESOURCE_FILE_WELCOME - Welcome file for the project, which
-# welcomes users to this installer. Typically used in the graphical
-# installers on Windows and Mac OS X.
+# CPACK_RESOURCE_FILE_WELCOME - Welcome file to be embedded in the
+# installer. It welcomes users to this installer.
+# Typically used in the graphical installers on Windows and Mac OS X.
##end
#
##variable
-# CPACK_MONOLITHIC_INSTALL - Disables the component-based
-# installation mechanism, so that all components are always installed.
+# CPACK_MONOLITHIC_INSTALL - Disables the component-based
+# installation mechanism. When set the component specification is ignored
+# and all installed items are put in a single "MONOLITHIC" package.
+# Some CPack generators do monolithic packaging by default and
+# may be asked to do component packaging by setting
+# CPACK_<GENNAME>_COMPONENT_INSTALL to 1/TRUE.
##end
#
##variable
-# CPACK_GENERATOR - List of CPack generators to use. If not
-# specified, CPack will create a set of options (e.g.,
-# CPACK_BINARY_NSIS) allowing the user to enable/disable individual
-# generators.
+# CPACK_GENERATOR - List of CPack generators to use. If not
+# specified, CPack will create a set of options CPACK_BINARY_<GENNAME> (e.g.,
+# CPACK_BINARY_NSIS) allowing the user to enable/disable individual
+# generators. This variable may be used on the command line
+# as well as in:
+#
+# cpack -D CPACK_GENERATOR="ZIP;TGZ" /path/to/build/tree
##end
#
##variable
-# CPACK_OUTPUT_CONFIG_FILE - The name of the CPack configuration file
-# for binary installers that will be generated by the CPack
-# module. Defaults to CPackConfig.cmake.
+# CPACK_OUTPUT_CONFIG_FILE - The name of the CPack binary configuration
+# file. This file is the CPack configuration generated by the CPack module
+# for binary installers. Defaults to CPackConfig.cmake.
##end
#
##variable
-# CPACK_PACKAGE_EXECUTABLES - Lists each of the executables along
-# with a text label, to be used to create Start Menu shortcuts on
-# Windows. For example, setting this to the list ccmake;CMake will
-# create a shortcut named "CMake" that will execute the installed
-# executable ccmake.
+# CPACK_PACKAGE_EXECUTABLES - Lists each of the executables and associated
+# text label to be used to create Start Menu shortcuts. For example,
+# setting this to the list ccmake;CMake will
+# create a shortcut named "CMake" that will execute the installed
+# executable ccmake. Not all CPack generators use it (at least NSIS and
+# OSXX11 do).
##end
#
##variable
-# CPACK_STRIP_FILES - List of files to be stripped. Starting with
-# CMake 2.6.0 CPACK_STRIP_FILES will be a boolean variable which
-# enables stripping of all files (a list of files evaluates to TRUE
-# in CMake, so this change is compatible).
+# CPACK_STRIP_FILES - List of files to be stripped. Starting with
+# CMake 2.6.0 CPACK_STRIP_FILES will be a boolean variable which
+# enables stripping of all files (a list of files evaluates to TRUE
+# in CMake, so this change is compatible).
##end
#
# The following CPack variables are specific to source packages, and
# will not affect binary packages:
#
##variable
-# CPACK_SOURCE_PACKAGE_FILE_NAME - The name of the source package,
-# e.g., cmake-2.6.1
+# CPACK_SOURCE_PACKAGE_FILE_NAME - The name of the source package. For
+# example cmake-2.6.1.
##end
#
##variable
-# CPACK_SOURCE_STRIP_FILES - List of files in the source tree that
-# will be stripped. Starting with CMake 2.6.0
-# CPACK_SOURCE_STRIP_FILES will be a boolean variable which enables
-# stripping of all files (a list of files evaluates to TRUE in CMake,
-# so this change is compatible).
+# CPACK_SOURCE_STRIP_FILES - List of files in the source tree that
+# will be stripped. Starting with CMake 2.6.0
+# CPACK_SOURCE_STRIP_FILES will be a boolean variable which enables
+# stripping of all files (a list of files evaluates to TRUE in CMake,
+# so this change is compatible).
##end
#
##variable
-# CPACK_SOURCE_GENERATOR - List of generators used for the source
-# packages. As with CPACK_GENERATOR, if this is not specified then
-# CPack will create a set of options (e.g., CPACK_SOURCE_ZIP)
-# allowing users to select which packages will be generated.
+# CPACK_SOURCE_GENERATOR - List of generators used for the source
+# packages. As with CPACK_GENERATOR, if this is not specified then
+# CPack will create a set of options (e.g., CPACK_SOURCE_ZIP)
+# allowing users to select which packages will be generated.
##end
#
##variable
-# CPACK_SOURCE_OUTPUT_CONFIG_FILE - The name of the CPack
-# configuration file for source installers that will be generated by
-# the CPack module. Defaults to CPackSourceConfig.cmake.
+# CPACK_SOURCE_OUTPUT_CONFIG_FILE - The name of the CPack source
+# configuration file. This file is the CPack configuration generated by the
+# CPack module for source installers. Defaults to CPackSourceConfig.cmake.
##end
#
##variable
-# CPACK_SOURCE_IGNORE_FILES - Pattern of files in the source tree
-# that won't be packaged when building a source package. This is a
-# list of patterns, e.g., /CVS/;/\\.svn/;\\.swp$;\\.#;/#;.*~;cscope.*
+# CPACK_SOURCE_IGNORE_FILES - Pattern of files in the source tree
+# that won't be packaged when building a source package. This is a
+# list of regular expression patterns (that must be properly escaped),
+# e.g., /CVS/;/\\.svn/;\\.swp$;\\.#;/#;.*~;cscope.*
##end
#
# The following variables are for advanced uses of CPack:
#
##variable
-# CPACK_CMAKE_GENERATOR - What CMake generator should be used if the
-# project is CMake project. Defaults to the value of CMAKE_GENERATOR;
-# few users will want to change this setting.
+# CPACK_CMAKE_GENERATOR - What CMake generator should be used if the
+# project is CMake project. Defaults to the value of CMAKE_GENERATOR
+# few users will want to change this setting.
##end
#
##variable
-# CPACK_INSTALL_CMAKE_PROJECTS - List of four values that specify
-# what project to install. The four values are: Build directory,
-# Project Name, Project Component, Directory. If omitted, CPack will
-# build an installer that installers everything.
+# CPACK_INSTALL_CMAKE_PROJECTS - List of four values that specify
+# what project to install. The four values are: Build directory,
+# Project Name, Project Component, Directory. If omitted, CPack will
+# build an installer that installers everything.
##end
#
##variable
-# CPACK_SYSTEM_NAME - System name, defaults to the value of
-# ${CMAKE_SYSTEM_NAME}.
+# CPACK_SYSTEM_NAME - System name, defaults to the value of
+# ${CMAKE_SYSTEM_NAME}.
##end
#
##variable
-# CPACK_PACKAGE_VERSION - Package full version, used internally. By
-# default, this is built from CPACK_PACKAGE_VERSION_MAJOR,
-# CPACK_PACKAGE_VERSION_MINOR, and CPACK_PACKAGE_VERSION_PATCH.
+# CPACK_PACKAGE_VERSION - Package full version, used internally. By
+# default, this is built from CPACK_PACKAGE_VERSION_MAJOR,
+# CPACK_PACKAGE_VERSION_MINOR, and CPACK_PACKAGE_VERSION_PATCH.
##end
#
##variable
-# CPACK_TOPLEVEL_TAG - Directory for the installed files.
+# CPACK_TOPLEVEL_TAG - Directory for the installed files.
##end
#
##variable
-# CPACK_INSTALL_COMMANDS - Extra commands to install components.
+# CPACK_INSTALL_COMMANDS - Extra commands to install components.
##end
#
##variable
-# CPACK_INSTALLED_DIRECTORIES - Extra directories to install.
+# CPACK_INSTALLED_DIRECTORIES - Extra directories to install.
##end
#
@@ -358,6 +380,12 @@ macro(cpack_optional_append _list _cond _item)
endif(${_cond})
endmacro(cpack_optional_append _list _cond _item)
+##variable
+# CPACK_BINARY_<GENNAME> - CPack generated options for binary generators. The
+# CPack.cmake module generates (when CPACK_GENERATOR is not set)
+# a set of CMake options (see CMake option command) which may then be used to
+# select the CPack generator(s) to be used when launching the package target.
+##end
# Provide options to choose generators
# we might check here if the required tools for the generates exist
# and set the defaults according to the results
diff --git a/Modules/CPackBundle.cmake b/Modules/CPackBundle.cmake
index 007fc04..0da51e3 100644
--- a/Modules/CPackBundle.cmake
+++ b/Modules/CPackBundle.cmake
@@ -4,33 +4,32 @@
# - CPack Bundle generator (Mac OS X) specific options
#
# Installers built on Mac OS X using the Bundle generator use the
-# aforementioned DragNDrop variables, plus the following Bundle-specific
-# parameters:
+# aforementioned DragNDrop (CPACK_DMG_xxx) variables, plus
+# the following Bundle-specific parameters (CPACK_BUNDLE_xxx).
##end
#
##variable
-# CPACK_BUNDLE_NAME - The name of the generated bundle. This
-# appears in the OSX finder as the bundle name. Required.
+# CPACK_BUNDLE_NAME - The name of the generated bundle. This
+# appears in the OSX finder as the bundle name. Required.
##end
#
##variable
-# CPACK_BUNDLE_PLIST - Path to an OSX plist file that will be used
-# as the Info.plist for the generated bundle. This assumes that
-# the caller has generated or specified their own Info.plist file.
-# Required.
+# CPACK_BUNDLE_PLIST - Path to an OSX plist file that will be used
+# for the generated bundle. This assumes that the caller has generated
+# or specified their own Info.plist file. Required.
##end
#
##variable
-# CPACK_BUNDLE_ICON - Path to an OSX icns file that will be used as
-# the icon for the generated bundle. This is the icon that appears
-# in the OSX finder for the bundle, and in the OSX dock when the
-# bundle is opened. Required.
+# CPACK_BUNDLE_ICON - Path to an OSX icon file that will be used as
+# the icon for the generated bundle. This is the icon that appears in the
+# OSX finder for the bundle, and in the OSX dock when the bundle is opened.
+# Required.
##end
#
##variable
-# CPACK_BUNDLE_STARTUP_SCRIPT - Path to an executable or script that
-# will be run whenever an end-user double-clicks the generated bundle
-# in the OSX Finder. Optional.
+# CPACK_BUNDLE_STARTUP_COMMAND - Path to a startup script. This is a path to
+# an executable or script that will be run whenever an end-user double-clicks
+# the generated bundle in the OSX Finder. Optional.
##end
#=============================================================================
diff --git a/Modules/CPackCygwin.cmake b/Modules/CPackCygwin.cmake
new file mode 100644
index 0000000..7ed7f67
--- /dev/null
+++ b/Modules/CPackCygwin.cmake
@@ -0,0 +1,33 @@
+##section Variables specific to CPack Cygwin generator
+##end
+##module
+# - Cygwin CPack generator (Cygwin).
+# The following variable is specific to installers build on
+# and/or for Cygwin:
+##end
+#
+##variable
+# CPACK_CYGWIN_PATCH_NUMBER - The Cygwin patch number.
+# FIXME: This documentation is incomplete.
+##end
+##variable
+# CPACK_CYGWIN_PATCH_FILE - The Cygwin patch file.
+# FIXME: This documentation is incomplete.
+##end
+##variable
+# CPACK_CYGWIN_BUILD_SCRIPT - The Cygwin build script.
+# FIXME: This documentation is incomplete.
+##end
+
+#=============================================================================
+# Copyright 2006-2012 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
diff --git a/Modules/CPackDMG.cmake b/Modules/CPackDMG.cmake
index caa8dc8..e866bab 100644
--- a/Modules/CPackDMG.cmake
+++ b/Modules/CPackDMG.cmake
@@ -7,53 +7,53 @@
##end
#
##variable
-# CPACK_DMG_VOLUME_NAME - The volume name of the generated disk
-# image. Defaults to CPACK_PACKAGE_FILE_NAME.
+# CPACK_DMG_VOLUME_NAME - The volume name of the generated disk
+# image. Defaults to CPACK_PACKAGE_FILE_NAME.
##end
#
##variable
-# CPACK_DMG_FORMAT - The disk image format. Common values are UDRO
-# (UDIF read-only), UDZO (UDIF zlib-compressed) or UDBZ (UDIF
-# bzip2-compressed). Refer to hdiutil(1) for more information on
-# other available formats.
+# CPACK_DMG_FORMAT - The disk image format. Common values are UDRO
+# (UDIF read-only), UDZO (UDIF zlib-compressed) or UDBZ (UDIF
+# bzip2-compressed). Refer to hdiutil(1) for more information on
+# other available formats.
##end
#
##variable
-# CPACK_DMG_DS_STORE - Path to a custom .DS_Store file which e.g.
-# can be used to specify the Finder window position/geometry and
-# layout (such as hidden toolbars, placement of the icons etc.).
-# This file has to be generated by the Finder (either manually or
-# through OSA-script) using a normal folder from which the .DS_Store
-# file can then be extracted.
+# CPACK_DMG_DS_STORE - Path to a custom DS_Store file. This .DS_Store
+# file e.g. can be used to specify the Finder window
+# position/geometry and layout (such as hidden toolbars, placement of the
+# icons etc.). This file has to be generated by the Finder (either manually or
+# through OSA-script) using a normal folder from which the .DS_Store
+# file can then be extracted.
##end
#
##variable
-# CPACK_DMG_BACKGROUND_IMAGE - Path to an image file which is to be
-# used as the background for the Finder Window when the disk image
-# is opened. By default no background image is set. The background
-# image is applied after applying the custom .DS_Store file.
+# CPACK_DMG_BACKGROUND_IMAGE - Path to a background image file. This
+# file will be used as the background for the Finder Window when the disk
+# image is opened. By default no background image is set. The background
+# image is applied after applying the custom .DS_Store file.
##end
#
##variable
-# CPACK_COMMAND_HDIUTIL - Path to the hdiutil(1) command used to
-# operate on disk image files on Mac OS X. This variable can be used
-# to override the automatically detected command (or specify its
-# location if the auto-detection fails to find it.)
+# CPACK_COMMAND_HDIUTIL - Path to the hdiutil(1) command used to
+# operate on disk image files on Mac OS X. This variable can be used
+# to override the automatically detected command (or specify its
+# location if the auto-detection fails to find it.)
##end
#
##variable
-# CPACK_COMMAND_SETFILE - Path to the SetFile(1) command used to set
-# extended attributes on files and directories on Mac OS X. This
-# variable can be used to override the automatically detected
-# command (or specify its location if the auto-detection fails to
-# find it.)
+# CPACK_COMMAND_SETFILE - Path to the SetFile(1) command used to set
+# extended attributes on files and directories on Mac OS X. This
+# variable can be used to override the automatically detected
+# command (or specify its location if the auto-detection fails to
+# find it.)
##end
#
##variable
-# CPACK_COMMAND_REZ - Path to the Rez(1) command used to compile
-# resources on Mac OS X. This variable can be used to override the
-# automatically detected command (or specify its location if the
-# auto-detection fails to find it.)
+# CPACK_COMMAND_REZ - Path to the Rez(1) command used to compile
+# resources on Mac OS X. This variable can be used to override the
+# automatically detected command (or specify its location if the
+# auto-detection fails to find it.)
##end
#=============================================================================
diff --git a/Modules/CheckCCompilerFlag.cmake b/Modules/CheckCCompilerFlag.cmake
index 3618bdf..1c08c59 100644
--- a/Modules/CheckCCompilerFlag.cmake
+++ b/Modules/CheckCCompilerFlag.cmake
@@ -33,6 +33,7 @@ MACRO (CHECK_C_COMPILER_FLAG _FLAG _RESULT)
FAIL_REGEX "unknown .*option" # Clang
FAIL_REGEX "ignoring unknown option" # MSVC
FAIL_REGEX "warning D9002" # MSVC, any lang
+ FAIL_REGEX "option .*not supported" # Intel
FAIL_REGEX "[Uu]nknown option" # HP
FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro
FAIL_REGEX "command option .* is not recognized" # XL
diff --git a/Modules/CheckCXXCompilerFlag.cmake b/Modules/CheckCXXCompilerFlag.cmake
index 134f875..6fa69b1 100644
--- a/Modules/CheckCXXCompilerFlag.cmake
+++ b/Modules/CheckCXXCompilerFlag.cmake
@@ -33,6 +33,7 @@ MACRO (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT)
FAIL_REGEX "unknown .*option" # Clang
FAIL_REGEX "ignoring unknown option" # MSVC
FAIL_REGEX "warning D9002" # MSVC, any lang
+ FAIL_REGEX "option .*not supported" # Intel
FAIL_REGEX "[Uu]nknown option" # HP
FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro
FAIL_REGEX "command option .* is not recognized" # XL
diff --git a/Modules/FindHSPELL.cmake b/Modules/FindHSPELL.cmake
index 054f565..ca5709b 100644
--- a/Modules/FindHSPELL.cmake
+++ b/Modules/FindHSPELL.cmake
@@ -32,12 +32,15 @@ IF (HSPELL_INCLUDE_DIR)
FILE(READ "${HSPELL_INCLUDE_DIR}/hspell.h" HSPELL_H)
STRING(REGEX REPLACE ".*#define HSPELL_VERSION_MAJOR ([0-9]+).*" "\\1" HSPELL_VERSION_MAJOR "${HSPELL_H}")
STRING(REGEX REPLACE ".*#define HSPELL_VERSION_MINOR ([0-9]+).*" "\\1" HSPELL_VERSION_MINOR "${HSPELL_H}")
+ SET(HSPELL_VERSION_STRING "${HSPELL_VERSION_MAJOR}.${HSPELL_VERSION_MINOR}")
ENDIF()
# handle the QUIETLY and REQUIRED arguments and set HSPELL_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(HSPELL DEFAULT_MSG HSPELL_LIBRARIES HSPELL_INCLUDE_DIR)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(HSPELL
+ REQUIRED_VARS HSPELL_LIBRARIES HSPELL_INCLUDE_DIR
+ VERSION_VAR HSPELL_VERSION_STRING)
MARK_AS_ADVANCED(HSPELL_INCLUDE_DIR HSPELL_LIBRARIES)
diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake
index e1af15e..b96a2ec 100644
--- a/Modules/FindOpenMP.cmake
+++ b/Modules/FindOpenMP.cmake
@@ -25,11 +25,6 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-get_property(_ENABLED_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
-list(FIND _ENABLED_LANGUAGES "C" _HAVE_LANGUAGE_C)
-list(FIND _ENABLED_LANGUAGES "CXX" _HAVE_LANGUAGE_CXX)
-unset(_ENABLED_LANGUAGES)
-
set(_OPENMP_REQUIRED_VARS)
function(_OPENMP_FLAG_CANDIDATES LANG)
@@ -93,7 +88,7 @@ int main() {
")
# check c compiler
-if(NOT _HAVE_LANGUAGE_C EQUAL -1)
+if(CMAKE_C_COMPILER_LOADED)
# if these are set then do not try to find them again,
# by avoiding any try_compiles for the flags
if(OpenMP_C_FLAGS)
@@ -124,7 +119,7 @@ if(NOT _HAVE_LANGUAGE_C EQUAL -1)
endif()
# check cxx compiler
-if(NOT _HAVE_LANGUAGE_CXX EQUAL -1)
+if(CMAKE_CXX_COMPILER_LOADED)
# if these are set then do not try to find them again,
# by avoiding any try_compiles for the flags
if(OpenMP_CXX_FLAGS)
@@ -158,9 +153,6 @@ if(NOT _HAVE_LANGUAGE_CXX EQUAL -1)
unset(OpenMP_CXX_TEST_SOURCE)
endif()
-unset(_HAVE_LANGUAGE_C)
-unset(_HAVE_LANGUAGE_CXX)
-
if(_OPENMP_REQUIRED_VARS)
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
diff --git a/Modules/FindOpenSceneGraph.cmake b/Modules/FindOpenSceneGraph.cmake
index 460f0fd..52f9316 100644
--- a/Modules/FindOpenSceneGraph.cmake
+++ b/Modules/FindOpenSceneGraph.cmake
@@ -78,7 +78,7 @@ list(APPEND _osg_modules_to_process "osg" "OpenThreads")
list(REMOVE_DUPLICATES _osg_modules_to_process)
if(OpenSceneGraph_DEBUG)
- message("[ FindOpenSceneGraph.cmake:${CMAKE_CURRENT_LIST_LINE} ] "
+ message(STATUS "[ FindOpenSceneGraph.cmake:${CMAKE_CURRENT_LIST_LINE} ] "
"Components = ${_osg_modules_to_process}")
endif()
@@ -93,7 +93,7 @@ endif()
# Try to ascertain the version...
if(OSG_INCLUDE_DIR)
if(OpenSceneGraph_DEBUG)
- message("[ FindOpenSceneGraph.cmake:${CMAKE_CURRENT_LIST_LINE} ] "
+ message(STATUS "[ FindOpenSceneGraph.cmake:${CMAKE_CURRENT_LIST_LINE} ] "
"Detected OSG_INCLUDE_DIR = ${OSG_INCLUDE_DIR}")
endif()
@@ -127,14 +127,14 @@ if(OSG_INCLUDE_DIR)
string(REGEX REPLACE ".*#define OPENSCENEGRAPH_PATCH_VERSION[ \t]+([0-9]+).*"
"\\1" _osg_VERSION_PATCH ${_osg_Version_contents})
else()
- message("[ FindOpenSceneGraph.cmake:${CMAKE_CURRENT_LIST_LINE} ] "
+ message(WARNING "[ FindOpenSceneGraph.cmake:${CMAKE_CURRENT_LIST_LINE} ] "
"Failed to parse version number, please report this as a bug")
endif()
set(OPENSCENEGRAPH_VERSION "${_osg_VERSION_MAJOR}.${_osg_VERSION_MINOR}.${_osg_VERSION_PATCH}"
CACHE INTERNAL "The version of OSG which was detected")
if(OpenSceneGraph_DEBUG)
- message("[ FindOpenSceneGraph.cmake:${CMAKE_CURRENT_LIST_LINE} ] "
+ message(STATUS "[ FindOpenSceneGraph.cmake:${CMAKE_CURRENT_LIST_LINE} ] "
"Detected version ${OPENSCENEGRAPH_VERSION}")
endif()
endif()
@@ -165,7 +165,7 @@ endif()
#
foreach(_osg_module ${_osg_modules_to_process})
if(OpenSceneGraph_DEBUG)
- message("[ FindOpenSceneGraph.cmake:${CMAKE_CURRENT_LIST_LINE} ] "
+ message(STATUS "[ FindOpenSceneGraph.cmake:${CMAKE_CURRENT_LIST_LINE} ] "
"Calling find_package(${_osg_module} ${_osg_required} ${_osg_quiet})")
endif()
find_package(${_osg_module} ${_osg_quiet})
diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake
index 5c1d56b..930f675 100644
--- a/Modules/FindPythonInterp.cmake
+++ b/Modules/FindPythonInterp.cmake
@@ -10,7 +10,9 @@
# PYTHON_VERSION_MINOR - Python minor version found e.g. 5
# PYTHON_VERSION_PATCH - Python patch version found e.g. 2
#
-# Python_ADDITIONAL_VERSIONS - list of additional Python versions to search for
+# The Python_ADDITIONAL_VERSIONS variable can be used to specify a list of
+# version numbers that should be taken into account when searching for Python.
+# You need to set this variable before calling find_package(PythonInterp).
#=============================================================================
# Copyright 2005-2010 Kitware, Inc.
diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake
index da7a1ac..fcd0838 100644
--- a/Modules/FindPythonLibs.cmake
+++ b/Modules/FindPythonLibs.cmake
@@ -7,8 +7,12 @@
# PYTHON_LIBRARIES - path to the python library
# PYTHON_INCLUDE_PATH - path to where Python.h is found (deprecated)
# PYTHON_INCLUDE_DIRS - path to where Python.h is found
-# PYTHON_DEBUG_LIBRARIES - path to the debug library
-# Python_ADDITIONAL_VERSIONS - list of additional Python versions to search for
+# PYTHON_DEBUG_LIBRARIES - path to the debug library (deprecated)
+# PYTHONLIBS_VERSION_STRING - version of the Python libs found (since CMake 2.8.8)
+#
+# The Python_ADDITIONAL_VERSIONS variable can be used to specify a list of
+# version numbers that should be taken into account when searching for Python.
+# You need to set this variable before calling find_package(PythonLibs).
#=============================================================================
# Copyright 2001-2009 Kitware, Inc.
@@ -27,11 +31,42 @@ INCLUDE(CMakeFindFrameworks)
# Search for the python framework on Apple.
CMAKE_FIND_FRAMEWORKS(Python)
+SET(_PYTHON1_VERSIONS 1.6 1.5)
+SET(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
+SET(_PYTHON3_VERSIONS 3.3 3.2 3.1 3.0)
+
+IF(PythonLibs_FIND_VERSION)
+ IF(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
+ STRING(REGEX REPLACE "^([0-9]+\\.[0-9]+).*" "\\1" _PYTHON_FIND_MAJ_MIN "${PythonLibs_FIND_VERSION}")
+ STRING(REGEX REPLACE "^([0-9]+).*" "\\1" _PYTHON_FIND_MAJ "${_PYTHON_FIND_MAJ_MIN}")
+ UNSET(_PYTHON_FIND_OTHER_VERSIONS)
+ IF(NOT PythonLibs_FIND_VERSION_EXACT)
+ FOREACH(_PYTHON_V ${_PYTHON${_PYTHON_FIND_MAJ}_VERSIONS})
+ IF(NOT _PYTHON_V VERSION_LESS _PYTHON_FIND_MAJ_MIN)
+ LIST(APPEND _PYTHON_FIND_OTHER_VERSIONS ${_PYTHON_V})
+ ENDIF()
+ ENDFOREACH()
+ ENDIF(NOT PythonLibs_FIND_VERSION_EXACT)
+ UNSET(_PYTHON_FIND_MAJ_MIN)
+ UNSET(_PYTHON_FIND_MAJ)
+ ELSE(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
+ SET(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON${PythonLibs_FIND_VERSION}_VERSIONS})
+ ENDIF(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
+ELSE(PythonLibs_FIND_VERSION)
+ SET(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON3_VERSIONS} ${_PYTHON2_VERSIONS} ${_PYTHON1_VERSIONS})
+ENDIF(PythonLibs_FIND_VERSION)
+
# Set up the versions we know about, in the order we will search. Always add
# the user supplied additional versions to the front.
-set(_Python_VERSIONS
+SET(_Python_VERSIONS
${Python_ADDITIONAL_VERSIONS}
- 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
+ ${_PYTHON_FIND_OTHER_VERSIONS}
+ )
+
+UNSET(_PYTHON_FIND_OTHER_VERSIONS)
+UNSET(_PYTHON1_VERSIONS)
+UNSET(_PYTHON2_VERSIONS)
+UNSET(_PYTHON3_VERSIONS)
FOREACH(_CURRENT_VERSION ${_Python_VERSIONS})
STRING(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
@@ -92,6 +127,17 @@ FOREACH(_CURRENT_VERSION ${_Python_VERSIONS})
SET(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}" CACHE INTERNAL
"Path to where Python.h is found (deprecated)")
+ IF(PYTHON_INCLUDE_DIR AND EXISTS "${PYTHON_INCLUDE_DIR}/patchlevel.h")
+ FILE(STRINGS "${PYTHON_INCLUDE_DIR}/patchlevel.h" python_version_str
+ REGEX "^#define[ \t]+PY_VERSION[ \t]+\"[^\"]+\"")
+ STRING(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"]+)\".*" "\\1"
+ PYTHONLIBS_VERSION_STRING "${python_version_str}")
+ UNSET(python_version_str)
+ ENDIF(PYTHON_INCLUDE_DIR AND EXISTS "${PYTHON_INCLUDE_DIR}/patchlevel.h")
+
+ IF(PYTHON_LIBRARY AND PYTHON_INCLUDE_DIR)
+ BREAK()
+ ENDIF(PYTHON_LIBRARY AND PYTHON_INCLUDE_DIR)
ENDFOREACH(_CURRENT_VERSION)
MARK_AS_ADVANCED(
@@ -105,13 +151,23 @@ MARK_AS_ADVANCED(
# library. We now set the variables listed by the documentation for this
# module.
SET(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
-SET(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
SET(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}")
+# These variables have been historically named in this module different from
+# what SELECT_LIBRARY_CONFIGURATIONS() expects.
+SET(PYTHON_LIBRARY_DEBUG "${PYTHON_DEBUG_LIBRARY}")
+SET(PYTHON_LIBRARY_RELEASE "${PYTHON_LIBRARY}")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
+SELECT_LIBRARY_CONFIGURATIONS(PYTHON)
+# SELECT_LIBRARY_CONFIGURATIONS() sets ${PREFIX}_FOUND if it has a library.
+# Unset this, this prefix doesn't match the module prefix, they are different
+# for historical reasons.
+UNSET(PYTHON_FOUND)
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs DEFAULT_MSG PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
-
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs
+ REQUIRED_VARS PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS
+ VERSION_VAR PYTHONLIBS_VERSION_STRING)
# PYTHON_ADD_MODULE(<name> src1 src2 ... srcN) is used to build modules for python.
# PYTHON_WRITE_MODULES_HEADER(<filename>) writes a header file you can include
diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake
index f3f61f6..ce23d5d 100644
--- a/Modules/GenerateExportHeader.cmake
+++ b/Modules/GenerateExportHeader.cmake
@@ -18,7 +18,7 @@
# [PREFIX_NAME <prefix_name>]
# )
#
-# ADD_COMPILER_EXPORT_FLAGS( [FATAL_WARNINGS] )
+# ADD_COMPILER_EXPORT_FLAGS( [<output_variable>] )
#
# By default GENERATE_EXPORT_HEADER() generates macro names in a file name
# determined by the name of the library. The ADD_COMPILER_EXPORT_FLAGS function
@@ -149,46 +149,20 @@ include(CheckCXXCompilerFlag)
macro(_check_cxx_compiler_attribute _ATTRIBUTE _RESULT)
check_cxx_source_compiles("${_ATTRIBUTE} int somefunc() { return 0; }
int main() { return somefunc();}" ${_RESULT}
- # Some compilers do not fail with a bad flag
- FAIL_REGEX "unrecognized .*option" # GNU
- FAIL_REGEX "ignoring unknown option" # MSVC
- FAIL_REGEX "warning D9002" # MSVC, any lang
- FAIL_REGEX "[Uu]nknown option" # HP
- FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro
- FAIL_REGEX "command option .* is not recognized" # XL
)
endmacro()
macro(_test_compiler_hidden_visibility)
- if(CMAKE_COMPILER_IS_GNUCXX)
- exec_program(${CMAKE_C_COMPILER} ARGS --version
- OUTPUT_VARIABLE _gcc_version_info)
- string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]"
- _gcc_version "${_gcc_version_info}")
- # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
- # patch level, handle this here:
- if(NOT _gcc_version)
- string(REGEX REPLACE ".*\\(GCC\\).* ([34]\\.[0-9]) .*" "\\1.0"
- _gcc_version "${_gcc_version_info}")
- endif()
-
- if("${_gcc_version}" VERSION_LESS "4.2")
- set(GCC_TOO_OLD TRUE)
- message(WARNING "GCC version older than 4.2")
- endif()
- endif()
-
- if(CMAKE_CXX_COMPILER_ID MATCHES Intel)
- exec_program(${CMAKE_CXX_COMPILER} ARGS -V
- OUTPUT_VARIABLE _intel_version_info)
- string(REGEX REPLACE ".*Version ([0-9]+(\\.[0-9]+)+).*" "\\1"
- _intel_version "${_intel_version_info}")
-
- if(${_intel_version} VERSION_LESS "12.0")
- set(_INTEL_TOO_OLD TRUE)
- message(WARNING "Intel compiler older than 12.0")
- endif()
+ if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.2")
+ set(GCC_TOO_OLD TRUE)
+ message(WARNING "GCC version older than 4.2")
+ elseif(CMAKE_COMPILER_IS_GNUC AND CMAKE_C_COMPILER_VERSION VERSION_LESS "4.2")
+ set(GCC_TOO_OLD TRUE)
+ message(WARNING "GCC version older than 4.2")
+ elseif(CMAKE_CXX_COMPILER_ID MATCHES Intel AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "12.0")
+ set(_INTEL_TOO_OLD TRUE)
+ message(WARNING "Intel compiler older than 12.0")
endif()
diff --git a/Modules/Platform/Windows-Borland-C.cmake b/Modules/Platform/Windows-Borland-C.cmake
index ebb74a1..e2f76aa 100644
--- a/Modules/Platform/Windows-Borland-C.cmake
+++ b/Modules/Platform/Windows-Borland-C.cmake
@@ -1,2 +1 @@
-include(Platform/Windows-Borland)
-__borland_language(C)
+include(Platform/Windows-Embarcadero-C)
diff --git a/Modules/Platform/Windows-Borland-CXX.cmake b/Modules/Platform/Windows-Borland-CXX.cmake
index 1260c0e..809490f 100644
--- a/Modules/Platform/Windows-Borland-CXX.cmake
+++ b/Modules/Platform/Windows-Borland-CXX.cmake
@@ -1,2 +1 @@
-include(Platform/Windows-Borland)
-__borland_language(CXX)
+include(Platform/Windows-Embarcadero-CXX)
diff --git a/Modules/Platform/Windows-Embarcadero-C.cmake b/Modules/Platform/Windows-Embarcadero-C.cmake
new file mode 100644
index 0000000..607fd4e
--- /dev/null
+++ b/Modules/Platform/Windows-Embarcadero-C.cmake
@@ -0,0 +1,3 @@
+set(_lang C)
+include(Platform/Windows-Embarcadero)
+__embarcadero_language(C)
diff --git a/Modules/Platform/Windows-Embarcadero-CXX.cmake b/Modules/Platform/Windows-Embarcadero-CXX.cmake
new file mode 100644
index 0000000..279a4de
--- /dev/null
+++ b/Modules/Platform/Windows-Embarcadero-CXX.cmake
@@ -0,0 +1,3 @@
+set(_lang CXX)
+include(Platform/Windows-Embarcadero)
+__embarcadero_language(CXX)
diff --git a/Modules/Platform/Windows-Borland.cmake b/Modules/Platform/Windows-Embarcadero.cmake
index 5c402bd..87b3767 100644
--- a/Modules/Platform/Windows-Borland.cmake
+++ b/Modules/Platform/Windows-Embarcadero.cmake
@@ -1,6 +1,6 @@
#=============================================================================
-# Copyright 2002-2009 Kitware, Inc.
+# Copyright 2002-2012 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@@ -13,26 +13,33 @@
# License text for the above reference.)
# This module is shared by multiple languages; use include blocker.
-if(__WINDOWS_BORLAND)
+if(__WINDOWS_EMBARCADERO)
return()
endif()
-set(__WINDOWS_BORLAND 1)
+set(__WINDOWS_EMBARCADERO 1)
SET(BORLAND 1)
-# Borland target type flags (bcc32 -h -t):
-# -tW GUI App (implies -U__CONSOLE__)
-# -tWC Console App (implies -D__CONSOLE__=1)
-# -tWD Build a DLL (implies -D__DLL__=1 -D_DLL=1)
-# -tWM Enable threads (implies -D__MT__=1 -D_MT=1)
-# -tWR Use DLL runtime (implies -D_RTLDLL, and '-tW' too!!)
-#
-# Notes:
-# - The flags affect linking so we pass them to the linker.
-# - The flags affect preprocessing so we pass them to the compiler.
-# - Since '-tWR' implies '-tW' we use '-tWR -tW-' instead.
-# - Since '-tW-' disables '-tWD' we use '-tWR -tW- -tWD' for DLLs.
-set(_RTLDLL "-tWR -tW-")
+if("${CMAKE_${_lang}_COMPILER_VERSION}" VERSION_LESS 6.30)
+ # Borland target type flags (bcc32 -h -t):
+ set(_tW "-tW") # -tW GUI App (implies -U__CONSOLE__)
+ set(_tC "-tWC") # -tWC Console App (implies -D__CONSOLE__=1)
+ set(_tD "-tWD") # -tWD Build a DLL (implies -D__DLL__=1 -D_DLL=1)
+ set(_tM "-tWM") # -tWM Enable threads (implies -D__MT__=1 -D_MT=1)
+ set(_tR "-tWR -tW-") # -tWR Use DLL runtime (implies -D_RTLDLL, and '-tW' too!!)
+ # Notes:
+ # - The flags affect linking so we pass them to the linker.
+ # - The flags affect preprocessing so we pass them to the compiler.
+ # - Since '-tWR' implies '-tW' we use '-tWR -tW-' instead.
+ # - Since '-tW-' disables '-tWD' we use '-tWR -tW- -tWD' for DLLs.
+else()
+ set(EMBARCADERO 1)
+ set(_tC "-tC") # Target is a console application
+ set(_tD "-tD") # Target is a shared library
+ set(_tM "-tM") # Target is multi-threaded
+ set(_tR "-tR") # Target uses the dynamic RTL
+ set(_tW "-tW") # Target is a Windows application
+endif()
set(_COMPILE_C "-c")
set(_COMPILE_CXX "-P -c")
@@ -50,14 +57,14 @@ SET(CMAKE_FIND_LIBRARY_SUFFIXES "-bcc.lib" ".lib")
SET (CMAKE_MANGLE_OBJECT_FILE_NAMES "ON")
# extra flags for a win32 exe
-SET(CMAKE_CREATE_WIN32_EXE "-tW" )
+SET(CMAKE_CREATE_WIN32_EXE "${_tW}" )
# extra flags for a console app
-SET(CMAKE_CREATE_CONSOLE_EXE "-tWC" )
+SET(CMAKE_CREATE_CONSOLE_EXE "${_tC}" )
SET (CMAKE_BUILD_TYPE Debug CACHE STRING
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel.")
-SET (CMAKE_EXE_LINKER_FLAGS_INIT "-tWM -lS:10000000 -lSc:10000000 ")
+SET (CMAKE_EXE_LINKER_FLAGS_INIT "${_tM} -lS:10000000 -lSc:10000000 ")
SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "-v")
SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "-v")
SET (CMAKE_SHARED_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT})
@@ -67,18 +74,19 @@ SET (CMAKE_MODULE_LINKER_FLAGS_INIT ${CMAKE_SHARED_LINKER_FLAGS_INIT})
SET (CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT})
SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT})
-macro(__borland_language lang)
- set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-tWD")
+
+macro(__embarcadero_language lang)
+ set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "${_tD}")
# compile a source file into an object file
# place <DEFINES> outside the response file because Borland refuses
# to parse quotes from the response file.
set(CMAKE_${lang}_COMPILE_OBJECT
- "<CMAKE_${lang}_COMPILER> ${_RTLDLL} <DEFINES> ${CMAKE_START_TEMP_FILE}-DWIN32 -o<OBJECT> <FLAGS> ${_COMPILE_${lang}} <SOURCE>${CMAKE_END_TEMP_FILE}"
+ "<CMAKE_${lang}_COMPILER> ${_tR} <DEFINES> ${CMAKE_START_TEMP_FILE}-DWIN32 -o<OBJECT> <FLAGS> ${_COMPILE_${lang}} <SOURCE>${CMAKE_END_TEMP_FILE}"
)
set(CMAKE_${lang}_LINK_EXECUTABLE
- "<CMAKE_${lang}_COMPILER> ${_RTLDLL} -e<TARGET> ${CMAKE_START_TEMP_FILE}<LINK_FLAGS> <FLAGS> <LINK_LIBRARIES> <OBJECTS>${CMAKE_END_TEMP_FILE}"
+ "<CMAKE_${lang}_COMPILER> ${_tR} -e<TARGET> ${CMAKE_START_TEMP_FILE}<LINK_FLAGS> <FLAGS> <LINK_LIBRARIES> <OBJECTS>${CMAKE_END_TEMP_FILE}"
# "implib -c -w <TARGET_IMPLIB> <TARGET>"
)
@@ -91,7 +99,7 @@ macro(__borland_language lang)
# Create a module library.
set(CMAKE_${lang}_CREATE_SHARED_MODULE
- "<CMAKE_${lang}_COMPILER> ${_RTLDLL} -tWD ${CMAKE_START_TEMP_FILE}-e<TARGET> <LINK_FLAGS> <LINK_LIBRARIES> <OBJECTS>${CMAKE_END_TEMP_FILE}"
+ "<CMAKE_${lang}_COMPILER> ${_tR} ${_tD} ${CMAKE_START_TEMP_FILE}-e<TARGET> <LINK_FLAGS> <LINK_LIBRARIES> <OBJECTS>${CMAKE_END_TEMP_FILE}"
)
# Create an import library for another target.
@@ -112,7 +120,7 @@ macro(__borland_language lang)
)
# Initial configuration flags.
- set(CMAKE_${lang}_FLAGS_INIT "-tWM")
+ set(CMAKE_${lang}_FLAGS_INIT "${_tM}")
set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-Od -v")
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-O1 -DNDEBUG")
set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index 2a83045..ef76724 100644
--- a/Modules/UseSWIG.cmake
+++ b/Modules/UseSWIG.cmake
@@ -47,20 +47,17 @@ MACRO(SWIG_MODULE_INITIALIZE name language)
SET(SWIG_MODULE_${name}_LANGUAGE "${swig_uppercase_language}")
SET(SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG "${swig_lowercase_language}")
- IF("x${SWIG_MODULE_${name}_LANGUAGE}x" MATCHES "^xUNKNOWNx$")
- MESSAGE(FATAL_ERROR "SWIG Error: Language \"${language}\" not found")
- ENDIF("x${SWIG_MODULE_${name}_LANGUAGE}x" MATCHES "^xUNKNOWNx$")
-
SET(SWIG_MODULE_${name}_REAL_NAME "${name}")
- IF("x${SWIG_MODULE_${name}_LANGUAGE}x" MATCHES "^xPYTHONx$")
+ IF("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "UNKNOWN")
+ MESSAGE(FATAL_ERROR "SWIG Error: Language \"${language}\" not found")
+ ELSEIF("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "PYTHON")
# when swig is used without the -interface it will produce in the module.py
# a 'import _modulename' statement, which implies having a corresponding
# _modulename.so (*NIX), _modulename.pyd (Win32).
SET(SWIG_MODULE_${name}_REAL_NAME "_${name}")
- ENDIF("x${SWIG_MODULE_${name}_LANGUAGE}x" MATCHES "^xPYTHONx$")
- IF("x${SWIG_MODULE_${name}_LANGUAGE}x" MATCHES "^xPERLx$")
+ ELSEIF("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "PERL")
SET(SWIG_MODULE_${name}_EXTRA_FLAGS "-shadow")
- ENDIF("x${SWIG_MODULE_${name}_LANGUAGE}x" MATCHES "^xPERLx$")
+ ENDIF()
ENDMACRO(SWIG_MODULE_INITIALIZE)
#
diff --git a/Source/CPack/cmCPackDocumentVariables.cxx b/Source/CPack/cmCPackDocumentVariables.cxx
index 68cde78..23e99f8 100644
--- a/Source/CPack/cmCPackDocumentVariables.cxx
+++ b/Source/CPack/cmCPackDocumentVariables.cxx
@@ -21,12 +21,60 @@ void cmCPackDocumentVariables::DefineVariables(cmake* cm)
"", false,
"Variables common to all CPack generators");
- // Subsection: variables defined/used by cpack,
- // which are specific to one CPack generator
-// cm->DefineProperty
-// ("CPACK_RPM_PACKAGE_NAME", cmProperty::VARIABLE,
-// "RPM specific package name.",
-// "If not specified, defaults to CPACK_PACKAGE_NAME."
-// "", false,
-// "Variables specific to a CPack generator");
+ cm->DefineProperty
+ ("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", cmProperty::VARIABLE,
+ "Boolean toggle to include/exclude top level directory.",
+ "When preparing a package CPack installs the item under"
+ " the so-called top level directory. The purpose of"
+ " is to include (set to 1 or ON or TRUE) the top level directory"
+ " in the package or not (set to 0 or OFF or FALSE).\n"
+ "Each CPack generator as a built-in default value for this"
+ " variable. E.g. Archive generators (ZIP, TGZ, ...) includes"
+ " the top level whereas RPM or DEB don't. The user may override"
+ " the default value byt setting this variable.\n"
+ "There is a similar variable "
+ "CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY"
+ "which may be used to override the behavior for the component"
+ "packaging case which may have different default value for"
+ "historical (now backward compatibility) reason.", false,
+ "Variables common to all CPack generators");
+
+ cm->DefineProperty
+ ("CPACK_SET_DESTDIR", cmProperty::VARIABLE,
+ "Boolean toggle to make CPack use DESTDIR mechanism when"
+ " packaging.", "DESTDIR means DESTination DIRectory."
+ " It is commonly used by makefile "
+ "users in order to install software at non-default location. It a"
+ "basic relocation mechanism. "
+ "It is usually invoked like this:\n"
+ " make DESTDIR=/home/john install\n"
+ "which will install the concerned software using the"
+ " installation prefix, e.g. \"/usr/local\" prepended with "
+ "the DESTDIR value which finally gives \"/home/john/usr/local\"."
+ " When preparing a package CPack first installs the items to be "
+ "packaged in a local (to the build tree) directory by using the "
+ "same DESTDIR mechanism. Nevertheless, if "
+ "CPACK_SET_DESTDIR is set then CPack will set DESTDIR before"
+ " doing the local install. The most noticeable difference is"
+ " that without CPACK_SET_DESTDIR, CPack uses "
+ "CPACK_PACKAGING_INSTALL_PREFIX as a prefix whereas with "
+ "CPACK_SET_DESTDIR set, CPack will use CMAKE_INSTALL_PREFIX as"
+ " a prefix.\n"
+ "Manually setting CPACK_SET_DESTDIR may help (or simply be"
+ " necessary) if some install rules uses absolute "
+ "DESTINATION (see CMake INSTALL command)."
+ "However, starting with"
+ " CPack/CMake 2.8.3 RPM and DEB installers tries to handle DESTDIR"
+ " automatically so that it is seldom necessary for the user to set"
+ " it.", false,
+ "Variables common to all CPack generators");
+
+ cm->DefineProperty
+ ("CPACK_INSTALL_SCRIPT", cmProperty::VARIABLE,
+ "Extra CMake script provided by the user.",
+ "If set this CMake script will be executed by CPack "
+ "during its local [CPack-private] installation "
+ "which is done right before packaging the files."
+ " The script is not called by e.g.: make install.", false,
+ "Variables common to all CPack generators");
}
diff --git a/Source/cmFindProgramCommand.cxx b/Source/cmFindProgramCommand.cxx
index 7c56ad7..00f5419 100644
--- a/Source/cmFindProgramCommand.cxx
+++ b/Source/cmFindProgramCommand.cxx
@@ -175,6 +175,8 @@ std::string cmFindProgramCommand::GetBundleExecutable(std::string bundlePath)
// And finally to a c++ string
executable = bundlePath + "/Contents/MacOS/" + std::string(buffer);
+ // Only release CFURLRef if it's not null
+ CFRelease( executableURL );
}
// Any CF objects returned from functions with "create" or
@@ -182,7 +184,6 @@ std::string cmFindProgramCommand::GetBundleExecutable(std::string bundlePath)
CFRelease( bundlePathCFS );
CFRelease( bundleURL );
CFRelease( appBundle );
- CFRelease( executableURL );
#endif
return executable;
diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake
index 829c587..4c91b5c 100644
--- a/Source/kwsys/kwsysDateStamp.cmake
+++ b/Source/kwsys/kwsysDateStamp.cmake
@@ -15,7 +15,7 @@
SET(KWSYS_DATE_STAMP_YEAR 2012)
# KWSys version date month component. Format is MM.
-SET(KWSYS_DATE_STAMP_MONTH 02)
+SET(KWSYS_DATE_STAMP_MONTH 03)
# KWSys version date day component. Format is DD.
-SET(KWSYS_DATE_STAMP_DAY 25)
+SET(KWSYS_DATE_STAMP_DAY 02)
diff --git a/Templates/CPackConfig.cmake.in b/Templates/CPackConfig.cmake.in
index 7150feb..79b8d93 100644
--- a/Templates/CPackConfig.cmake.in
+++ b/Templates/CPackConfig.cmake.in
@@ -1,29 +1,12 @@
# This file will be configured to contain variables for CPack. These variables
# should be set in the CMake list file of the project before CPack module is
-# included. Example variables are:
-# CPACK_GENERATOR - Generator used to create package
-# CPACK_INSTALL_CMAKE_PROJECTS - For each project (path, name, component)
-# CPACK_CMAKE_GENERATOR - CMake Generator used for the projects
-# CPACK_INSTALL_COMMANDS - Extra commands to install components
-# CPACK_INSTALLED_DIRECTORIES - Extra directories to install
-# CPACK_PACKAGE_DESCRIPTION_FILE - Description file for the package
-# CPACK_PACKAGE_DESCRIPTION_SUMMARY - Summary of the package
-# CPACK_PACKAGE_EXECUTABLES - List of pairs of executables and labels
-# CPACK_PACKAGE_FILE_NAME - Name of the package generated
-# CPACK_PACKAGE_ICON - Icon used for the package
-# CPACK_PACKAGE_INSTALL_DIRECTORY - Name of directory for the installer
-# CPACK_PACKAGE_NAME - Package project name
-# CPACK_PACKAGE_VENDOR - Package project vendor
-# CPACK_PACKAGE_VERSION - Package project version
-# CPACK_PACKAGE_VERSION_MAJOR - Package project version (major)
-# CPACK_PACKAGE_VERSION_MINOR - Package project version (minor)
-# CPACK_PACKAGE_VERSION_PATCH - Package project version (patch)
-
-# There are certain generator specific ones
-
-# NSIS Generator:
-# CPACK_PACKAGE_INSTALL_REGISTRY_KEY - Name of the registry key for the installer
-# CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS - Extra commands used during uninstall
-# CPACK_NSIS_EXTRA_INSTALL_COMMANDS - Extra commands used during install
+# included. The list of available CPACK_xxx variables and their associated
+# documentation may be obtained using
+# cpack --help-variable-list
+#
+# Some variables are common to all generators (e.g. CPACK_PACKAGE_NAME)
+# and some are specific to a generator
+# (e.g. CPACK_NSIS_EXTRA_INSTALL_COMMANDS). The generator specific variables
+# usually begin with CPACK_<GENNAME>_xxxx.
@_CPACK_OTHER_VARIABLES_@
diff --git a/cmake.1 b/cmake.1
deleted file mode 100644
index c7695b4..0000000
--- a/cmake.1
+++ /dev/null
@@ -1,112 +0,0 @@
-.\" Hey, EMACS: -*- nroff -*-
-.\" First parameter, NAME, should be all caps
-.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
-.\" other parameters are allowed: see man(7), man(1)
-.TH CMAKE 1 "August 8, 2002"
-.\" Please adjust this date whenever revising the manpage.
-.\"
-.\" Some roff macros, for reference:
-.\" .nh disable hyphenation
-.\" .hy enable hyphenation
-.\" .ad l left justify
-.\" .ad b justify to both left and right margins
-.\" .nf disable filling
-.\" .fi enable filling
-.\" .br insert line break
-.\" .sp <n> insert n+1 empty lines
-.\" for manpage-specific macros, see man(7)
-.SH NAME
-cmake \- Cross-platform Makefile generator.
-.SH SYNOPSIS
-.B cmake
-.RI < path-to-source > " " [ options ]
-.br
-.B ccmake
-.RI < path-to-source >
-.br
-.B ctest
-.RI [ -R " " < regex > ]
-.br
-.B cmaketest
-.RI < test-src-dir > " " < test-bin-dir > " " < test-executable >
-.SH DESCRIPTION
-
-This manual page documents briefly the \fBcmake\fP, \fBccmake\fP,
-\fBctest\fP and \fBcmaketest\fP commands. It is not intended to aid
-authors of CMakeLists.txt files or to describe all advanced options
-available. For full documentation, please visit
-\fBhttp://www.cmake.org\fP.
-
-.PP
-.\" TeX users may be more comfortable with the \fB<whatever>\fP and
-.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
-.\" respectively.
-
-CMake provides developers with a means of building their project on
-multiple platforms while writing only one build system configuration.
-The developer writes a set of CMakeLists.txt files that are read by
-CMake and used to generate a native build system for the current
-environment. On unix platforms, Makefiles are generated.
-
-.PP
-
-\fBcmake\fP is used to generate the makefiles for a project from its
-source. The first argument should specify a path to the source tree.
-The current directory will be used as the build tree for the project.
-Both in-source and out-of-source builds are supported, but
-out-of-source builds are preferred. CMake provides functionality for
-tailoring the build to user preferences through settings in the cmake
-cache. Options may be set interactively using the -i option (or
-\fBccmake\fP). Once CMake has generated the makefiles in the build
-tree, one may use the standard \fBmake\fP tool to build the project.
-
-.PP
-
-\fBccmake\fP provides a curses interface front-end for \fBcmake\fP.
-The interface allows users to interactively configure the build
-options stored in the cmake cache. This is the preferred interface
-for interactive builds. Build scripts should use \fBcmake\fP
-directly.
-
-.PP
-
-\fBctest\fP runs tests found in the project's build tree after it has
-been compiled and displays a summary of test results. Use the -R
-option to specify a regular expression of test names to match.
-
-\fBcmaketest\fP is provided to simplify project testing scripts. It
-allows a CMake project to be compiled and tested from a single command
-line.
-
-.SH OPTIONS
-
-.TP
-.B \-\-help
-Available for \fBcmake\fP , \fBccmake\fP and \fBcmaketest\fP.
-.br
-Show version number and summary of options.
-
-.TP
-.B -R regex
-Available for \fBctest\fP.
-.br
-Run only tests matching the given regular expression.
-
-.TP
-.B -i
-Available for \fBcmake\fP.
-.br
-Run cmake in an interactive wizard mode to configure the build.
-
-.SH SEE ALSO
-.BR Dart (1),
-.BR VTK (1).
-
-.SH MAILING LIST
-For help using cmake, a mailing list is provided at
-\fBcmake@www.cmake.org\fP. Please first read the full documentation
-at \fBhttp://www.cmake.org\fP before posting questions to the list.
-
-.SH AUTHOR
-This manual page was written by CMake authors at Kitware
-<kitware@kitware.com>.