Merge branch 'object-library' into ninja-object-library

This commit is contained in:
Brad King 2012-03-13 09:22:24 -04:00
commit c68cc06612
310 changed files with 3364 additions and 2137 deletions

View File

@ -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]*(")
;------------------------------------------------------------------------------

View File

@ -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 */

View File

@ -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 */

View File

@ -71,7 +71,8 @@ if(UNIX)
# use the file utility to check whether itself is 64 bit:
find_program(FILE_EXECUTABLE file)
if(FILE_EXECUTABLE)
execute_process(COMMAND "${FILE_EXECUTABLE}" "${FILE_EXECUTABLE}" OUTPUT_VARIABLE fileOutput ERROR_QUIET)
get_filename_component(FILE_ABSPATH "${FILE_EXECUTABLE}" ABSOLUTE)
execute_process(COMMAND "${FILE_ABSPATH}" "${FILE_ABSPATH}" OUTPUT_VARIABLE fileOutput ERROR_QUIET)
if("${fileOutput}" MATCHES "64-bit")
set(CMAKE_SIZEOF_VOID_P 8)
endif()

View File

@ -39,6 +39,8 @@ SET_PROPERTY(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE)
SET (CMAKE_SKIP_RPATH "NO" CACHE BOOL
"If set, runtime paths are not added when using shared libraries.")
SET (CMAKE_SKIP_INSTALL_RPATH "NO" CACHE BOOL
"If set, runtime paths are not added when installing shared libraries, but are added when building.")
SET(CMAKE_VERBOSE_MAKEFILE FALSE CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.")
@ -168,5 +170,6 @@ ENDIF(CMAKE_HOST_UNIX)
MARK_AS_ADVANCED(
CMAKE_SKIP_RPATH
CMAKE_SKIP_INSTALL_RPATH
CMAKE_VERBOSE_MAKEFILE
)

View File

@ -0,0 +1,189 @@
# - CONFIGURE_PACKAGE_CONFIG_FILE(), WRITE_BASIC_PACKAGE_VERSION_FILE()
#
# CONFIGURE_PACKAGE_CONFIG_FILE(<input> <output> INSTALL_DESTINATION <path>
# [PATH_VARS <var1> <var2> ... <varN>]
# [NO_SET_AND_CHECK_MACRO] )
#
# CONFIGURE_PACKAGE_CONFIG_FILE() should be used instead of the plain
# CONFIGURE_FILE() command when creating the <Name>Config.cmake or <Name>-config.cmake
# file for installing a project or library. It helps making the resulting package
# relocatable by avoiding hardcoded paths in the installed Config.cmake file.
#
# In a FooConfig.cmake file there may be code like this to make the
# install destinations know to the using project:
# set(FOO_INCLUDE_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@" )
# set(FOO_DATA_DIR "@CMAKE_INSTALL_PREFIX@/@RELATIVE_DATA_INSTALL_DIR@" )
# set(FOO_ICONS_DIR "@CMAKE_INSTALL_PREFIX@/share/icons" )
# ...logic to determine installedPrefix from the own location...
# set(FOO_CONFIG_DIR "${installedPrefix}/@CONFIG_INSTALL_DIR@" )
# All 4 options shown above are not sufficient, since the first 3 hardcode
# the absolute directory locations, and the 4th case works only if the logic
# to determine the installedPrefix is correct, and if CONFIG_INSTALL_DIR contains
# a relative path, which in general cannot be guaranteed.
# This has the effect that the resulting FooConfig.cmake file would work poorly
# under Windows and OSX, where users are used to choose the install location
# of a binary package at install time, independent from how CMAKE_INSTALL_PREFIX
# was set at build/cmake time.
#
# Using CONFIGURE_PACKAGE_CONFIG_FILE() helps. If used correctly, it makes the
# resulting FooConfig.cmake file relocatable.
# Usage:
# 1. write a FooConfig.cmake.in file as you are used to
# 2. insert a line containing only the string "@PACKAGE_INIT@"
# 3. instead of SET(FOO_DIR "@SOME_INSTALL_DIR@"), use SET(FOO_DIR "@PACKAGE_SOME_INSTALL_DIR@")
# (this must be after the @PACKAGE_INIT@ line)
# 4. instead of using the normal CONFIGURE_FILE(), use CONFIGURE_PACKAGE_CONFIG_FILE()
#
# The <input> and <output> arguments are the input and output file, the same way
# as in CONFIGURE_FILE().
#
# The <path> given to INSTALL_DESTINATION must be the destination where the FooConfig.cmake
# file will be installed to. This can either be a relative or absolute path, both work.
#
# The variables <var1> to <varN> given as PATH_VARS are the variables which contain
# install destinations. For each of them the macro will create a helper variable
# PACKAGE_<var...>. These helper variables must be used
# in the FooConfig.cmake.in file for setting the installed location. They are calculated
# by CONFIGURE_PACKAGE_CONFIG_FILE() so that they are always relative to the
# installed location of the package. This works both for relative and also for absolute locations.
# For absolute locations it works only if the absolute location is a subdirectory
# of CMAKE_INSTALL_PREFIX.
#
# By default configure_package_config_file() also generates a macro set_and_check()
# into the FooConfig.cmake file. This should be used instead of the normal set()
# command for setting directories and file locations. Additionally to setting the
# variable it also checks that the referenced file or directory actually exists
# and fails with a FATAL_ERROR otherwise. This makes sure that the created
# FooConfig.cmake file does not contain wrong references.
# When using the NO_SET_AND_CHECK_MACRO, this macro is not generated into the
# FooConfig.cmake file.
#
# For an example see below the documentation for WRITE_BASIC_PACKAGE_VERSION_FILE().
#
#
# WRITE_BASIC_PACKAGE_VERSION_FILE( filename VERSION major.minor.patch COMPATIBILITY (AnyNewerVersion|SameMajorVersion) )
#
# Writes a file for use as <package>ConfigVersion.cmake file to <filename>.
# See the documentation of FIND_PACKAGE() for details on this.
# filename is the output filename, it should be in the build tree.
# major.minor.patch is the version number of the project to be installed
# The COMPATIBILITY mode AnyNewerVersion means that the installed package version
# will be considered compatible if it is newer or exactly the same as the requested version.
# If SameMajorVersion is used instead, then the behaviour differs from AnyNewerVersion
# in that the major version number must be the same as requested, e.g. version 2.0 will
# not be considered compatible if 1.0 is requested.
# If your project has more elaborated version matching rules, you will need to write your
# own custom ConfigVersion.cmake file instead of using this macro.
#
# Internally, this macro executes configure_file() to create the resulting
# version file. Depending on the COMPATIBLITY, either the file
# BasicConfigVersion-SameMajorVersion.cmake.in or BasicConfigVersion-AnyNewerVersion.cmake.in
# is used. Please note that these two files are internal to CMake and you should
# not call configure_file() on them yourself, but they can be used as starting
# point to create more sophisticted custom ConfigVersion.cmake files.
#
#
# Example using both configure_package_config_file() and write_basic_package_version_file():
# CMakeLists.txt:
# set(INCLUDE_INSTALL_DIR include/ ... CACHE )
# set(LIB_INSTALL_DIR lib/ ... CACHE )
# set(SYSCONFIG_INSTALL_DIR etc/foo/ ... CACHE )
# ...
# include(CMakePackageConfigHelpers)
# configure_package_config_file(FooConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FooConfig.cmake
# INSTALL_DESTINATION ${LIB_INSTALL_DIR}/Foo/cmake
# PATH_VARS INCLUDE_INSTALL_DIR SYSCONFIG_INSTALL_DIR)
# write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/FooConfigVersion.cmake
# VERSION 1.2.3
# COMPATIBILITY SameMajorVersion )
# install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FooConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/FooConfigVersion.cmake
# DESTINATION ${LIB_INSTALL_DIR}/Foo/cmake )
#
# With a FooConfig.cmake.in:
# set(FOO_VERSION x.y.z)
# ...
# @PACKAGE_INIT@
# ...
# set_and_check(FOO_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
# set_and_check(FOO_SYSCONFIG_DIR "@PACKAGE_SYSCONFIG_INSTALL_DIR@")
#=============================================================================
# Copyright 2012 Alexander Neundorf <neundorf@kde.org>
#
# 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.)
include(CMakeParseArguments)
include(WriteBasicConfigVersionFile)
macro(WRITE_BASIC_PACKAGE_VERSION_FILE)
write_basic_config_version_file(${ARGN})
endmacro()
function(CONFIGURE_PACKAGE_CONFIG_FILE _inputFile _outputFile)
set(options NO_SET_AND_CHECK_MACRO)
set(oneValueArgs INSTALL_DESTINATION )
set(multiValueArgs PATH_VARS )
cmake_parse_arguments(CCF "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if(CCF_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unknown keywords given to CONFIGURE_PACKAGE_CONFIG_FILE(): \"${CCF_UNPARSED_ARGUMENTS}\"")
endif()
if(NOT CCF_INSTALL_DESTINATION)
message(FATAL_ERROR "No INSTALL_DESTINATION given to CONFIGURE_PACKAGE_CONFIG_FILE()")
endif()
if(IS_ABSOLUTE "${CCF_INSTALL_DESTINATION}")
set(absInstallDir "${CCF_INSTALL_DESTINATION}")
else()
set(absInstallDir "${CMAKE_INSTALL_PREFIX}/${CCF_INSTALL_DESTINATION}")
endif()
file(RELATIVE_PATH PACKAGE_RELATIVE_PATH "${absInstallDir}" "${CMAKE_INSTALL_PREFIX}" )
foreach(var ${CCF_PATH_VARS})
if(NOT DEFINED ${var})
message(FATAL_ERROR "Variable ${var} does not exist")
else()
if(IS_ABSOLUTE "${${var}}")
string(REPLACE "${CMAKE_INSTALL_PREFIX}" "\${PACKAGE_PREFIX_DIR}"
PACKAGE_${var} "${${var}}")
else()
set(PACKAGE_${var} "\${PACKAGE_PREFIX_DIR}/${${var}}")
endif()
endif()
endforeach()
set(PACKAGE_INIT "
####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######
get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/${PACKAGE_RELATIVE_PATH}\" ABSOLUTE)
")
if(NOT CCF_NO_SET_AND_CHECK_MACRO)
set(PACKAGE_INIT "${PACKAGE_INIT}
macro(set_and_check _var _file)
set(\${_var} \"\${_file}\")
if(NOT EXISTS \"\${_file}\")
message(FATAL_ERROR \"File or directory \${_file} referenced by variable \${_var} does not exist !\")
endif()
endmacro()
")
endif()
set(PACKAGE_INIT "${PACKAGE_INIT}
####################################################################################")
configure_file("${_inputFile}" "${_outputFile}" @ONLY)
endfunction()

View File

@ -88,61 +88,87 @@
##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.
# 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".
# 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_PACKAGE_ICON - A branding image that will be displayed inside
# the installer (used by GUI installers).
##end
#
##variable
# 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.
# 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.,
# specified, CPack will create a set of options CPACK_BINARY_<GENNAME> (e.g.,
# CPACK_BINARY_NSIS) allowing the user to enable/disable individual
# generators.
# 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
# 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.
# executable ccmake. Not all CPack generators use it (at least NSIS and
# OSXX11 do).
##end
#
##variable
@ -156,8 +182,8 @@
# 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
@ -176,22 +202,23 @@
##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.*
# 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;
# project is CMake project. Defaults to the value of CMAKE_GENERATOR
# few users will want to change this setting.
##end
#
@ -225,6 +252,15 @@
# CPACK_INSTALLED_DIRECTORIES - Extra directories to install.
##end
#
##variable
# CPACK_PACKAGE_INSTALL_REGISTRY_KEY - Registry key used when
# installing this project. This is only used
# by installer for Windows.
##end
##variable
# CPACK_CREATE_DESKTOP_LINKS - List of desktop links to create.
##end
#
#=============================================================================
# Copyright 2006-2009 Kitware, Inc.
@ -358,6 +394,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

View File

@ -4,8 +4,8 @@
# - 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
@ -15,22 +15,21 @@
#
##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.
# 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 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_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.
##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
#=============================================================================

33
Modules/CPackCygwin.cmake Normal file
View File

@ -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.)

View File

@ -19,18 +19,18 @@
##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
# 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
# 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
#

View File

@ -8,11 +8,6 @@
##end
#
##variable
# CPACK_PACKAGE_INSTALL_REGISTRY_KEY - Registry key used when
# installing this project.
##end
#
##variable
# CPACK_NSIS_INSTALL_ROOT - The default installation directory presented
# to the end user by the NSIS installer is under this root dir. The full
# directory presented to the end user is:
@ -30,11 +25,6 @@
##end
#
##variable
# CPACK_PACKAGE_ICON - A branding image that will be displayed inside
# the installer.
##end
#
##variable
# CPACK_NSIS_EXTRA_INSTALL_COMMANDS - Extra NSIS commands that will
# be added to the install Section.
##end
@ -107,6 +97,15 @@
# CPACK_NSIS_MUI_FINISHPAGE_RUN - Specify an executable to add an option
# to run on the finish page of the NSIS installer.
##end
##variable
# CPACK_NSIS_MENU_LINKS - Specify links in [application] menu.
# This should contain a list of pair "link" "link name". The link
# may be an URL or a path relative to installation prefix.
# Like:
# set(CPACK_NSIS_MENU_LINKS
# "doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cmake.html" "CMake Help"
# "http://www.cmake.org" "CMake Web Site")
##end
#=============================================================================
# Copyright 2006-2009 Kitware, Inc.

View File

@ -4,11 +4,12 @@
# - PackageMaker CPack generator (Mac OS X).
# The following variable is specific to installers build on Mac OS X
# using PackageMaker:
##end
#
##variable
# CPACK_OSX_PACKAGE_VERSION - The version of Mac OS X that the
# resulting PackageMaker archive should be compatible
# with. Different versions of Mac OS X support different
# resulting PackageMaker archive should be compatible with. Different
# versions of Mac OS X support different
# features. For example, CPack can only build component-based
# installers for Mac OS X 10.4 or newer, and can only build
# installers that download component son-the-fly for Mac OS X 10.5

View File

@ -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

View File

@ -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

View File

@ -82,6 +82,7 @@
include(BundleUtilities)
set(DeployQt4_cmake_dir "${CMAKE_CURRENT_LIST_DIR}")
set(DeployQt4_apple_plugins_dir "PlugIns")
function(write_qt4_conf qt_conf_dir qt_conf_contents)
set(qt_conf_path "${qt_conf_dir}/qt.conf")
@ -125,11 +126,17 @@ function(fixup_qt4_executable executable)
if(QT_LIBRARY_DIR)
list(APPEND dirs "${QT_LIBRARY_DIR}")
endif()
if(QT_BINARY_DIR)
list(APPEND dirs "${QT_BINARY_DIR}")
endif()
if(APPLE)
set(qt_conf_dir "${executable}/Contents/Resources")
set(executable_path "${executable}")
set(write_qt_conf TRUE)
if(NOT plugins_dir)
set(plugins_dir "${DeployQt4_apple_plugins_dir}")
endif()
else()
get_filename_component(executable_path "${executable}" PATH)
if(NOT executable_path)
@ -141,7 +148,7 @@ function(fixup_qt4_executable executable)
foreach(plugin ${qtplugins})
set(installed_plugin_path "")
install_qt4_plugin("${plugin}" "${plugins_dir}" "${executable}" 1 installed_plugin_path)
install_qt4_plugin("${plugin}" "${executable}" 1 installed_plugin_path)
list(APPEND libs ${installed_plugin_path})
endforeach()
@ -166,23 +173,19 @@ function(install_qt4_plugin_path plugin executable copy installed_plugin_path_va
set(component ${ARGV5})
set(configurations ${ARGV6})
if(EXISTS "${plugin}")
if(plugins_dir)
set(plugins_dir "${plugins_dir}")
else()
if(APPLE)
set(plugins_dir "PlugIns")
else()
set(plugins_dir "plugins")
if(NOT plugins_dir)
set(plugins_dir "${DeployQt4_apple_plugins_dir}")
endif()
endif()
if(APPLE)
set(plugins_path "${executable}/Contents/${plugins_dir}")
else()
get_filename_component(executable_path "${executable}" PATH)
if(NOT executable_path)
set(executable_path ".")
get_filename_component(plugins_path "${executable}" PATH)
if(NOT plugins_path)
set(plugins_path ".")
endif()
if(plugins_dir)
set(plugins_path "${plugins_path}/${plugins_dir}")
endif()
set(plugins_path "${executable_path}/${plugins_dir}")
endif()
set(plugin_group "")
@ -210,7 +213,7 @@ function(install_qt4_plugin_path plugin executable copy installed_plugin_path_va
endif()
install(FILES "${plugin}" DESTINATION "${plugins_path}" ${configurations} ${component})
endif()
set(${installed_plugin_path_var} ${${installed_path_var}} "${plugins_path}/${plugin_name}" PARENT_SCOPE)
set(${installed_plugin_path_var} "${plugins_path}/${plugin_name}" PARENT_SCOPE)
endif()
endfunction()
@ -219,12 +222,8 @@ function(install_qt4_plugin plugin executable copy installed_plugin_path_var)
set(component ${ARGV5})
if(EXISTS "${plugin}")
install_qt4_plugin_path("${plugin}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}")
else()
if(QT_IS_STATIC)
string(TOUPPER "QT_${plugin}_LIBRARY" plugin_var)
else()
string(TOUPPER "QT_${plugin}_PLUGIN" plugin_var)
endif()
set(plugin_release_var "${plugin_var}_RELEASE")
set(plugin_debug_var "${plugin_var}_DEBUG")
set(plugin_release "${${plugin_release_var}}")
@ -232,10 +231,24 @@ function(install_qt4_plugin plugin executable copy installed_plugin_path_var)
if(DEFINED "${plugin_release_var}" AND DEFINED "${plugin_debug_var}" AND NOT EXISTS "${plugin_release}" AND NOT EXISTS "${plugin_debug}")
message(WARNING "Qt plugin \"${plugin}\" not recognized or found.")
endif()
install_qt4_plugin_path("${plugin_release}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}" "Release|RelWithDebInfo|MinSizeRel")
install_qt4_plugin_path("${plugin_debug}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}" "Debug")
if(NOT EXISTS "${${plugin_debug_var}}")
set(plugin_debug "${plugin_release}")
endif()
set(installed_plugin_path_var "${installed_plugin_path_var}" PARENT_SCOPE)
if(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
install_qt4_plugin_path("${plugin_release}" "${executable}" "${copy}" "${installed_plugin_path_var}_release" "${plugins_dir}" "${component}" "Release|RelWithDebInfo|MinSizeRel")
install_qt4_plugin_path("${plugin_debug}" "${executable}" "${copy}" "${installed_plugin_path_var}_debug" "${plugins_dir}" "${component}" "Debug")
if(CMAKE_BUILD_TYPE MATCHES "^Debug$")
set(${installed_plugin_path_var} ${${installed_plugin_path_var}_debug})
else()
set(${installed_plugin_path_var} ${${installed_plugin_path_var}_release})
endif()
else()
install_qt4_plugin_path("${plugin_release}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}")
endif()
endif()
set(${installed_plugin_path_var} ${${installed_plugin_path_var}} PARENT_SCOPE)
endfunction()
function(install_qt4_executable executable)
@ -248,6 +261,9 @@ function(install_qt4_executable executable)
if(QT_LIBRARY_DIR)
list(APPEND dirs "${QT_LIBRARY_DIR}")
endif()
if(QT_BINARY_DIR)
list(APPEND dirs "${QT_BINARY_DIR}")
endif()
if(component)
set(component COMPONENT ${component})
else()
@ -264,15 +280,15 @@ function(install_qt4_executable executable)
set(qt_plugins_dir "")
endif()
if(NOT qtplugins AND QT_LIBRARIES_PLUGINS)
set(qtplugins "${QT_LIBRARIES_PLUGINS}")
endif()
if(QT_IS_STATIC)
message(WARNING "Qt built statically: not installing plugins.")
else()
foreach(plugin ${qtplugins})
set(installed_plugin_paths "")
install_qt4_plugin("${plugin}" "${executable}" 0 installed_plugin_paths "${plugins_dir}" "${component}")
list(APPEND libs ${installed_plugin_paths})
endforeach()
endif()
resolve_qt4_paths(libs)

View File

@ -5,6 +5,8 @@
# GNUPLOT_FOUND - system has Gnuplot
# GNUPLOT_EXECUTABLE - the Gnuplot executable
# GNUPLOT_VERSION_STRING - the version of Gnuplot found (since CMake 2.8.8)
#
# GNUPLOT_VERSION_STRING will not work for old versions like 3.7.1.
#=============================================================================
# Copyright 2002-2009 Kitware, Inc.

View File

@ -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)

View File

@ -27,6 +27,8 @@
# ImageMagick_VERSION_STRING - the version of ImageMagick found
# (since CMake 2.8.8)
#
# ImageMagick_VERSION_STRING will not work for old versions like 5.2.3.
#
# There are also components for the following ImageMagick APIs:
#
# Magick++
@ -171,7 +173,7 @@ FOREACH(component ${ImageMagick_FIND_COMPONENTS}
ELSEIF(ImageMagick_${component}_EXECUTABLE)
# if no components were requested explicitly put all (default) executables
# in the list
LIST(APPEND ImageMagick_DEFAULT_EXECUTABLES "${ImageMagick_${component}_EXECUTABLE}")
LIST(APPEND ImageMagick_DEFAULT_EXECUTABLES ImageMagick_${component}_EXECUTABLE)
ENDIF(ImageMagick_FIND_COMPONENTS)
ENDIF(component STREQUAL "Magick++")
ENDFOREACH(component)

View File

@ -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)

View File

@ -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})

View File

@ -10,11 +10,14 @@
# 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.
# Copyright 2011 Bjoern Ricks <bjoern.ricks@gmail.com>
# Copyright 2012 Rolf Eike Beer <eike@sf-mail.de>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@ -88,24 +91,42 @@ endif()
# determine python version string
if(PYTHON_EXECUTABLE)
execute_process(COMMAND "${PYTHON_EXECUTABLE}" --version
ERROR_VARIABLE _VERSION
execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c
"import sys; sys.stdout.write(';'.join([str(x) for x in sys.version_info[:3]]))"
OUTPUT_VARIABLE _VERSION
RESULT_VARIABLE _PYTHON_VERSION_RESULT
OUTPUT_QUIET
ERROR_STRIP_TRAILING_WHITESPACE)
if(_PYTHON_VERSION_RESULT)
execute_process(COMMAND "${PYTHON_EXECUTABLE}" -V
ERROR_VARIABLE _VERSION
ERROR_QUIET)
if(NOT _PYTHON_VERSION_RESULT)
string(REPLACE ";" "." PYTHON_VERSION_STRING "${_VERSION}")
list(GET _VERSION 0 PYTHON_VERSION_MAJOR)
list(GET _VERSION 1 PYTHON_VERSION_MINOR)
list(GET _VERSION 2 PYTHON_VERSION_PATCH)
if(PYTHON_VERSION_PATCH EQUAL 0)
# it's called "Python 2.7", not "2.7.0"
string(REGEX REPLACE "\\.0$" "" PYTHON_VERSION_STRING "${PYTHON_VERSION_STRING}")
endif()
else()
# sys.version predates sys.version_info, so use that
execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c "import sys; sys.stdout.write(sys.version)"
OUTPUT_VARIABLE _VERSION
RESULT_VARIABLE _PYTHON_VERSION_RESULT
OUTPUT_QUIET
ERROR_STRIP_TRAILING_WHITESPACE)
endif(_PYTHON_VERSION_RESULT)
if(NOT _PYTHON_VERSION_RESULT AND _VERSION MATCHES "^Python [0-9]+\\.[0-9]+.*")
string(REPLACE "Python " "" PYTHON_VERSION_STRING "${_VERSION}")
ERROR_QUIET)
if(NOT _PYTHON_VERSION_RESULT)
string(REGEX REPLACE " .*" "" PYTHON_VERSION_STRING "${_VERSION}")
string(REGEX REPLACE "^([0-9]+)\\.[0-9]+.*" "\\1" PYTHON_VERSION_MAJOR "${PYTHON_VERSION_STRING}")
string(REGEX REPLACE "^[0-9]+\\.([0-9])+.*" "\\1" PYTHON_VERSION_MINOR "${PYTHON_VERSION_STRING}")
if(PYTHON_VERSION_STRING MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+.*")
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" PYTHON_VERSION_PATCH "${PYTHON_VERSION_STRING}")
else()
set(PYTHON_VERSION_PATCH "0")
endif()
else()
# sys.version was first documented for Python 1.5, so assume
# this is older.
set(PYTHON_VERSION_STRING "1.4")
set(PYTHON_VERSION_MAJOR "1")
set(PYTHON_VERSION_MAJOR "4")
set(PYTHON_VERSION_MAJOR "0")
endif()
endif()
unset(_PYTHON_VERSION_RESULT)

View File

@ -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

View File

@ -5,6 +5,7 @@
# QT_DEFINITIONS - definitions to use when
# compiling code that uses Qt.
# QT_FOUND - If false, don't try to use Qt.
# QT_VERSION_STRING - the version of Qt found
#
# If you need the multithreaded version of Qt, set QT_MT_REQUIRED to TRUE
#
@ -46,13 +47,16 @@ IF(QT4_FOUND)
ENDIF(QT4_FOUND)
FILE(GLOB GLOB_PATHS_BIN /usr/lib/qt-3*/bin/)
FILE(GLOB GLOB_PATHS /usr/lib/qt-3*)
FOREACH(GLOB_PATH ${GLOB_PATHS})
LIST(APPEND GLOB_PATHS_BIN "${GLOB_PATH}/bin")
ENDFOREACH(GLOB_PATH)
FIND_PATH(QT_INCLUDE_DIR qt.h
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/include/Qt"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/include/Qt"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/include/Qt"
$ENV{QTDIR}/include
${GLOB_PATHS_BIN}
${GLOB_PATHS}
/usr/local/qt/include
/usr/lib/qt/include
/usr/lib/qt3/include
@ -71,12 +75,13 @@ ENDIF(NOT EXISTS ${QT_INCLUDE_DIR}/qglobal.h)
IF(QT_INCLUDE_DIR)
#extract the version string from qglobal.h
FILE(READ ${QT_INCLUDE_DIR}/qglobal.h QGLOBAL_H)
STRING(REGEX MATCH "#define[\t ]+QT_VERSION_STR[\t ]+\"([0-9]+.[0-9]+.[0-9]+)\"" QGLOBAL_H "${QGLOBAL_H}")
STRING(REGEX REPLACE ".*\"([0-9]+.[0-9]+.[0-9]+)\".*" "\\1" qt_version_str "${QGLOBAL_H}")
STRING(REGEX MATCH "#define[\t ]+QT_VERSION_STR[\t ]+\"[0-9]+.[0-9]+.[0-9]+[a-z]*\"" QGLOBAL_H "${QGLOBAL_H}")
STRING(REGEX REPLACE ".*\"([0-9]+.[0-9]+.[0-9]+[a-z]*)\".*" "\\1" qt_version_str "${QGLOBAL_H}")
# Under windows the qt library (MSVC) has the format qt-mtXYZ where XYZ is the
# version X.Y.Z, so we need to remove the dots from version
STRING(REGEX REPLACE "\\." "" qt_version_str_lib "${qt_version_str}")
SET(QT_VERSION_STRING "${qt_version_str}")
ENDIF(QT_INCLUDE_DIR)
FILE(GLOB GLOB_PATHS_LIB /usr/lib/qt-3*/lib/)
@ -195,58 +200,16 @@ IF (WIN32)
)
ENDIF (WIN32)
IF (QT_MIN_VERSION)
STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" qt_major_vers "${qt_version_str}")
STRING(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" qt_minor_vers "${qt_version_str}")
STRING(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" qt_patch_vers "${qt_version_str}")
#now parse the parts of the user given version string into variables
STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+$" req_qt_major_vers "${QT_MIN_VERSION}")
IF (NOT req_qt_major_vers)
error_message( "Invalid Qt version string given: \"${QT_MIN_VERSION}\", expected e.g. \"3.1.5\"")
ENDIF (NOT req_qt_major_vers)
STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" req_qt_major_vers "${QT_MIN_VERSION}")
STRING(REGEX REPLACE "[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" req_qt_minor_vers "${QT_MIN_VERSION}")
STRING(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" req_qt_patch_vers "${QT_MIN_VERSION}")
# req = "6.5.4", qt = "3.2.1"
MACRO(error_message msg)
IF(QT3_REQUIRED)
MESSAGE( FATAL_ERROR ${msg})
ELSE(QT3_REQUIRED)
MESSAGE( STATUS ${msg})
ENDIF(QT3_REQUIRED)
ENDMACRO(error_message)
IF (req_qt_major_vers GREATER qt_major_vers) # (6 > 3) ?
ERROR_MESSAGE( "Qt major version not matched (required: ${QT_MIN_VERSION}, found: ${qt_version_str})") # yes
ELSE (req_qt_major_vers GREATER qt_major_vers) # no
IF (req_qt_major_vers LESS qt_major_vers) # (6 < 3) ?
SET( QT_VERSION_BIG_ENOUGH "YES" ) # yes
ELSE (req_qt_major_vers LESS qt_major_vers) # ( 6==3) ?
IF (req_qt_minor_vers GREATER qt_minor_vers) # (5>2) ?
ERROR_MESSAGE( "Qt minor version not matched (required: ${QT_MIN_VERSION}, found: ${qt_version_str})") # yes
ELSE (req_qt_minor_vers GREATER qt_minor_vers) # no
IF (req_qt_minor_vers LESS qt_minor_vers) # (5<2) ?
SET( QT_VERSION_BIG_ENOUGH "YES" ) # yes
ELSE (req_qt_minor_vers LESS qt_minor_vers) # (5==2)
IF (req_qt_patch_vers GREATER qt_patch_vers) # (4>1) ?
ERROR_MESSAGE( "Qt patch level not matched (required: ${QT_MIN_VERSION}, found: ${qt_version_str})") # yes
ELSE (req_qt_patch_vers GREATER qt_patch_vers) # (4>1) ?
SET( QT_VERSION_BIG_ENOUGH "YES" ) # yes
ENDIF (req_qt_patch_vers GREATER qt_patch_vers) # (4>1) ?
ENDIF (req_qt_minor_vers LESS qt_minor_vers)
ENDIF (req_qt_minor_vers GREATER qt_minor_vers)
ENDIF (req_qt_major_vers LESS qt_major_vers)
ENDIF (req_qt_major_vers GREATER qt_major_vers)
ENDIF (QT_MIN_VERSION)
#support old QT_MIN_VERSION if set, but not if version is supplied by find_package()
IF(NOT Qt3_FIND_VERSION AND QT_MIN_VERSION)
SET(Qt3_FIND_VERSION ${QT_MIN_VERSION})
ENDIF(NOT Qt3_FIND_VERSION AND QT_MIN_VERSION)
# if the include a library are found then we have it
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qt3 DEFAULT_MSG QT_QT_LIBRARY QT_INCLUDE_DIR QT_MOC_EXECUTABLE)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qt3
REQUIRED_VARS QT_QT_LIBRARY QT_INCLUDE_DIR QT_MOC_EXECUTABLE
VERSION_VAR QT_VERSION_STRING)
SET(QT_FOUND ${QT3_FOUND} )
IF(QT_FOUND)
@ -296,8 +259,16 @@ IF(QT_FOUND)
ENDIF(QT_QT_LIBRARY MATCHES "qt-mt")
ENDIF(QT_FOUND)
EXEC_PROGRAM(${QT_MOC_EXECUTABLE} ARGS "-v" OUTPUT_VARIABLE QTVERSION_MOC)
EXEC_PROGRAM(${QT_UIC_EXECUTABLE} ARGS "-version" OUTPUT_VARIABLE QTVERSION_UIC)
IF(QT_MOC_EXECUTABLE)
EXECUTE_PROCESS(COMMAND ${QT_MOC_EXECUTABLE} "-v"
OUTPUT_VARIABLE QTVERSION_MOC
ERROR_QUIET)
ENDIF(QT_MOC_EXECUTABLE)
IF(QT_UIC_EXECUTABLE)
EXECUTE_PROCESS(COMMAND ${QT_UIC_EXECUTABLE} "-version"
OUTPUT_VARIABLE QTVERSION_UIC
ERROR_QUIET)
ENDIF(QT_UIC_EXECUTABLE)
SET(_QT_UIC_VERSION_3 FALSE)
IF("${QTVERSION_UIC}" MATCHES ".* 3..*")

View File

@ -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,47 +149,21 @@ 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")
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")
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")
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()
endif()
# Exclude XL here because it misinterprets -fvisibility=hidden even though

View File

@ -1,2 +1 @@
include(Platform/Windows-Borland)
__borland_language(C)
include(Platform/Windows-Embarcadero-C)

View File

@ -1,2 +1 @@
include(Platform/Windows-Borland)
__borland_language(CXX)
include(Platform/Windows-Embarcadero-CXX)

View File

@ -0,0 +1,3 @@
set(_lang C)
include(Platform/Windows-Embarcadero)
__embarcadero_language(C)

View File

@ -0,0 +1,3 @@
set(_lang CXX)
include(Platform/Windows-Embarcadero)
__embarcadero_language(CXX)

View File

@ -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")

View File

@ -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)
#

View File

@ -1,31 +1,6 @@
# WRITE_BASIC_CONFIG_VERSION_FILE( filename VERSION major.minor.patch COMPATIBILITY (AnyNewerVersion|SameMajorVersion) )
#
# Writes a file for use as <package>ConfigVersion.cmake file to <filename>.
# See the documentation of FIND_PACKAGE() for details on this.
# filename is the output filename, it should be in the build tree.
# major.minor.patch is the version number of the project to be installed
# The COMPATIBILITY mode AnyNewerVersion means that the installed package version
# will be considered compatible if it is newer or exactly the same as the requested version.
# If SameMajorVersion is used instead, then the behaviour differs from AnyNewerVersion
# in that the major version number must be the same as requested, e.g. version 2.0 will
# not be considered compatible if 1.0 is requested.
# If your project has more elaborated version matching rules, you will need to write your
# own custom ConfigVersion.cmake file instead of using this macro.
#
# Example:
# write_basic_config_version_file(${CMAKE_CURRENT_BINARY_DIR}/FooConfigVersion.cmake
# VERSION 1.2.3
# COMPATIBILITY SameMajorVersion )
# install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FooConfigVersion.cmake
# ${CMAKE_CURRENT_BINARY_DIR}/FooConfig.cmake
# DESTINATION lib/cmake/Foo )
#
# Internally, this macro executes configure_file() to create the resulting
# version file. Depending on the COMPATIBLITY, either the file
# BasicConfigVersion-SameMajorVersion.cmake.in or BasicConfigVersion-AnyNewerVersion.cmake.in
# is used. Please note that these two files are internal to CMake and you should
# not call configure_file() on them yourself, but they can be used as starting
# point to create more sophisticted custom ConfigVersion.cmake files.
# Deprecated, see WRITE_BASIC_PACKAGE_VERSION_FILE(), it is identical.
#=============================================================================
# Copyright 2008-2011 Alexander Neundorf, <neundorf@kde.org>

View File

@ -185,6 +185,8 @@ SET(SRCS
cmGeneratedFileStream.cxx
cmGeneratorExpression.cxx
cmGeneratorExpression.h
cmGeneratorTarget.cxx
cmGeneratorTarget.h
cmGlobalGenerator.cxx
cmGlobalGenerator.h
cmGlobalUnixMakefileGenerator3.cxx

View File

@ -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 "
"is 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");
}

View File

@ -421,6 +421,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
if(ifs.is_open())
{
cmGeneratedFileStream osf(sla_r.c_str());
osf << "#include <CoreServices/CoreServices.r>\n\n";
osf << SLAHeader;
osf << "\n";
osf << "data 'TEXT' (5002, \"English\") {\n";
@ -481,12 +482,10 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
// Rez the SLA
cmOStringStream embed_sla_command;
embed_sla_command << "/bin/bash -c \""; // need expansion of "*.r"
embed_sla_command << this->GetOption("CPACK_COMMAND_REZ");
embed_sla_command << " /Developer/Headers/FlatCarbon/*.r ";
embed_sla_command << "'" << sla_r << "'";
embed_sla_command << " \"" << sla_r << "\"";
embed_sla_command << " -a -o ";
embed_sla_command << "'" << temp_udco << "'\"";
embed_sla_command << "\"" << temp_udco << "\"";
if(!this->RunCommand(embed_sla_command, &error))
{

View File

@ -43,12 +43,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "ctest_build";}
virtual const char* GetName() const { return "ctest_build";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Build the project.";
}
@ -57,7 +57,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" ctest_build([BUILD build_dir] [TARGET target] [RETURN_VALUE res]\n"

View File

@ -38,12 +38,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "ctest_configure";}
virtual const char* GetName() const { return "ctest_configure";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Configure the project build tree.";
}
@ -51,7 +51,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" ctest_configure([BUILD build_dir] [SOURCE source_dir] [APPEND]\n"

View File

@ -39,12 +39,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "ctest_coverage";}
virtual const char* GetName() const { return "ctest_coverage";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Collect coverage tool results.";
}
@ -52,7 +52,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" ctest_coverage([BUILD build_dir] [RETURN_VALUE res] [APPEND]\n"

View File

@ -48,12 +48,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "ctest_empty_binary_directory";}
virtual const char* GetName() const { return "ctest_empty_binary_directory";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "empties the binary directory";
}
@ -61,7 +61,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" ctest_empty_binary_directory( directory )\n"

View File

@ -41,12 +41,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "ctest_memcheck";}
virtual const char* GetName() const { return "ctest_memcheck";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Run tests with a dynamic analysis tool.";
}
@ -54,7 +54,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" ctest_memcheck([BUILD build_dir] [RETURN_VALUE res] [APPEND]\n"

View File

@ -46,12 +46,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "ctest_read_custom_files";}
virtual const char* GetName() const { return "ctest_read_custom_files";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "read CTestCustom files.";
}
@ -59,7 +59,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" ctest_read_custom_files( directory ... )\n"

View File

@ -47,12 +47,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "ctest_run_script";}
virtual const char* GetName() const { return "ctest_run_script";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "runs a ctest -S script";
}
@ -60,7 +60,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" ctest_run_script([NEW_PROCESS] script_file_name script_file_name1 \n"

View File

@ -47,12 +47,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "ctest_sleep";}
virtual const char* GetName() const { return "ctest_sleep";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "sleeps for some amount of time";
}
@ -60,7 +60,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" ctest_sleep(<seconds>)\n"

View File

@ -55,12 +55,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "ctest_start";}
virtual const char* GetName() const { return "ctest_start";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Starts the testing for a given model";
}
@ -68,7 +68,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" ctest_start(Model [TRACK <track>] [APPEND] [source [binary]])\n"

View File

@ -48,12 +48,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "ctest_submit";}
virtual const char* GetName() const { return "ctest_submit";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Submit results to a dashboard server.";
}
@ -61,7 +61,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" ctest_submit([PARTS ...] [FILES ...] [RETRY_COUNT count] "

View File

@ -39,12 +39,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "ctest_test";}
virtual const char* GetName() const { return "ctest_test";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Run tests in the project build tree.";
}
@ -52,7 +52,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" ctest_test([BUILD build_dir] [APPEND]\n"

View File

@ -59,11 +59,11 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "subdirs";}
virtual const char* GetName() const { return "subdirs";}
// Unused methods
virtual const char* GetTerseDocumentation() { return ""; }
virtual const char* GetFullDocumentation() { return ""; }
virtual const char* GetTerseDocumentation() const { return ""; }
virtual const char* GetFullDocumentation() const { return ""; }
cmTypeMacro(cmCTestSubdirCommand, cmCommand);
@ -161,11 +161,11 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "add_subdirectory";}
virtual const char* GetName() const { return "add_subdirectory";}
// Unused methods
virtual const char* GetTerseDocumentation() { return ""; }
virtual const char* GetFullDocumentation() { return ""; }
virtual const char* GetTerseDocumentation() const { return ""; }
virtual const char* GetFullDocumentation() const { return ""; }
cmTypeMacro(cmCTestAddSubdirectoryCommand, cmCommand);
@ -251,11 +251,11 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "ADD_TEST";}
virtual const char* GetName() const { return "ADD_TEST";}
// Unused methods
virtual const char* GetTerseDocumentation() { return ""; }
virtual const char* GetFullDocumentation() { return ""; }
virtual const char* GetTerseDocumentation() const { return ""; }
virtual const char* GetFullDocumentation() const { return ""; }
cmTypeMacro(cmCTestAddTestCommand, cmCommand);
@ -299,11 +299,11 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "SET_TESTS_PROPERTIES";}
virtual const char* GetName() const { return "SET_TESTS_PROPERTIES";}
// Unused methods
virtual const char* GetTerseDocumentation() { return ""; }
virtual const char* GetFullDocumentation() { return ""; }
virtual const char* GetTerseDocumentation() const { return ""; }
virtual const char* GetFullDocumentation() const { return ""; }
cmTypeMacro(cmCTestSetTestsPropertiesCommand, cmCommand);

View File

@ -39,12 +39,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "ctest_update";}
virtual const char* GetName() const { return "ctest_update";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Update the work tree from version control.";
}
@ -52,7 +52,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" ctest_update([SOURCE source] [RETURN_VALUE res])\n"

View File

@ -43,12 +43,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "ctest_upload";}
virtual const char* GetName() const { return "ctest_upload";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Upload files to a dashboard server.";
}
@ -56,7 +56,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" ctest_upload(FILES ...)\n"

View File

@ -44,12 +44,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() {return "add_custom_command";}
virtual const char* GetName() const {return "add_custom_command";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Add a custom build rule to the generated build system.";
}
@ -57,7 +57,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
"There are two main signatures for add_custom_command "

View File

@ -42,13 +42,13 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName()
virtual const char* GetName() const
{return "add_custom_target";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Add a target with no output so it will always be built.";
}
@ -56,7 +56,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" add_custom_target(Name [ALL] [command1 [args1...]]\n"

View File

@ -41,12 +41,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() {return "add_definitions";}
virtual const char* GetName() const {return "add_definitions";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Adds -D define flags to the compilation of source files.";
}
@ -54,7 +54,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" add_definitions(-DFOO -DBAR ...)\n"

View File

@ -40,12 +40,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "add_dependencies";}
virtual const char* GetName() const { return "add_dependencies";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Add a dependency between top-level targets.";
}
@ -53,7 +53,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" add_dependencies(target-name depend-target1\n"

View File

@ -41,12 +41,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "add_executable";}
virtual const char* GetName() const { return "add_executable";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return
"Add an executable to the project using the specified source files.";
@ -55,7 +55,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" add_executable(<name> [WIN32] [MACOSX_BUNDLE]\n"

View File

@ -64,6 +64,12 @@ bool cmAddLibraryCommand
type = cmTarget::MODULE_LIBRARY;
haveSpecifiedType = true;
}
else if(libType == "OBJECT")
{
++s;
type = cmTarget::OBJECT_LIBRARY;
haveSpecifiedType = true;
}
else if(libType == "UNKNOWN")
{
++s;
@ -118,6 +124,14 @@ bool cmAddLibraryCommand
this->SetError("called with IMPORTED argument but no library type.");
return false;
}
if(type == cmTarget::OBJECT_LIBRARY)
{
this->Makefile->IssueMessage(
cmake::FATAL_ERROR,
"The OBJECT library type may not be used for IMPORTED libraries."
);
return true;
}
// Make sure the target does not already exist.
if(this->Makefile->FindTargetToUse(libName.c_str()))

View File

@ -41,12 +41,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "add_library";}
virtual const char* GetName() const { return "add_library";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Add a library to the project using the specified source files.";
}
@ -54,7 +54,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" add_library(<name> [STATIC | SHARED | MODULE]\n"

View File

@ -42,12 +42,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "add_subdirectory";}
virtual const char* GetName() const { return "add_subdirectory";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Add a subdirectory to the build.";
}
@ -55,7 +55,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" add_subdirectory(source_dir [binary_dir] \n"

View File

@ -41,12 +41,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "add_test";}
virtual const char* GetName() const { return "add_test";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Add a test to the project with the specified arguments.";
}
@ -54,7 +54,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" add_test(testname Exename arg1 arg2 ... )\n"

View File

@ -44,12 +44,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "aux_source_directory";}
virtual const char* GetName() const { return "aux_source_directory";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Find all source files in a directory.";
}
@ -57,7 +57,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" aux_source_directory(<dir> <variable>)\n"

View File

@ -40,17 +40,17 @@ public:
/**
* This determines if the command is invoked when in script mode.
*/
virtual bool IsScriptable() { return true; }
virtual bool IsScriptable() const { return true; }
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() {return "break";}
virtual const char* GetName() const {return "break";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Break from an enclosing foreach or while loop.";
}
@ -58,7 +58,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" break()\n"

View File

@ -50,12 +50,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() {return "build_command";}
virtual const char* GetName() const {return "build_command";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Get the command line to build this project.";
}
@ -63,7 +63,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" build_command(<variable>\n"

View File

@ -40,17 +40,17 @@ public:
/**
* This determines if the command is invoked when in script mode.
*/
virtual bool IsScriptable() { return true; }
virtual bool IsScriptable() const { return true; }
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() {return "build_name";}
virtual const char* GetName() const {return "build_name";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return
"Deprecated. Use ${CMAKE_SYSTEM} and ${CMAKE_CXX_COMPILER} instead.";
@ -59,7 +59,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" build_name(variable)\n"
@ -69,7 +69,7 @@ public:
}
/** This command is kept for compatibility with older CMake versions. */
virtual bool IsDiscouraged()
virtual bool IsDiscouraged() const
{
return true;
}

View File

@ -40,17 +40,17 @@ public:
/**
* This determines if the command is invoked when in script mode.
*/
virtual bool IsScriptable() { return true; }
virtual bool IsScriptable() const { return true; }
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() {return "cmake_minimum_required";}
virtual const char* GetName() const {return "cmake_minimum_required";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Set the minimum required version of cmake for a project.";
}
@ -58,7 +58,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" cmake_minimum_required(VERSION major[.minor[.patch[.tweak]]]\n"

View File

@ -41,17 +41,17 @@ public:
/**
* This determines if the command is invoked when in script mode.
*/
virtual bool IsScriptable() { return true; }
virtual bool IsScriptable() const { return true; }
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() {return "cmake_policy";}
virtual const char* GetName() const {return "cmake_policy";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Manage CMake Policy settings.";
}
@ -59,7 +59,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
"As CMake evolves it is sometimes necessary to change existing "

View File

@ -96,7 +96,7 @@ public:
/**
* This determines if the command is invoked when in script mode.
*/
virtual bool IsScriptable()
virtual bool IsScriptable() const
{
return false;
}
@ -105,7 +105,7 @@ public:
* This determines if usage of the method is discouraged or not.
* This is currently only used for generating the documentation.
*/
virtual bool IsDiscouraged()
virtual bool IsDiscouraged() const
{
return false;
}
@ -116,7 +116,7 @@ public:
* cmMacroHelperCommand and cmFunctionHelperCommand
* which cannot provide appropriate documentation.
*/
virtual bool ShouldAppearInDocumentation()
virtual bool ShouldAppearInDocumentation() const
{
return true;
}
@ -124,17 +124,17 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() = 0;
virtual const char* GetName() const = 0;
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation() = 0;
virtual const char* GetTerseDocumentation() const = 0;
/**
* More documentation.
*/
virtual const char* GetFullDocumentation() = 0;
virtual const char* GetFullDocumentation() const = 0;
/**
* Enable the command.
@ -151,7 +151,7 @@ public:
/**
* Query whether the command is enabled.
*/
bool GetEnabled()
bool GetEnabled() const
{return this->Enabled;}
/**

View File

@ -81,7 +81,6 @@ private:
cmStdString InputBuffer;
std::vector<char> OutputBuffer;
int CurrentLine;
int UnionsAvailable;
int Verbose;
void Print(const char* place, const char* str);

View File

@ -27,7 +27,7 @@
This file computes an ordered list of link items to use when linking a
single target in one configuration. Each link item is identified by
the string naming it. A graph of dependencies is created in which
each node corresponds to one item and directed eges lead from nodes to
each node corresponds to one item and directed edges lead from nodes to
those which must *follow* them on the link line. For example, the
graph
@ -42,7 +42,7 @@ search of the link dependencies starting from the main target.
There are two types of items: those with known direct dependencies and
those without known dependencies. We will call the two types "known
items" and "unknown items", respecitvely. Known items are those whose
items" and "unknown items", respectively. Known items are those whose
names correspond to targets (built or imported) and those for which an
old-style <item>_LIB_DEPENDS variable is defined. All other items are
unknown and we must infer dependencies for them. For items that look
@ -150,7 +150,7 @@ times the component needs to be seen (once for trivial components,
twice for non-trivial). If at any time another component finishes and
re-adds an already pending component, the pending component is reset
so that it needs to be seen in its entirety again. This ensures that
all dependencies of a component are satisified no matter where it
all dependencies of a component are satisfied no matter where it
appears.
After the original link line has been completed, we append to it the
@ -633,6 +633,19 @@ cmTarget* cmComputeLinkDepends::FindTargetToLink(int depender_index,
tgt = 0;
}
if(tgt && tgt->GetType() == cmTarget::OBJECT_LIBRARY)
{
cmOStringStream e;
e << "Target \"" << this->Target->GetName() << "\" links to "
"OBJECT library \"" << tgt->GetName() << "\" but this is not "
"allowed. "
"One may link only to STATIC or SHARED libraries, or to executables "
"with the ENABLE_EXPORTS property set.";
this->CMakeInstance->IssueMessage(cmake::FATAL_ERROR, e.str(),
this->Target->GetBacktrace());
tgt = 0;
}
// Return the target found, if any.
return tgt;
}

View File

@ -1772,6 +1772,7 @@ void cmComputeLinkInformation::GetRPath(std::vector<std::string>& runtimeDirs,
!linking_for_install);
bool use_link_rpath =
outputRuntime && linking_for_install &&
!this->Makefile->IsOn("CMAKE_SKIP_INSTALL_RPATH") &&
this->Target->GetPropertyAsBool("INSTALL_RPATH_USE_LINK_PATH");
// Construct the RPATH.

View File

@ -31,7 +31,7 @@ dependencies for each target such that no cycles are left and the
build order is safe.
For most target types cyclic dependencies are not allowed. However
STATIC libraries may depend on each other in a cyclic fasion. In
STATIC libraries may depend on each other in a cyclic fashion. In
general the directed dependency graph forms a directed-acyclic-graph
of strongly connected components. All strongly connected components
should consist of only STATIC_LIBRARY targets.

View File

@ -34,17 +34,17 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "configure_file";}
virtual const char* GetName() const { return "configure_file";}
/**
* This determines if the command is invoked when in script mode.
*/
virtual bool IsScriptable() { return true; }
virtual bool IsScriptable() const { return true; }
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Copy a file to another location and modify its contents.";
}
@ -52,7 +52,7 @@ public:
/**
* Longer documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" configure_file(<input> <output>\n"

View File

@ -153,11 +153,11 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
std::string ccFile = this->BinaryDirectory + "/CMakeCache.txt";
cmSystemTools::RemoveFile(ccFile.c_str());
// we need to create a directory and CMakeList file etc...
// we need to create a directory and CMakeLists file etc...
// first create the directories
sourceDirectory = this->BinaryDirectory.c_str();
// now create a CMakeList.txt file in that directory
// now create a CMakeLists.txt file in that directory
FILE *fout = fopen(outFileName.c_str(),"w");
if (!fout)
{

View File

@ -70,7 +70,7 @@ bool cmCreateTestSourceList
if (cmSystemTools::GetFilenameExtension(*i).size() < 2)
{
this->SetError(
"You must specify a file extenion for the test driver file.");
"You must specify a file extension for the test driver file.");
return false;
}
std::string driver = this->Makefile->GetCurrentOutputDirectory();

View File

@ -40,12 +40,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() {return "create_test_sourcelist";}
virtual const char* GetName() const {return "create_test_sourcelist";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Create a test driver and source list for building test programs.";
}
@ -53,7 +53,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" create_test_sourcelist(sourceListName driverName\n"

View File

@ -32,12 +32,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "define_property";}
virtual const char* GetName() const { return "define_property";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Define and document custom properties.";
}
@ -45,7 +45,7 @@ public:
/**
* Longer documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" define_property(<GLOBAL | DIRECTORY | TARGET | SOURCE |\n"

View File

@ -261,11 +261,13 @@ bool cmDepends::CheckDependencies(std::istream& internalDepends,
void cmDepends::SetIncludePathFromLanguage(const char* lang)
{
// Look for the new per "TARGET_" variant first:
const char * includePath = 0;
std::string includePathVar = "CMAKE_";
includePathVar += lang;
includePathVar += "_TARGET_INCLUDE_PATH";
cmMakefile* mf = this->LocalGenerator->GetMakefile();
if(const char* includePath = mf->GetDefinition(includePathVar.c_str()))
includePath = mf->GetDefinition(includePathVar.c_str());
if(includePath)
{
cmSystemTools::ExpandListArgument(includePath, this->IncludePath);
}
@ -275,7 +277,8 @@ void cmDepends::SetIncludePathFromLanguage(const char* lang)
includePathVar = "CMAKE_";
includePathVar += lang;
includePathVar += "_INCLUDE_PATH";
if(const char* includePath = mf->GetDefinition(includePathVar.c_str()))
includePath = mf->GetDefinition(includePathVar.c_str());
if(includePath)
{
cmSystemTools::ExpandListArgument(includePath, this->IncludePath);
}

View File

@ -30,7 +30,7 @@
class cmDependsFortranSourceInfo
{
public:
// The name of the soruce file.
// The name of the source file.
std::string Source;
// Set of provided and required modules.
@ -810,8 +810,8 @@ bool cmDependsFortran::ModulesDiffer(const char* modFile,
* -GNU
* -Intel
*
* Eat the stream content until all recompile only realated changes
* are left bedind.
* Eat the stream content until all recompile only related changes
* are left behind.
*/
if (strcmp(compilerId, "GNU") == 0 )
{
@ -852,7 +852,7 @@ bool cmDependsFortran::ModulesDiffer(const char* modFile,
}
}
// Compare the remainng content. If no compiler id matched above,
// Compare the remaining content. If no compiler id matched above,
// including the case none was given, this will compare the whole
// content.
if(!cmDependsFortranStreamsDiffer(finModFile, finStampFile))
@ -1209,7 +1209,7 @@ void cmDependsFortranParser_RuleElif(cmDependsFortranParser* parser)
* cmDependsFortranParser_RuleIf(..)
*/
// Allways taken unless an #ifdef or #ifndef-branch has been taken
// Always taken unless an #ifdef or #ifndef-branch has been taken
// already. If the second condition isn't meet already
// (parser->InPPFalseBranch == 0) correct it.
if(!parser->SkipToEnd.empty() &&
@ -1228,7 +1228,7 @@ void cmDependsFortranParser_RuleElse(cmDependsFortranParser* parser)
return;
}
// parser->InPPFalseBranch is either 0 or 1. We change it denpending on
// parser->InPPFalseBranch is either 0 or 1. We change it depending on
// parser->SkipToEnd.top()
if(!parser->SkipToEnd.empty() &&
parser->SkipToEnd.top())

View File

@ -355,7 +355,9 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"If this is set to TRUE, then the rpath information "
"is not added to compiled executables. The default "
"is to add rpath information if the platform supports it. "
"This allows for easy running from the build tree.",false,
"This allows for easy running from the build tree. To omit RPATH"
"in the install step, but not the build step, use "
"CMAKE_SKIP_INSTALL_RPATH instead.",false,
"Variables that Provide Information");
cm->DefineProperty
("CMAKE_SOURCE_DIR", cmProperty::VARIABLE,
@ -745,6 +747,26 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"this package from the cache using the cache editor or cmake -U", false,
"Variables That Change Behavior");
cm->DefineProperty
("CMAKE_FIND_PACKAGE_WARN_NO_MODULE", cmProperty::VARIABLE,
"Tell find_package to warn if called without an explicit mode.",
"If find_package is called without an explicit mode option "
"(MODULE, CONFIG or NO_MODULE) and no Find<pkg>.cmake module is "
"in CMAKE_MODULE_PATH then CMake implicitly assumes that the "
"caller intends to search for a package configuration file. "
"If no package configuration file is found then the wording "
"of the failure message must account for both the case that the "
"package is really missing and the case that the project has a "
"bug and failed to provide the intended Find module. "
"If instead the caller specifies an explicit mode option then "
"the failure message can be more specific."
"\n"
"Set CMAKE_FIND_PACKAGE_WARN_NO_MODULE to TRUE to tell find_package "
"to warn when it implicitly assumes Config mode. "
"This helps developers enforce use of an explicit mode in all calls "
"to find_package within a project.", false,
"Variables That Change Behavior");
cm->DefineProperty
("CMAKE_USER_MAKE_RULES_OVERRIDE", cmProperty::VARIABLE,
"Specify a CMake file that overrides platform information.",
@ -895,7 +917,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
cm->DefineProperty
("BORLAND", cmProperty::VARIABLE,
"True of the borland compiler is being used.",
"True if the borland compiler is being used.",
"This is set to true if the Borland compiler is being used.",false,
"Variables That Describe the System");
@ -1180,6 +1202,20 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"is always built with no RPATH.",false,
"Variables that Control the Build");
cm->DefineProperty
("CMAKE_SKIP_INSTALL_RPATH", cmProperty::VARIABLE,
"Do not include RPATHs in the install tree.",
"Normally CMake uses the build tree for the RPATH when building "
"executables etc on systems that use RPATH. When the software "
"is installed the executables etc are relinked by CMake to have "
"the install RPATH. If this variable is set to true then the software "
"is always installed without RPATH, even if RPATH is enabled when "
"building. This can be useful for example to allow running tests from "
"the build directory with RPATH enabled before the installation step. "
"To omit RPATH in both the build and install steps, use "
"CMAKE_SKIP_RPATH instead.",false,
"Variables that Control the Build");
cm->DefineProperty
("CMAKE_EXE_LINKER_FLAGS", cmProperty::VARIABLE,
"Linker flags used to create executables.",
@ -1258,6 +1294,22 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"See that target property for additional information.",
false,
"Variables that Control the Build");
cm->DefineProperty
("CMAKE_WIN32_EXECUTABLE", cmProperty::VARIABLE,
"Default value for WIN32_EXECUTABLE of targets.",
"This variable is used to initialize the "
"WIN32_EXECUTABLE property on all the targets. "
"See that target property for additional information.",
false,
"Variables that Control the Build");
cm->DefineProperty
("CMAKE_MACOSX_BUNDLE", cmProperty::VARIABLE,
"Default value for MACOSX_BUNDLE of targets.",
"This variable is used to initialize the "
"MACOSX_BUNDLE property on all the targets. "
"See that target property for additional information.",
false,
"Variables that Control the Build");
// Variables defined when the a language is enabled These variables will
// also be defined whenever CMake has loaded its support for compiling (LANG)

View File

@ -40,17 +40,17 @@ public:
/**
* This determines if the command is invoked when in script mode.
*/
virtual bool IsScriptable() { return true; }
virtual bool IsScriptable() const { return true; }
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "else";}
virtual const char* GetName() const { return "else";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Starts the else portion of an if block.";
}
@ -58,7 +58,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" else(expression)\n"

View File

@ -40,17 +40,17 @@ public:
/**
* This determines if the command is invoked when in script mode.
*/
virtual bool IsScriptable() { return true; }
virtual bool IsScriptable() const { return true; }
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "elseif";}
virtual const char* GetName() const { return "elseif";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Starts the elseif portion of an if block.";
}
@ -58,7 +58,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" elseif(expression)\n"

View File

@ -43,12 +43,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() {return "enable_language";}
virtual const char* GetName() const {return "enable_language";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Enable a language (CXX/C/Fortran/etc)";
}
@ -56,7 +56,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" enable_language(languageName [OPTIONAL] )\n"

View File

@ -48,12 +48,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "enable_testing";}
virtual const char* GetName() const { return "enable_testing";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Enable testing for current directory and below.";
}
@ -61,7 +61,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" enable_testing()\n"

View File

@ -47,17 +47,17 @@ public:
/**
* This determines if the command is invoked when in script mode.
*/
virtual bool IsScriptable() { return true; }
virtual bool IsScriptable() const { return true; }
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "endforeach";}
virtual const char* GetName() const { return "endforeach";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Ends a list of commands in a FOREACH block.";
}
@ -65,7 +65,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" endforeach(expression)\n"

View File

@ -47,17 +47,17 @@ public:
/**
* This determines if the command is invoked when in script mode.
*/
virtual bool IsScriptable() { return true; }
virtual bool IsScriptable() const { return true; }
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "endfunction";}
virtual const char* GetName() const { return "endfunction";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Ends a list of commands in a function block.";
}
@ -65,7 +65,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" endfunction(expression)\n"

View File

@ -40,17 +40,17 @@ public:
/**
* This determines if the command is invoked when in script mode.
*/
virtual bool IsScriptable() { return true; }
virtual bool IsScriptable() const { return true; }
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "endif";}
virtual const char* GetName() const { return "endif";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Ends a list of commands in an if block.";
}
@ -58,7 +58,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" endif(expression)\n"

View File

@ -47,17 +47,17 @@ public:
/**
* This determines if the command is invoked when in script mode.
*/
virtual bool IsScriptable() { return true; }
virtual bool IsScriptable() const { return true; }
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "endmacro";}
virtual const char* GetName() const { return "endmacro";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Ends a list of commands in a macro block.";
}
@ -65,7 +65,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" endmacro(expression)\n"

View File

@ -12,12 +12,21 @@
#include "cmEndWhileCommand.h"
bool cmEndWhileCommand
::InvokeInitialPass(std::vector<cmListFileArgument> const&,
::InvokeInitialPass(std::vector<cmListFileArgument> const& args,
cmExecutionStatus &)
{
if (args.empty())
{
this->SetError("An ENDWHILE command was found outside of a proper "
"WHILE ENDWHILE structure.");
}
else
{
this->SetError("An ENDWHILE command was found outside of a proper "
"WHILE ENDWHILE structure. Or its arguments did not "
"match the opening WHILE command.");
}
return false;
}

View File

@ -34,7 +34,7 @@ public:
* Override cmCommand::InvokeInitialPass to get arguments before
* expansion.
*/
virtual bool InvokeInitialPass(std::vector<cmListFileArgument> const&,
virtual bool InvokeInitialPass(std::vector<cmListFileArgument> const& args,
cmExecutionStatus &status);
/**
@ -47,17 +47,17 @@ public:
/**
* This determines if the command is invoked when in script mode.
*/
virtual bool IsScriptable() { return true; }
virtual bool IsScriptable() const { return true; }
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "endwhile";}
virtual const char* GetName() const { return "endwhile";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Ends a list of commands in a while block.";
}
@ -65,7 +65,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" endwhile(expression)\n"

View File

@ -42,18 +42,18 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName()
virtual const char* GetName() const
{return "exec_program";}
/**
* This determines if the command is invoked when in script mode.
*/
virtual bool IsScriptable() { return true; }
virtual bool IsScriptable() const { return true; }
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return
"Deprecated. Use the execute_process() command instead.";
@ -62,7 +62,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
"Run an executable program during the processing of the CMakeList.txt"
@ -84,7 +84,7 @@ public:
}
/** This command is kept for compatibility with older CMake versions. */
virtual bool IsDiscouraged()
virtual bool IsDiscouraged() const
{
return true;
}

View File

@ -41,18 +41,18 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName()
virtual const char* GetName() const
{return "execute_process";}
/**
* This determines if the command is invoked when in script mode.
*/
virtual bool IsScriptable() { return true; }
virtual bool IsScriptable() const { return true; }
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Execute one or more child processes.";
}
@ -60,7 +60,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" execute_process(COMMAND <cmd1> [args1...]]\n"

View File

@ -124,6 +124,14 @@ bool cmExportCommand
{
targets.push_back(target);
}
else if(target->GetType() == cmTarget::OBJECT_LIBRARY)
{
cmOStringStream e;
e << "given OBJECT library \"" << *currentTarget
<< "\" which may not be exported.";
this->SetError(e.str().c_str());
return false;
}
else
{
cmOStringStream e;

View File

@ -45,12 +45,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "export";}
virtual const char* GetName() const { return "export";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return
"Export targets from the build tree for use by outside projects.";
@ -59,7 +59,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" export(TARGETS [target1 [target2 [...]]] [NAMESPACE <namespace>]\n"

View File

@ -48,12 +48,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "export_library_dependencies";}
virtual const char* GetName() const { return "export_library_dependencies";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Deprecated. Use INSTALL(EXPORT) or EXPORT command.";
}
@ -61,7 +61,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
"This command generates an old-style library dependencies file. "
@ -83,7 +83,7 @@ public:
}
/** This command is kept for compatibility with older CMake versions. */
virtual bool IsDiscouraged()
virtual bool IsDiscouraged() const
{
return true;
}

View File

@ -30,12 +30,6 @@ cmExprParserHelper::~cmExprParserHelper()
this->CleanupParser();
}
void cmExprParserHelper::SetLineFile(long line, const char* file)
{
this->FileLine = line;
this->FileName = file;
}
int cmExprParserHelper::ParseString(const char* str, int verb)
{
if ( !str)

View File

@ -46,8 +46,6 @@ public:
int GetResult() { return this->Result; }
void SetLineFile(long line, const char* file);
const char* GetError() { return this->ErrorString.c_str(); }
private:
@ -55,7 +53,6 @@ private:
cmStdString InputBuffer;
std::vector<char> OutputBuffer;
int CurrentLine;
int UnionsAvailable;
int Verbose;
void Print(const char* place, const char* str);

View File

@ -392,10 +392,6 @@ void cmExtraCodeBlocksGenerator
make.c_str(), makefile, compiler.c_str());
}
break;
// ignore these:
case cmTarget::INSTALL_FILES:
case cmTarget::INSTALL_PROGRAMS:
case cmTarget::INSTALL_DIRECTORY:
default:
break;
}

View File

@ -1049,10 +1049,6 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
}
}
break;
// ignore these:
case cmTarget::INSTALL_FILES:
case cmTarget::INSTALL_PROGRAMS:
case cmTarget::INSTALL_DIRECTORY:
default:
break;
}

View File

@ -52,12 +52,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "fltk_wrap_ui";}
virtual const char* GetName() const { return "fltk_wrap_ui";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "Create FLTK user interfaces Wrappers.";
}
@ -65,7 +65,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" fltk_wrap_ui(resultingLibraryName source1\n"

View File

@ -12,6 +12,7 @@
#include "cmFileCommand.h"
#include "cmake.h"
#include "cmHexFileConverter.h"
#include "cmInstallType.h"
#include "cmFileTimeComparison.h"
#include "cmCryptoHash.h"
@ -1690,7 +1691,7 @@ struct cmFileInstaller: public cmFileCopier
{
cmFileInstaller(cmFileCommand* command):
cmFileCopier(command, "INSTALL"),
InstallType(cmTarget::INSTALL_FILES),
InstallType(cmInstallType_FILES),
Optional(false),
DestDirLength(0)
{
@ -1711,7 +1712,7 @@ struct cmFileInstaller: public cmFileCopier
}
protected:
cmTarget::TargetType InstallType;
cmInstallType InstallType;
bool Optional;
int DestDirLength;
std::string Rename;
@ -1745,7 +1746,7 @@ protected:
virtual bool Install(const char* fromFile, const char* toFile)
{
// Support installing from empty source to make a directory.
if(this->InstallType == cmTarget::INSTALL_DIRECTORY && !*fromFile)
if(this->InstallType == cmInstallType_DIRECTORY && !*fromFile)
{
return this->InstallDirectory(fromFile, toFile, MatchProperties());
}
@ -1767,14 +1768,14 @@ protected:
// Add execute permissions based on the target type.
switch(this->InstallType)
{
case cmTarget::SHARED_LIBRARY:
case cmTarget::MODULE_LIBRARY:
case cmInstallType_SHARED_LIBRARY:
case cmInstallType_MODULE_LIBRARY:
if(this->Makefile->IsOn("CMAKE_INSTALL_SO_NO_EXE"))
{
break;
}
case cmTarget::EXECUTABLE:
case cmTarget::INSTALL_PROGRAMS:
case cmInstallType_EXECUTABLE:
case cmInstallType_PROGRAMS:
this->FilePermissions |= mode_owner_execute;
this->FilePermissions |= mode_group_execute;
this->FilePermissions |= mode_world_execute;
@ -1796,8 +1797,8 @@ bool cmFileInstaller::Parse(std::vector<std::string> const& args)
if(!this->Rename.empty())
{
if(this->InstallType != cmTarget::INSTALL_FILES &&
this->InstallType != cmTarget::INSTALL_PROGRAMS)
if(this->InstallType != cmInstallType_FILES &&
this->InstallType != cmInstallType_PROGRAMS)
{
this->FileCommand->SetError("INSTALL option RENAME may be used "
"only with FILES or PROGRAMS.");
@ -1936,31 +1937,31 @@ bool cmFileInstaller
{
if ( stype == "EXECUTABLE" )
{
this->InstallType = cmTarget::EXECUTABLE;
this->InstallType = cmInstallType_EXECUTABLE;
}
else if ( stype == "FILE" )
{
this->InstallType = cmTarget::INSTALL_FILES;
this->InstallType = cmInstallType_FILES;
}
else if ( stype == "PROGRAM" )
{
this->InstallType = cmTarget::INSTALL_PROGRAMS;
this->InstallType = cmInstallType_PROGRAMS;
}
else if ( stype == "STATIC_LIBRARY" )
{
this->InstallType = cmTarget::STATIC_LIBRARY;
this->InstallType = cmInstallType_STATIC_LIBRARY;
}
else if ( stype == "SHARED_LIBRARY" )
{
this->InstallType = cmTarget::SHARED_LIBRARY;
this->InstallType = cmInstallType_SHARED_LIBRARY;
}
else if ( stype == "MODULE" )
{
this->InstallType = cmTarget::MODULE_LIBRARY;
this->InstallType = cmInstallType_MODULE_LIBRARY;
}
else if ( stype == "DIRECTORY" )
{
this->InstallType = cmTarget::INSTALL_DIRECTORY;
this->InstallType = cmInstallType_DIRECTORY;
}
else
{

View File

@ -41,17 +41,17 @@ public:
/**
* This determines if the command is invoked when in script mode.
*/
virtual bool IsScriptable() { return true; }
virtual bool IsScriptable() const { return true; }
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "file";}
virtual const char* GetName() const { return "file";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation()
virtual const char* GetTerseDocumentation() const
{
return "File manipulation command.";
}
@ -59,7 +59,7 @@ public:
/**
* More documentation.
*/
virtual const char* GetFullDocumentation()
virtual const char* GetFullDocumentation() const
{
return
" file(WRITE filename \"message to write\"... )\n"

View File

@ -108,11 +108,11 @@ void cmFindBase::GenerateDocumentation()
}
//----------------------------------------------------------------------------
const char* cmFindBase::GetFullDocumentation()
const char* cmFindBase::GetFullDocumentation() const
{
if(this->GenericDocumentation.empty())
{
this->GenerateDocumentation();
const_cast<cmFindBase *>(this)->GenerateDocumentation();
}
return this->GenericDocumentation.c_str();
}

View File

@ -31,7 +31,7 @@ public:
virtual bool ParseArguments(std::vector<std::string> const& args);
cmTypeMacro(cmFindBase, cmFindCommon);
virtual const char* GetFullDocumentation();
virtual const char* GetFullDocumentation() const;
protected:
virtual void GenerateDocumentation();

Some files were not shown because too many files have changed in this diff Show More