Merge branch 'object-library' into ninja-object-library
This commit is contained in:
commit
c68cc06612
|
@ -68,9 +68,9 @@ set the path with these commands:
|
||||||
"\\|" "[ \t\r\n]"
|
"\\|" "[ \t\r\n]"
|
||||||
"\\)*"))
|
"\\)*"))
|
||||||
(defconst cmake-regex-block-open
|
(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
|
(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]*(")
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,12 @@
|
||||||
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
|
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
|
||||||
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
|
# 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__)
|
#elif defined(__BORLANDC__)
|
||||||
# define COMPILER_ID "Borland"
|
# define COMPILER_ID "Borland"
|
||||||
/* __BORLANDC__ = 0xVRR */
|
/* __BORLANDC__ = 0xVRR */
|
||||||
|
|
|
@ -28,6 +28,12 @@
|
||||||
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
|
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
|
||||||
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
|
# 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__)
|
#elif defined(__BORLANDC__)
|
||||||
# define COMPILER_ID "Borland"
|
# define COMPILER_ID "Borland"
|
||||||
/* __BORLANDC__ = 0xVRR */
|
/* __BORLANDC__ = 0xVRR */
|
||||||
|
|
|
@ -71,7 +71,8 @@ if(UNIX)
|
||||||
# use the file utility to check whether itself is 64 bit:
|
# use the file utility to check whether itself is 64 bit:
|
||||||
find_program(FILE_EXECUTABLE file)
|
find_program(FILE_EXECUTABLE file)
|
||||||
if(FILE_EXECUTABLE)
|
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")
|
if("${fileOutput}" MATCHES "64-bit")
|
||||||
set(CMAKE_SIZEOF_VOID_P 8)
|
set(CMAKE_SIZEOF_VOID_P 8)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -39,6 +39,8 @@ SET_PROPERTY(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE)
|
||||||
|
|
||||||
SET (CMAKE_SKIP_RPATH "NO" CACHE BOOL
|
SET (CMAKE_SKIP_RPATH "NO" CACHE BOOL
|
||||||
"If set, runtime paths are not added when using shared libraries.")
|
"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.")
|
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(
|
MARK_AS_ADVANCED(
|
||||||
CMAKE_SKIP_RPATH
|
CMAKE_SKIP_RPATH
|
||||||
|
CMAKE_SKIP_INSTALL_RPATH
|
||||||
CMAKE_VERBOSE_MAKEFILE
|
CMAKE_VERBOSE_MAKEFILE
|
||||||
)
|
)
|
||||||
|
|
|
@ -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()
|
|
@ -88,61 +88,87 @@
|
||||||
##variable
|
##variable
|
||||||
# CPACK_PACKAGE_FILE_NAME - The name of the package file to generate,
|
# CPACK_PACKAGE_FILE_NAME - The name of the package file to generate,
|
||||||
# not including the extension. For example, cmake-2.6.1-Linux-i686.
|
# 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
|
##end
|
||||||
#
|
#
|
||||||
##variable
|
##variable
|
||||||
# CPACK_PACKAGE_INSTALL_DIRECTORY - Installation directory on the
|
# 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
|
##end
|
||||||
#
|
#
|
||||||
##variable
|
##variable
|
||||||
# CPACK_PROJECT_CONFIG_FILE - File included at cpack time, once per
|
# CPACK_PACKAGE_ICON - A branding image that will be displayed inside
|
||||||
# generator after setting CPACK_GENERATOR to the actual generator
|
# the installer (used by GUI installers).
|
||||||
# being used. Allows per-generator setting of CPACK_* variables at
|
##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.
|
# cpack time.
|
||||||
##end
|
##end
|
||||||
#
|
#
|
||||||
##variable
|
##variable
|
||||||
# CPACK_RESOURCE_FILE_LICENSE - License file for the project, which
|
# CPACK_RESOURCE_FILE_LICENSE - License to be embedded in the installer. It
|
||||||
# will typically be displayed to the user (often with an explicit
|
# will typically be displayed to the user by the produced installer
|
||||||
# "Accept" button, for graphical installers) prior to installation.
|
# (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
|
##end
|
||||||
#
|
#
|
||||||
##variable
|
##variable
|
||||||
# CPACK_RESOURCE_FILE_README - ReadMe file for the project, which
|
# CPACK_RESOURCE_FILE_README - ReadMe file to be embedded in the installer. It
|
||||||
# typically describes in some detail
|
# typically describes in some detail the purpose of the project
|
||||||
|
# during the installation. Not all CPack generators uses
|
||||||
|
# this file.
|
||||||
##end
|
##end
|
||||||
#
|
#
|
||||||
##variable
|
##variable
|
||||||
# CPACK_RESOURCE_FILE_WELCOME - Welcome file for the project, which
|
# CPACK_RESOURCE_FILE_WELCOME - Welcome file to be embedded in the
|
||||||
# welcomes users to this installer. Typically used in the graphical
|
# installer. It welcomes users to this installer.
|
||||||
# installers on Windows and Mac OS X.
|
# Typically used in the graphical installers on Windows and Mac OS X.
|
||||||
##end
|
##end
|
||||||
#
|
#
|
||||||
##variable
|
##variable
|
||||||
# CPACK_MONOLITHIC_INSTALL - Disables the component-based
|
# 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
|
##end
|
||||||
#
|
#
|
||||||
##variable
|
##variable
|
||||||
# CPACK_GENERATOR - List of CPack generators to use. If not
|
# 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
|
# 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
|
##end
|
||||||
#
|
#
|
||||||
##variable
|
##variable
|
||||||
# CPACK_OUTPUT_CONFIG_FILE - The name of the CPack configuration file
|
# CPACK_OUTPUT_CONFIG_FILE - The name of the CPack binary configuration
|
||||||
# for binary installers that will be generated by the CPack
|
# file. This file is the CPack configuration generated by the CPack module
|
||||||
# module. Defaults to CPackConfig.cmake.
|
# for binary installers. Defaults to CPackConfig.cmake.
|
||||||
##end
|
##end
|
||||||
#
|
#
|
||||||
##variable
|
##variable
|
||||||
# CPACK_PACKAGE_EXECUTABLES - Lists each of the executables along
|
# CPACK_PACKAGE_EXECUTABLES - Lists each of the executables and associated
|
||||||
# with a text label, to be used to create Start Menu shortcuts on
|
# text label to be used to create Start Menu shortcuts. For example,
|
||||||
# Windows. For example, setting this to the list ccmake;CMake will
|
# setting this to the list ccmake;CMake will
|
||||||
# create a shortcut named "CMake" that will execute the installed
|
# 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
|
##end
|
||||||
#
|
#
|
||||||
##variable
|
##variable
|
||||||
|
@ -156,8 +182,8 @@
|
||||||
# will not affect binary packages:
|
# will not affect binary packages:
|
||||||
#
|
#
|
||||||
##variable
|
##variable
|
||||||
# CPACK_SOURCE_PACKAGE_FILE_NAME - The name of the source package,
|
# CPACK_SOURCE_PACKAGE_FILE_NAME - The name of the source package. For
|
||||||
# e.g., cmake-2.6.1
|
# example cmake-2.6.1.
|
||||||
##end
|
##end
|
||||||
#
|
#
|
||||||
##variable
|
##variable
|
||||||
|
@ -176,22 +202,23 @@
|
||||||
##end
|
##end
|
||||||
#
|
#
|
||||||
##variable
|
##variable
|
||||||
# CPACK_SOURCE_OUTPUT_CONFIG_FILE - The name of the CPack
|
# CPACK_SOURCE_OUTPUT_CONFIG_FILE - The name of the CPack source
|
||||||
# configuration file for source installers that will be generated by
|
# configuration file. This file is the CPack configuration generated by the
|
||||||
# the CPack module. Defaults to CPackSourceConfig.cmake.
|
# CPack module for source installers. Defaults to CPackSourceConfig.cmake.
|
||||||
##end
|
##end
|
||||||
#
|
#
|
||||||
##variable
|
##variable
|
||||||
# CPACK_SOURCE_IGNORE_FILES - Pattern of files in the source tree
|
# CPACK_SOURCE_IGNORE_FILES - Pattern of files in the source tree
|
||||||
# that won't be packaged when building a source package. This is a
|
# 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
|
##end
|
||||||
#
|
#
|
||||||
# The following variables are for advanced uses of CPack:
|
# The following variables are for advanced uses of CPack:
|
||||||
#
|
#
|
||||||
##variable
|
##variable
|
||||||
# CPACK_CMAKE_GENERATOR - What CMake generator should be used if the
|
# 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.
|
# few users will want to change this setting.
|
||||||
##end
|
##end
|
||||||
#
|
#
|
||||||
|
@ -225,6 +252,15 @@
|
||||||
# CPACK_INSTALLED_DIRECTORIES - Extra directories to install.
|
# CPACK_INSTALLED_DIRECTORIES - Extra directories to install.
|
||||||
##end
|
##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.
|
# Copyright 2006-2009 Kitware, Inc.
|
||||||
|
@ -358,6 +394,12 @@ macro(cpack_optional_append _list _cond _item)
|
||||||
endif(${_cond})
|
endif(${_cond})
|
||||||
endmacro(cpack_optional_append _list _cond _item)
|
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
|
# Provide options to choose generators
|
||||||
# we might check here if the required tools for the generates exist
|
# we might check here if the required tools for the generates exist
|
||||||
# and set the defaults according to the results
|
# and set the defaults according to the results
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
# - CPack Bundle generator (Mac OS X) specific options
|
# - CPack Bundle generator (Mac OS X) specific options
|
||||||
#
|
#
|
||||||
# Installers built on Mac OS X using the Bundle generator use the
|
# Installers built on Mac OS X using the Bundle generator use the
|
||||||
# aforementioned DragNDrop variables, plus the following Bundle-specific
|
# aforementioned DragNDrop (CPACK_DMG_xxx) variables, plus
|
||||||
# parameters:
|
# the following Bundle-specific parameters (CPACK_BUNDLE_xxx).
|
||||||
##end
|
##end
|
||||||
#
|
#
|
||||||
##variable
|
##variable
|
||||||
|
@ -15,22 +15,21 @@
|
||||||
#
|
#
|
||||||
##variable
|
##variable
|
||||||
# CPACK_BUNDLE_PLIST - Path to an OSX plist file that will be used
|
# CPACK_BUNDLE_PLIST - Path to an OSX plist file that will be used
|
||||||
# as the Info.plist for the generated bundle. This assumes that
|
# for the generated bundle. This assumes that the caller has generated
|
||||||
# the caller has generated or specified their own Info.plist file.
|
# 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.
|
# Required.
|
||||||
##end
|
##end
|
||||||
#
|
#
|
||||||
##variable
|
##variable
|
||||||
# CPACK_BUNDLE_ICON - Path to an OSX icns file that will be used as
|
# CPACK_BUNDLE_STARTUP_COMMAND - Path to a startup script. This is a path to
|
||||||
# the icon for the generated bundle. This is the icon that appears
|
# an executable or script that will be run whenever an end-user double-clicks
|
||||||
# in the OSX finder for the bundle, and in the OSX dock when the
|
# the generated bundle in the OSX Finder. Optional.
|
||||||
# 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.
|
|
||||||
##end
|
##end
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
|
|
|
@ -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.)
|
|
@ -19,18 +19,18 @@
|
||||||
##end
|
##end
|
||||||
#
|
#
|
||||||
##variable
|
##variable
|
||||||
# CPACK_DMG_DS_STORE - Path to a custom .DS_Store file which e.g.
|
# CPACK_DMG_DS_STORE - Path to a custom DS_Store file. This .DS_Store
|
||||||
# can be used to specify the Finder window position/geometry and
|
# file e.g. can be used to specify the Finder window
|
||||||
# layout (such as hidden toolbars, placement of the icons etc.).
|
# position/geometry and layout (such as hidden toolbars, placement of the
|
||||||
# This file has to be generated by the Finder (either manually or
|
# 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
|
# through OSA-script) using a normal folder from which the .DS_Store
|
||||||
# file can then be extracted.
|
# file can then be extracted.
|
||||||
##end
|
##end
|
||||||
#
|
#
|
||||||
##variable
|
##variable
|
||||||
# CPACK_DMG_BACKGROUND_IMAGE - Path to an image file which is to be
|
# CPACK_DMG_BACKGROUND_IMAGE - Path to a background image file. This
|
||||||
# used as the background for the Finder Window when the disk image
|
# file will be used as the background for the Finder Window when the disk
|
||||||
# is opened. By default no background image is set. The background
|
# image is opened. By default no background image is set. The background
|
||||||
# image is applied after applying the custom .DS_Store file.
|
# image is applied after applying the custom .DS_Store file.
|
||||||
##end
|
##end
|
||||||
#
|
#
|
||||||
|
|
|
@ -8,11 +8,6 @@
|
||||||
##end
|
##end
|
||||||
#
|
#
|
||||||
##variable
|
##variable
|
||||||
# CPACK_PACKAGE_INSTALL_REGISTRY_KEY - Registry key used when
|
|
||||||
# installing this project.
|
|
||||||
##end
|
|
||||||
#
|
|
||||||
##variable
|
|
||||||
# CPACK_NSIS_INSTALL_ROOT - The default installation directory presented
|
# CPACK_NSIS_INSTALL_ROOT - The default installation directory presented
|
||||||
# to the end user by the NSIS installer is under this root dir. The full
|
# to the end user by the NSIS installer is under this root dir. The full
|
||||||
# directory presented to the end user is:
|
# directory presented to the end user is:
|
||||||
|
@ -30,11 +25,6 @@
|
||||||
##end
|
##end
|
||||||
#
|
#
|
||||||
##variable
|
##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
|
# CPACK_NSIS_EXTRA_INSTALL_COMMANDS - Extra NSIS commands that will
|
||||||
# be added to the install Section.
|
# be added to the install Section.
|
||||||
##end
|
##end
|
||||||
|
@ -107,6 +97,15 @@
|
||||||
# CPACK_NSIS_MUI_FINISHPAGE_RUN - Specify an executable to add an option
|
# CPACK_NSIS_MUI_FINISHPAGE_RUN - Specify an executable to add an option
|
||||||
# to run on the finish page of the NSIS installer.
|
# to run on the finish page of the NSIS installer.
|
||||||
##end
|
##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.
|
# Copyright 2006-2009 Kitware, Inc.
|
||||||
|
|
|
@ -4,11 +4,12 @@
|
||||||
# - PackageMaker CPack generator (Mac OS X).
|
# - PackageMaker CPack generator (Mac OS X).
|
||||||
# The following variable is specific to installers build on Mac OS X
|
# The following variable is specific to installers build on Mac OS X
|
||||||
# using PackageMaker:
|
# using PackageMaker:
|
||||||
|
##end
|
||||||
#
|
#
|
||||||
##variable
|
##variable
|
||||||
# CPACK_OSX_PACKAGE_VERSION - The version of Mac OS X that the
|
# CPACK_OSX_PACKAGE_VERSION - The version of Mac OS X that the
|
||||||
# resulting PackageMaker archive should be compatible
|
# resulting PackageMaker archive should be compatible with. Different
|
||||||
# with. Different versions of Mac OS X support different
|
# versions of Mac OS X support different
|
||||||
# features. For example, CPack can only build component-based
|
# features. For example, CPack can only build component-based
|
||||||
# installers for Mac OS X 10.4 or newer, and can only build
|
# 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
|
# installers that download component son-the-fly for Mac OS X 10.5
|
||||||
|
|
|
@ -33,6 +33,7 @@ MACRO (CHECK_C_COMPILER_FLAG _FLAG _RESULT)
|
||||||
FAIL_REGEX "unknown .*option" # Clang
|
FAIL_REGEX "unknown .*option" # Clang
|
||||||
FAIL_REGEX "ignoring unknown option" # MSVC
|
FAIL_REGEX "ignoring unknown option" # MSVC
|
||||||
FAIL_REGEX "warning D9002" # MSVC, any lang
|
FAIL_REGEX "warning D9002" # MSVC, any lang
|
||||||
|
FAIL_REGEX "option .*not supported" # Intel
|
||||||
FAIL_REGEX "[Uu]nknown option" # HP
|
FAIL_REGEX "[Uu]nknown option" # HP
|
||||||
FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro
|
FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro
|
||||||
FAIL_REGEX "command option .* is not recognized" # XL
|
FAIL_REGEX "command option .* is not recognized" # XL
|
||||||
|
|
|
@ -33,6 +33,7 @@ MACRO (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT)
|
||||||
FAIL_REGEX "unknown .*option" # Clang
|
FAIL_REGEX "unknown .*option" # Clang
|
||||||
FAIL_REGEX "ignoring unknown option" # MSVC
|
FAIL_REGEX "ignoring unknown option" # MSVC
|
||||||
FAIL_REGEX "warning D9002" # MSVC, any lang
|
FAIL_REGEX "warning D9002" # MSVC, any lang
|
||||||
|
FAIL_REGEX "option .*not supported" # Intel
|
||||||
FAIL_REGEX "[Uu]nknown option" # HP
|
FAIL_REGEX "[Uu]nknown option" # HP
|
||||||
FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro
|
FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro
|
||||||
FAIL_REGEX "command option .* is not recognized" # XL
|
FAIL_REGEX "command option .* is not recognized" # XL
|
||||||
|
|
|
@ -82,6 +82,7 @@
|
||||||
|
|
||||||
include(BundleUtilities)
|
include(BundleUtilities)
|
||||||
set(DeployQt4_cmake_dir "${CMAKE_CURRENT_LIST_DIR}")
|
set(DeployQt4_cmake_dir "${CMAKE_CURRENT_LIST_DIR}")
|
||||||
|
set(DeployQt4_apple_plugins_dir "PlugIns")
|
||||||
|
|
||||||
function(write_qt4_conf qt_conf_dir qt_conf_contents)
|
function(write_qt4_conf qt_conf_dir qt_conf_contents)
|
||||||
set(qt_conf_path "${qt_conf_dir}/qt.conf")
|
set(qt_conf_path "${qt_conf_dir}/qt.conf")
|
||||||
|
@ -125,11 +126,17 @@ function(fixup_qt4_executable executable)
|
||||||
if(QT_LIBRARY_DIR)
|
if(QT_LIBRARY_DIR)
|
||||||
list(APPEND dirs "${QT_LIBRARY_DIR}")
|
list(APPEND dirs "${QT_LIBRARY_DIR}")
|
||||||
endif()
|
endif()
|
||||||
|
if(QT_BINARY_DIR)
|
||||||
|
list(APPEND dirs "${QT_BINARY_DIR}")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(qt_conf_dir "${executable}/Contents/Resources")
|
set(qt_conf_dir "${executable}/Contents/Resources")
|
||||||
set(executable_path "${executable}")
|
set(executable_path "${executable}")
|
||||||
set(write_qt_conf TRUE)
|
set(write_qt_conf TRUE)
|
||||||
|
if(NOT plugins_dir)
|
||||||
|
set(plugins_dir "${DeployQt4_apple_plugins_dir}")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
get_filename_component(executable_path "${executable}" PATH)
|
get_filename_component(executable_path "${executable}" PATH)
|
||||||
if(NOT executable_path)
|
if(NOT executable_path)
|
||||||
|
@ -141,7 +148,7 @@ function(fixup_qt4_executable executable)
|
||||||
|
|
||||||
foreach(plugin ${qtplugins})
|
foreach(plugin ${qtplugins})
|
||||||
set(installed_plugin_path "")
|
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})
|
list(APPEND libs ${installed_plugin_path})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
@ -166,23 +173,19 @@ function(install_qt4_plugin_path plugin executable copy installed_plugin_path_va
|
||||||
set(component ${ARGV5})
|
set(component ${ARGV5})
|
||||||
set(configurations ${ARGV6})
|
set(configurations ${ARGV6})
|
||||||
if(EXISTS "${plugin}")
|
if(EXISTS "${plugin}")
|
||||||
if(plugins_dir)
|
|
||||||
set(plugins_dir "${plugins_dir}")
|
|
||||||
else()
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(plugins_dir "PlugIns")
|
if(NOT plugins_dir)
|
||||||
else()
|
set(plugins_dir "${DeployQt4_apple_plugins_dir}")
|
||||||
set(plugins_dir "plugins")
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
if(APPLE)
|
|
||||||
set(plugins_path "${executable}/Contents/${plugins_dir}")
|
set(plugins_path "${executable}/Contents/${plugins_dir}")
|
||||||
else()
|
else()
|
||||||
get_filename_component(executable_path "${executable}" PATH)
|
get_filename_component(plugins_path "${executable}" PATH)
|
||||||
if(NOT executable_path)
|
if(NOT plugins_path)
|
||||||
set(executable_path ".")
|
set(plugins_path ".")
|
||||||
|
endif()
|
||||||
|
if(plugins_dir)
|
||||||
|
set(plugins_path "${plugins_path}/${plugins_dir}")
|
||||||
endif()
|
endif()
|
||||||
set(plugins_path "${executable_path}/${plugins_dir}")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(plugin_group "")
|
set(plugin_group "")
|
||||||
|
@ -210,7 +213,7 @@ function(install_qt4_plugin_path plugin executable copy installed_plugin_path_va
|
||||||
endif()
|
endif()
|
||||||
install(FILES "${plugin}" DESTINATION "${plugins_path}" ${configurations} ${component})
|
install(FILES "${plugin}" DESTINATION "${plugins_path}" ${configurations} ${component})
|
||||||
endif()
|
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()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
@ -219,12 +222,8 @@ function(install_qt4_plugin plugin executable copy installed_plugin_path_var)
|
||||||
set(component ${ARGV5})
|
set(component ${ARGV5})
|
||||||
if(EXISTS "${plugin}")
|
if(EXISTS "${plugin}")
|
||||||
install_qt4_plugin_path("${plugin}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}")
|
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()
|
else()
|
||||||
string(TOUPPER "QT_${plugin}_PLUGIN" plugin_var)
|
string(TOUPPER "QT_${plugin}_PLUGIN" plugin_var)
|
||||||
endif()
|
|
||||||
set(plugin_release_var "${plugin_var}_RELEASE")
|
set(plugin_release_var "${plugin_var}_RELEASE")
|
||||||
set(plugin_debug_var "${plugin_var}_DEBUG")
|
set(plugin_debug_var "${plugin_var}_DEBUG")
|
||||||
set(plugin_release "${${plugin_release_var}}")
|
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}")
|
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.")
|
message(WARNING "Qt plugin \"${plugin}\" not recognized or found.")
|
||||||
endif()
|
endif()
|
||||||
install_qt4_plugin_path("${plugin_release}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}" "Release|RelWithDebInfo|MinSizeRel")
|
if(NOT EXISTS "${${plugin_debug_var}}")
|
||||||
install_qt4_plugin_path("${plugin_debug}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}" "Debug")
|
set(plugin_debug "${plugin_release}")
|
||||||
endif()
|
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()
|
endfunction()
|
||||||
|
|
||||||
function(install_qt4_executable executable)
|
function(install_qt4_executable executable)
|
||||||
|
@ -248,6 +261,9 @@ function(install_qt4_executable executable)
|
||||||
if(QT_LIBRARY_DIR)
|
if(QT_LIBRARY_DIR)
|
||||||
list(APPEND dirs "${QT_LIBRARY_DIR}")
|
list(APPEND dirs "${QT_LIBRARY_DIR}")
|
||||||
endif()
|
endif()
|
||||||
|
if(QT_BINARY_DIR)
|
||||||
|
list(APPEND dirs "${QT_BINARY_DIR}")
|
||||||
|
endif()
|
||||||
if(component)
|
if(component)
|
||||||
set(component COMPONENT ${component})
|
set(component COMPONENT ${component})
|
||||||
else()
|
else()
|
||||||
|
@ -264,15 +280,15 @@ function(install_qt4_executable executable)
|
||||||
set(qt_plugins_dir "")
|
set(qt_plugins_dir "")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT qtplugins AND QT_LIBRARIES_PLUGINS)
|
if(QT_IS_STATIC)
|
||||||
set(qtplugins "${QT_LIBRARIES_PLUGINS}")
|
message(WARNING "Qt built statically: not installing plugins.")
|
||||||
endif()
|
else()
|
||||||
|
|
||||||
foreach(plugin ${qtplugins})
|
foreach(plugin ${qtplugins})
|
||||||
set(installed_plugin_paths "")
|
set(installed_plugin_paths "")
|
||||||
install_qt4_plugin("${plugin}" "${executable}" 0 installed_plugin_paths "${plugins_dir}" "${component}")
|
install_qt4_plugin("${plugin}" "${executable}" 0 installed_plugin_paths "${plugins_dir}" "${component}")
|
||||||
list(APPEND libs ${installed_plugin_paths})
|
list(APPEND libs ${installed_plugin_paths})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
endif()
|
||||||
|
|
||||||
resolve_qt4_paths(libs)
|
resolve_qt4_paths(libs)
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
# GNUPLOT_FOUND - system has Gnuplot
|
# GNUPLOT_FOUND - system has Gnuplot
|
||||||
# GNUPLOT_EXECUTABLE - the Gnuplot executable
|
# GNUPLOT_EXECUTABLE - the Gnuplot executable
|
||||||
# GNUPLOT_VERSION_STRING - the version of Gnuplot found (since CMake 2.8.8)
|
# 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.
|
# Copyright 2002-2009 Kitware, Inc.
|
||||||
|
|
|
@ -32,12 +32,15 @@ IF (HSPELL_INCLUDE_DIR)
|
||||||
FILE(READ "${HSPELL_INCLUDE_DIR}/hspell.h" HSPELL_H)
|
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_MAJOR ([0-9]+).*" "\\1" HSPELL_VERSION_MAJOR "${HSPELL_H}")
|
||||||
STRING(REGEX REPLACE ".*#define HSPELL_VERSION_MINOR ([0-9]+).*" "\\1" HSPELL_VERSION_MINOR "${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()
|
ENDIF()
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set HSPELL_FOUND to TRUE if
|
# handle the QUIETLY and REQUIRED arguments and set HSPELL_FOUND to TRUE if
|
||||||
# all listed variables are TRUE
|
# all listed variables are TRUE
|
||||||
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
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)
|
MARK_AS_ADVANCED(HSPELL_INCLUDE_DIR HSPELL_LIBRARIES)
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
# ImageMagick_VERSION_STRING - the version of ImageMagick found
|
# ImageMagick_VERSION_STRING - the version of ImageMagick found
|
||||||
# (since CMake 2.8.8)
|
# (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:
|
# There are also components for the following ImageMagick APIs:
|
||||||
#
|
#
|
||||||
# Magick++
|
# Magick++
|
||||||
|
@ -171,7 +173,7 @@ FOREACH(component ${ImageMagick_FIND_COMPONENTS}
|
||||||
ELSEIF(ImageMagick_${component}_EXECUTABLE)
|
ELSEIF(ImageMagick_${component}_EXECUTABLE)
|
||||||
# if no components were requested explicitly put all (default) executables
|
# if no components were requested explicitly put all (default) executables
|
||||||
# in the list
|
# in the list
|
||||||
LIST(APPEND ImageMagick_DEFAULT_EXECUTABLES "${ImageMagick_${component}_EXECUTABLE}")
|
LIST(APPEND ImageMagick_DEFAULT_EXECUTABLES ImageMagick_${component}_EXECUTABLE)
|
||||||
ENDIF(ImageMagick_FIND_COMPONENTS)
|
ENDIF(ImageMagick_FIND_COMPONENTS)
|
||||||
ENDIF(component STREQUAL "Magick++")
|
ENDIF(component STREQUAL "Magick++")
|
||||||
ENDFOREACH(component)
|
ENDFOREACH(component)
|
||||||
|
|
|
@ -25,11 +25,6 @@
|
||||||
# (To distribute this file outside of CMake, substitute the full
|
# (To distribute this file outside of CMake, substitute the full
|
||||||
# License text for the above reference.)
|
# 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)
|
set(_OPENMP_REQUIRED_VARS)
|
||||||
|
|
||||||
function(_OPENMP_FLAG_CANDIDATES LANG)
|
function(_OPENMP_FLAG_CANDIDATES LANG)
|
||||||
|
@ -93,7 +88,7 @@ int main() {
|
||||||
")
|
")
|
||||||
|
|
||||||
# check c compiler
|
# 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,
|
# if these are set then do not try to find them again,
|
||||||
# by avoiding any try_compiles for the flags
|
# by avoiding any try_compiles for the flags
|
||||||
if(OpenMP_C_FLAGS)
|
if(OpenMP_C_FLAGS)
|
||||||
|
@ -124,7 +119,7 @@ if(NOT _HAVE_LANGUAGE_C EQUAL -1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# check cxx compiler
|
# 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,
|
# if these are set then do not try to find them again,
|
||||||
# by avoiding any try_compiles for the flags
|
# by avoiding any try_compiles for the flags
|
||||||
if(OpenMP_CXX_FLAGS)
|
if(OpenMP_CXX_FLAGS)
|
||||||
|
@ -158,9 +153,6 @@ if(NOT _HAVE_LANGUAGE_CXX EQUAL -1)
|
||||||
unset(OpenMP_CXX_TEST_SOURCE)
|
unset(OpenMP_CXX_TEST_SOURCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
unset(_HAVE_LANGUAGE_C)
|
|
||||||
unset(_HAVE_LANGUAGE_CXX)
|
|
||||||
|
|
||||||
if(_OPENMP_REQUIRED_VARS)
|
if(_OPENMP_REQUIRED_VARS)
|
||||||
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ list(APPEND _osg_modules_to_process "osg" "OpenThreads")
|
||||||
list(REMOVE_DUPLICATES _osg_modules_to_process)
|
list(REMOVE_DUPLICATES _osg_modules_to_process)
|
||||||
|
|
||||||
if(OpenSceneGraph_DEBUG)
|
if(OpenSceneGraph_DEBUG)
|
||||||
message("[ FindOpenSceneGraph.cmake:${CMAKE_CURRENT_LIST_LINE} ] "
|
message(STATUS "[ FindOpenSceneGraph.cmake:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||||
"Components = ${_osg_modules_to_process}")
|
"Components = ${_osg_modules_to_process}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ endif()
|
||||||
# Try to ascertain the version...
|
# Try to ascertain the version...
|
||||||
if(OSG_INCLUDE_DIR)
|
if(OSG_INCLUDE_DIR)
|
||||||
if(OpenSceneGraph_DEBUG)
|
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}")
|
"Detected OSG_INCLUDE_DIR = ${OSG_INCLUDE_DIR}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -127,14 +127,14 @@ if(OSG_INCLUDE_DIR)
|
||||||
string(REGEX REPLACE ".*#define OPENSCENEGRAPH_PATCH_VERSION[ \t]+([0-9]+).*"
|
string(REGEX REPLACE ".*#define OPENSCENEGRAPH_PATCH_VERSION[ \t]+([0-9]+).*"
|
||||||
"\\1" _osg_VERSION_PATCH ${_osg_Version_contents})
|
"\\1" _osg_VERSION_PATCH ${_osg_Version_contents})
|
||||||
else()
|
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")
|
"Failed to parse version number, please report this as a bug")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(OPENSCENEGRAPH_VERSION "${_osg_VERSION_MAJOR}.${_osg_VERSION_MINOR}.${_osg_VERSION_PATCH}"
|
set(OPENSCENEGRAPH_VERSION "${_osg_VERSION_MAJOR}.${_osg_VERSION_MINOR}.${_osg_VERSION_PATCH}"
|
||||||
CACHE INTERNAL "The version of OSG which was detected")
|
CACHE INTERNAL "The version of OSG which was detected")
|
||||||
if(OpenSceneGraph_DEBUG)
|
if(OpenSceneGraph_DEBUG)
|
||||||
message("[ FindOpenSceneGraph.cmake:${CMAKE_CURRENT_LIST_LINE} ] "
|
message(STATUS "[ FindOpenSceneGraph.cmake:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||||
"Detected version ${OPENSCENEGRAPH_VERSION}")
|
"Detected version ${OPENSCENEGRAPH_VERSION}")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@ -165,7 +165,7 @@ endif()
|
||||||
#
|
#
|
||||||
foreach(_osg_module ${_osg_modules_to_process})
|
foreach(_osg_module ${_osg_modules_to_process})
|
||||||
if(OpenSceneGraph_DEBUG)
|
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})")
|
"Calling find_package(${_osg_module} ${_osg_required} ${_osg_quiet})")
|
||||||
endif()
|
endif()
|
||||||
find_package(${_osg_module} ${_osg_quiet})
|
find_package(${_osg_module} ${_osg_quiet})
|
||||||
|
|
|
@ -10,11 +10,14 @@
|
||||||
# PYTHON_VERSION_MINOR - Python minor version found e.g. 5
|
# PYTHON_VERSION_MINOR - Python minor version found e.g. 5
|
||||||
# PYTHON_VERSION_PATCH - Python patch version found e.g. 2
|
# 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 2005-2010 Kitware, Inc.
|
||||||
# Copyright 2011 Bjoern Ricks <bjoern.ricks@gmail.com>
|
# 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");
|
# Distributed under the OSI-approved BSD License (the "License");
|
||||||
# see accompanying file Copyright.txt for details.
|
# see accompanying file Copyright.txt for details.
|
||||||
|
@ -88,24 +91,42 @@ endif()
|
||||||
|
|
||||||
# determine python version string
|
# determine python version string
|
||||||
if(PYTHON_EXECUTABLE)
|
if(PYTHON_EXECUTABLE)
|
||||||
execute_process(COMMAND "${PYTHON_EXECUTABLE}" --version
|
execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c
|
||||||
ERROR_VARIABLE _VERSION
|
"import sys; sys.stdout.write(';'.join([str(x) for x in sys.version_info[:3]]))"
|
||||||
|
OUTPUT_VARIABLE _VERSION
|
||||||
RESULT_VARIABLE _PYTHON_VERSION_RESULT
|
RESULT_VARIABLE _PYTHON_VERSION_RESULT
|
||||||
OUTPUT_QUIET
|
ERROR_QUIET)
|
||||||
ERROR_STRIP_TRAILING_WHITESPACE)
|
if(NOT _PYTHON_VERSION_RESULT)
|
||||||
if(_PYTHON_VERSION_RESULT)
|
string(REPLACE ";" "." PYTHON_VERSION_STRING "${_VERSION}")
|
||||||
execute_process(COMMAND "${PYTHON_EXECUTABLE}" -V
|
list(GET _VERSION 0 PYTHON_VERSION_MAJOR)
|
||||||
ERROR_VARIABLE _VERSION
|
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
|
RESULT_VARIABLE _PYTHON_VERSION_RESULT
|
||||||
OUTPUT_QUIET
|
ERROR_QUIET)
|
||||||
ERROR_STRIP_TRAILING_WHITESPACE)
|
if(NOT _PYTHON_VERSION_RESULT)
|
||||||
endif(_PYTHON_VERSION_RESULT)
|
string(REGEX REPLACE " .*" "" PYTHON_VERSION_STRING "${_VERSION}")
|
||||||
if(NOT _PYTHON_VERSION_RESULT AND _VERSION MATCHES "^Python [0-9]+\\.[0-9]+.*")
|
|
||||||
string(REPLACE "Python " "" 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_MAJOR "${PYTHON_VERSION_STRING}")
|
||||||
string(REGEX REPLACE "^[0-9]+\\.([0-9])+.*" "\\1" PYTHON_VERSION_MINOR "${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]+.*")
|
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}")
|
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()
|
||||||
endif()
|
endif()
|
||||||
unset(_PYTHON_VERSION_RESULT)
|
unset(_PYTHON_VERSION_RESULT)
|
||||||
|
|
|
@ -7,8 +7,12 @@
|
||||||
# PYTHON_LIBRARIES - path to the python library
|
# PYTHON_LIBRARIES - path to the python library
|
||||||
# PYTHON_INCLUDE_PATH - path to where Python.h is found (deprecated)
|
# PYTHON_INCLUDE_PATH - path to where Python.h is found (deprecated)
|
||||||
# PYTHON_INCLUDE_DIRS - path to where Python.h is found
|
# PYTHON_INCLUDE_DIRS - path to where Python.h is found
|
||||||
# PYTHON_DEBUG_LIBRARIES - path to the debug library
|
# PYTHON_DEBUG_LIBRARIES - path to the debug library (deprecated)
|
||||||
# Python_ADDITIONAL_VERSIONS - list of additional Python versions to search for
|
# 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.
|
# Copyright 2001-2009 Kitware, Inc.
|
||||||
|
@ -27,11 +31,42 @@ INCLUDE(CMakeFindFrameworks)
|
||||||
# Search for the python framework on Apple.
|
# Search for the python framework on Apple.
|
||||||
CMAKE_FIND_FRAMEWORKS(Python)
|
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
|
# Set up the versions we know about, in the order we will search. Always add
|
||||||
# the user supplied additional versions to the front.
|
# the user supplied additional versions to the front.
|
||||||
set(_Python_VERSIONS
|
SET(_Python_VERSIONS
|
||||||
${Python_ADDITIONAL_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})
|
FOREACH(_CURRENT_VERSION ${_Python_VERSIONS})
|
||||||
STRING(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
|
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
|
SET(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}" CACHE INTERNAL
|
||||||
"Path to where Python.h is found (deprecated)")
|
"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)
|
ENDFOREACH(_CURRENT_VERSION)
|
||||||
|
|
||||||
MARK_AS_ADVANCED(
|
MARK_AS_ADVANCED(
|
||||||
|
@ -105,13 +151,23 @@ MARK_AS_ADVANCED(
|
||||||
# library. We now set the variables listed by the documentation for this
|
# library. We now set the variables listed by the documentation for this
|
||||||
# module.
|
# module.
|
||||||
SET(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
|
SET(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
|
||||||
SET(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
|
|
||||||
SET(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_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)
|
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_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
|
# PYTHON_WRITE_MODULES_HEADER(<filename>) writes a header file you can include
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
# QT_DEFINITIONS - definitions to use when
|
# QT_DEFINITIONS - definitions to use when
|
||||||
# compiling code that uses Qt.
|
# compiling code that uses Qt.
|
||||||
# QT_FOUND - If false, don't try to use 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
|
# If you need the multithreaded version of Qt, set QT_MT_REQUIRED to TRUE
|
||||||
#
|
#
|
||||||
|
@ -46,13 +47,16 @@ IF(QT4_FOUND)
|
||||||
ENDIF(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
|
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.1;InstallDir]/include/Qt"
|
||||||
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;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"
|
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/include/Qt"
|
||||||
$ENV{QTDIR}/include
|
$ENV{QTDIR}/include
|
||||||
${GLOB_PATHS_BIN}
|
${GLOB_PATHS}
|
||||||
/usr/local/qt/include
|
/usr/local/qt/include
|
||||||
/usr/lib/qt/include
|
/usr/lib/qt/include
|
||||||
/usr/lib/qt3/include
|
/usr/lib/qt3/include
|
||||||
|
@ -71,12 +75,13 @@ ENDIF(NOT EXISTS ${QT_INCLUDE_DIR}/qglobal.h)
|
||||||
IF(QT_INCLUDE_DIR)
|
IF(QT_INCLUDE_DIR)
|
||||||
#extract the version string from qglobal.h
|
#extract the version string from qglobal.h
|
||||||
FILE(READ ${QT_INCLUDE_DIR}/qglobal.h 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 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]+)\".*" "\\1" qt_version_str "${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
|
# 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
|
# version X.Y.Z, so we need to remove the dots from version
|
||||||
STRING(REGEX REPLACE "\\." "" qt_version_str_lib "${qt_version_str}")
|
STRING(REGEX REPLACE "\\." "" qt_version_str_lib "${qt_version_str}")
|
||||||
|
SET(QT_VERSION_STRING "${qt_version_str}")
|
||||||
ENDIF(QT_INCLUDE_DIR)
|
ENDIF(QT_INCLUDE_DIR)
|
||||||
|
|
||||||
FILE(GLOB GLOB_PATHS_LIB /usr/lib/qt-3*/lib/)
|
FILE(GLOB GLOB_PATHS_LIB /usr/lib/qt-3*/lib/)
|
||||||
|
@ -195,58 +200,16 @@ IF (WIN32)
|
||||||
)
|
)
|
||||||
ENDIF (WIN32)
|
ENDIF (WIN32)
|
||||||
|
|
||||||
|
#support old QT_MIN_VERSION if set, but not if version is supplied by find_package()
|
||||||
IF (QT_MIN_VERSION)
|
IF(NOT Qt3_FIND_VERSION AND QT_MIN_VERSION)
|
||||||
|
SET(Qt3_FIND_VERSION ${QT_MIN_VERSION})
|
||||||
STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" qt_major_vers "${qt_version_str}")
|
ENDIF(NOT Qt3_FIND_VERSION AND QT_MIN_VERSION)
|
||||||
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)
|
|
||||||
|
|
||||||
# if the include a library are found then we have it
|
# if the include a library are found then we have it
|
||||||
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
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} )
|
SET(QT_FOUND ${QT3_FOUND} )
|
||||||
|
|
||||||
IF(QT_FOUND)
|
IF(QT_FOUND)
|
||||||
|
@ -296,8 +259,16 @@ IF(QT_FOUND)
|
||||||
ENDIF(QT_QT_LIBRARY MATCHES "qt-mt")
|
ENDIF(QT_QT_LIBRARY MATCHES "qt-mt")
|
||||||
ENDIF(QT_FOUND)
|
ENDIF(QT_FOUND)
|
||||||
|
|
||||||
EXEC_PROGRAM(${QT_MOC_EXECUTABLE} ARGS "-v" OUTPUT_VARIABLE QTVERSION_MOC)
|
IF(QT_MOC_EXECUTABLE)
|
||||||
EXEC_PROGRAM(${QT_UIC_EXECUTABLE} ARGS "-version" OUTPUT_VARIABLE QTVERSION_UIC)
|
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)
|
SET(_QT_UIC_VERSION_3 FALSE)
|
||||||
IF("${QTVERSION_UIC}" MATCHES ".* 3..*")
|
IF("${QTVERSION_UIC}" MATCHES ".* 3..*")
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# [PREFIX_NAME <prefix_name>]
|
# [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
|
# 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
|
# 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)
|
macro(_check_cxx_compiler_attribute _ATTRIBUTE _RESULT)
|
||||||
check_cxx_source_compiles("${_ATTRIBUTE} int somefunc() { return 0; }
|
check_cxx_source_compiles("${_ATTRIBUTE} int somefunc() { return 0; }
|
||||||
int main() { return somefunc();}" ${_RESULT}
|
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()
|
endmacro()
|
||||||
|
|
||||||
macro(_test_compiler_hidden_visibility)
|
macro(_test_compiler_hidden_visibility)
|
||||||
|
|
||||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.2")
|
||||||
exec_program(${CMAKE_C_COMPILER} ARGS --version
|
|
||||||
OUTPUT_VARIABLE _gcc_version_info)
|
|
||||||
string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]"
|
|
||||||
_gcc_version "${_gcc_version_info}")
|
|
||||||
# gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
|
|
||||||
# patch level, handle this here:
|
|
||||||
if(NOT _gcc_version)
|
|
||||||
string(REGEX REPLACE ".*\\(GCC\\).* ([34]\\.[0-9]) .*" "\\1.0"
|
|
||||||
_gcc_version "${_gcc_version_info}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if("${_gcc_version}" VERSION_LESS "4.2")
|
|
||||||
set(GCC_TOO_OLD TRUE)
|
set(GCC_TOO_OLD TRUE)
|
||||||
message(WARNING "GCC version older than 4.2")
|
message(WARNING "GCC version older than 4.2")
|
||||||
endif()
|
elseif(CMAKE_COMPILER_IS_GNUC AND CMAKE_C_COMPILER_VERSION VERSION_LESS "4.2")
|
||||||
endif()
|
set(GCC_TOO_OLD TRUE)
|
||||||
|
message(WARNING "GCC version older than 4.2")
|
||||||
if(CMAKE_CXX_COMPILER_ID MATCHES Intel)
|
elseif(CMAKE_CXX_COMPILER_ID MATCHES Intel AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "12.0")
|
||||||
exec_program(${CMAKE_CXX_COMPILER} ARGS -V
|
|
||||||
OUTPUT_VARIABLE _intel_version_info)
|
|
||||||
string(REGEX REPLACE ".*Version ([0-9]+(\\.[0-9]+)+).*" "\\1"
|
|
||||||
_intel_version "${_intel_version_info}")
|
|
||||||
|
|
||||||
if(${_intel_version} VERSION_LESS "12.0")
|
|
||||||
set(_INTEL_TOO_OLD TRUE)
|
set(_INTEL_TOO_OLD TRUE)
|
||||||
message(WARNING "Intel compiler older than 12.0")
|
message(WARNING "Intel compiler older than 12.0")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
# Exclude XL here because it misinterprets -fvisibility=hidden even though
|
# Exclude XL here because it misinterprets -fvisibility=hidden even though
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
include(Platform/Windows-Borland)
|
include(Platform/Windows-Embarcadero-C)
|
||||||
__borland_language(C)
|
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
include(Platform/Windows-Borland)
|
include(Platform/Windows-Embarcadero-CXX)
|
||||||
__borland_language(CXX)
|
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
set(_lang C)
|
||||||
|
include(Platform/Windows-Embarcadero)
|
||||||
|
__embarcadero_language(C)
|
|
@ -0,0 +1,3 @@
|
||||||
|
set(_lang CXX)
|
||||||
|
include(Platform/Windows-Embarcadero)
|
||||||
|
__embarcadero_language(CXX)
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Copyright 2002-2009 Kitware, Inc.
|
# Copyright 2002-2012 Kitware, Inc.
|
||||||
#
|
#
|
||||||
# Distributed under the OSI-approved BSD License (the "License");
|
# Distributed under the OSI-approved BSD License (the "License");
|
||||||
# see accompanying file Copyright.txt for details.
|
# see accompanying file Copyright.txt for details.
|
||||||
|
@ -13,26 +13,33 @@
|
||||||
# License text for the above reference.)
|
# License text for the above reference.)
|
||||||
|
|
||||||
# This module is shared by multiple languages; use include blocker.
|
# This module is shared by multiple languages; use include blocker.
|
||||||
if(__WINDOWS_BORLAND)
|
if(__WINDOWS_EMBARCADERO)
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
set(__WINDOWS_BORLAND 1)
|
set(__WINDOWS_EMBARCADERO 1)
|
||||||
|
|
||||||
SET(BORLAND 1)
|
SET(BORLAND 1)
|
||||||
|
|
||||||
# Borland target type flags (bcc32 -h -t):
|
if("${CMAKE_${_lang}_COMPILER_VERSION}" VERSION_LESS 6.30)
|
||||||
# -tW GUI App (implies -U__CONSOLE__)
|
# Borland target type flags (bcc32 -h -t):
|
||||||
# -tWC Console App (implies -D__CONSOLE__=1)
|
set(_tW "-tW") # -tW GUI App (implies -U__CONSOLE__)
|
||||||
# -tWD Build a DLL (implies -D__DLL__=1 -D_DLL=1)
|
set(_tC "-tWC") # -tWC Console App (implies -D__CONSOLE__=1)
|
||||||
# -tWM Enable threads (implies -D__MT__=1 -D_MT=1)
|
set(_tD "-tWD") # -tWD Build a DLL (implies -D__DLL__=1 -D_DLL=1)
|
||||||
# -tWR Use DLL runtime (implies -D_RTLDLL, and '-tW' too!!)
|
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:
|
# Notes:
|
||||||
# - The flags affect linking so we pass them to the linker.
|
# - The flags affect linking so we pass them to the linker.
|
||||||
# - The flags affect preprocessing so we pass them to the compiler.
|
# - The flags affect preprocessing so we pass them to the compiler.
|
||||||
# - Since '-tWR' implies '-tW' we use '-tWR -tW-' instead.
|
# - Since '-tWR' implies '-tW' we use '-tWR -tW-' instead.
|
||||||
# - Since '-tW-' disables '-tWD' we use '-tWR -tW- -tWD' for DLLs.
|
# - Since '-tW-' disables '-tWD' we use '-tWR -tW- -tWD' for DLLs.
|
||||||
set(_RTLDLL "-tWR -tW-")
|
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_C "-c")
|
||||||
set(_COMPILE_CXX "-P -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")
|
SET (CMAKE_MANGLE_OBJECT_FILE_NAMES "ON")
|
||||||
|
|
||||||
# extra flags for a win32 exe
|
# extra flags for a win32 exe
|
||||||
SET(CMAKE_CREATE_WIN32_EXE "-tW" )
|
SET(CMAKE_CREATE_WIN32_EXE "${_tW}" )
|
||||||
# extra flags for a console app
|
# 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
|
SET (CMAKE_BUILD_TYPE Debug CACHE STRING
|
||||||
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel.")
|
"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_DEBUG_INIT "-v")
|
||||||
SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "-v")
|
SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "-v")
|
||||||
SET (CMAKE_SHARED_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT})
|
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_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT})
|
||||||
SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_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
|
# compile a source file into an object file
|
||||||
# place <DEFINES> outside the response file because Borland refuses
|
# place <DEFINES> outside the response file because Borland refuses
|
||||||
# to parse quotes from the response file.
|
# to parse quotes from the response file.
|
||||||
set(CMAKE_${lang}_COMPILE_OBJECT
|
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
|
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>"
|
# "implib -c -w <TARGET_IMPLIB> <TARGET>"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -91,7 +99,7 @@ macro(__borland_language lang)
|
||||||
|
|
||||||
# Create a module library.
|
# Create a module library.
|
||||||
set(CMAKE_${lang}_CREATE_SHARED_MODULE
|
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.
|
# Create an import library for another target.
|
||||||
|
@ -112,7 +120,7 @@ macro(__borland_language lang)
|
||||||
)
|
)
|
||||||
|
|
||||||
# Initial configuration flags.
|
# 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_DEBUG_INIT "-Od -v")
|
||||||
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-O1 -DNDEBUG")
|
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-O1 -DNDEBUG")
|
||||||
set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
|
set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
|
|
@ -47,20 +47,17 @@ MACRO(SWIG_MODULE_INITIALIZE name language)
|
||||||
SET(SWIG_MODULE_${name}_LANGUAGE "${swig_uppercase_language}")
|
SET(SWIG_MODULE_${name}_LANGUAGE "${swig_uppercase_language}")
|
||||||
SET(SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG "${swig_lowercase_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}")
|
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
|
# when swig is used without the -interface it will produce in the module.py
|
||||||
# a 'import _modulename' statement, which implies having a corresponding
|
# a 'import _modulename' statement, which implies having a corresponding
|
||||||
# _modulename.so (*NIX), _modulename.pyd (Win32).
|
# _modulename.so (*NIX), _modulename.pyd (Win32).
|
||||||
SET(SWIG_MODULE_${name}_REAL_NAME "_${name}")
|
SET(SWIG_MODULE_${name}_REAL_NAME "_${name}")
|
||||||
ENDIF("x${SWIG_MODULE_${name}_LANGUAGE}x" MATCHES "^xPYTHONx$")
|
ELSEIF("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "PERL")
|
||||||
IF("x${SWIG_MODULE_${name}_LANGUAGE}x" MATCHES "^xPERLx$")
|
|
||||||
SET(SWIG_MODULE_${name}_EXTRA_FLAGS "-shadow")
|
SET(SWIG_MODULE_${name}_EXTRA_FLAGS "-shadow")
|
||||||
ENDIF("x${SWIG_MODULE_${name}_LANGUAGE}x" MATCHES "^xPERLx$")
|
ENDIF()
|
||||||
ENDMACRO(SWIG_MODULE_INITIALIZE)
|
ENDMACRO(SWIG_MODULE_INITIALIZE)
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,31 +1,6 @@
|
||||||
# WRITE_BASIC_CONFIG_VERSION_FILE( filename VERSION major.minor.patch COMPATIBILITY (AnyNewerVersion|SameMajorVersion) )
|
# 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>.
|
# Deprecated, see WRITE_BASIC_PACKAGE_VERSION_FILE(), it is identical.
|
||||||
# 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.
|
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Copyright 2008-2011 Alexander Neundorf, <neundorf@kde.org>
|
# Copyright 2008-2011 Alexander Neundorf, <neundorf@kde.org>
|
||||||
|
|
|
@ -185,6 +185,8 @@ SET(SRCS
|
||||||
cmGeneratedFileStream.cxx
|
cmGeneratedFileStream.cxx
|
||||||
cmGeneratorExpression.cxx
|
cmGeneratorExpression.cxx
|
||||||
cmGeneratorExpression.h
|
cmGeneratorExpression.h
|
||||||
|
cmGeneratorTarget.cxx
|
||||||
|
cmGeneratorTarget.h
|
||||||
cmGlobalGenerator.cxx
|
cmGlobalGenerator.cxx
|
||||||
cmGlobalGenerator.h
|
cmGlobalGenerator.h
|
||||||
cmGlobalUnixMakefileGenerator3.cxx
|
cmGlobalUnixMakefileGenerator3.cxx
|
||||||
|
|
|
@ -21,12 +21,60 @@ void cmCPackDocumentVariables::DefineVariables(cmake* cm)
|
||||||
"", false,
|
"", false,
|
||||||
"Variables common to all CPack generators");
|
"Variables common to all CPack generators");
|
||||||
|
|
||||||
// Subsection: variables defined/used by cpack,
|
cm->DefineProperty
|
||||||
// which are specific to one CPack generator
|
("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", cmProperty::VARIABLE,
|
||||||
// cm->DefineProperty
|
"Boolean toggle to include/exclude top level directory.",
|
||||||
// ("CPACK_RPM_PACKAGE_NAME", cmProperty::VARIABLE,
|
"When preparing a package CPack installs the item under"
|
||||||
// "RPM specific package name.",
|
" the so-called top level directory. The purpose of"
|
||||||
// "If not specified, defaults to CPACK_PACKAGE_NAME."
|
" is to include (set to 1 or ON or TRUE) the top level directory"
|
||||||
// "", false,
|
" in the package or not (set to 0 or OFF or FALSE).\n"
|
||||||
// "Variables specific to a CPack generator");
|
"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");
|
||||||
}
|
}
|
||||||
|
|
|
@ -421,6 +421,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
|
||||||
if(ifs.is_open())
|
if(ifs.is_open())
|
||||||
{
|
{
|
||||||
cmGeneratedFileStream osf(sla_r.c_str());
|
cmGeneratedFileStream osf(sla_r.c_str());
|
||||||
|
osf << "#include <CoreServices/CoreServices.r>\n\n";
|
||||||
osf << SLAHeader;
|
osf << SLAHeader;
|
||||||
osf << "\n";
|
osf << "\n";
|
||||||
osf << "data 'TEXT' (5002, \"English\") {\n";
|
osf << "data 'TEXT' (5002, \"English\") {\n";
|
||||||
|
@ -481,12 +482,10 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
|
||||||
|
|
||||||
// Rez the SLA
|
// Rez the SLA
|
||||||
cmOStringStream embed_sla_command;
|
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 << 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 << " -a -o ";
|
||||||
embed_sla_command << "'" << temp_udco << "'\"";
|
embed_sla_command << "\"" << temp_udco << "\"";
|
||||||
|
|
||||||
if(!this->RunCommand(embed_sla_command, &error))
|
if(!this->RunCommand(embed_sla_command, &error))
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,12 +43,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Build the project.";
|
return "Build the project.";
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" ctest_build([BUILD build_dir] [TARGET target] [RETURN_VALUE res]\n"
|
" ctest_build([BUILD build_dir] [TARGET target] [RETURN_VALUE res]\n"
|
||||||
|
|
|
@ -38,12 +38,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Configure the project build tree.";
|
return "Configure the project build tree.";
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" ctest_configure([BUILD build_dir] [SOURCE source_dir] [APPEND]\n"
|
" ctest_configure([BUILD build_dir] [SOURCE source_dir] [APPEND]\n"
|
||||||
|
|
|
@ -39,12 +39,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Collect coverage tool results.";
|
return "Collect coverage tool results.";
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" ctest_coverage([BUILD build_dir] [RETURN_VALUE res] [APPEND]\n"
|
" ctest_coverage([BUILD build_dir] [RETURN_VALUE res] [APPEND]\n"
|
||||||
|
|
|
@ -48,12 +48,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "empties the binary directory";
|
return "empties the binary directory";
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" ctest_empty_binary_directory( directory )\n"
|
" ctest_empty_binary_directory( directory )\n"
|
||||||
|
|
|
@ -41,12 +41,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Run tests with a dynamic analysis tool.";
|
return "Run tests with a dynamic analysis tool.";
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" ctest_memcheck([BUILD build_dir] [RETURN_VALUE res] [APPEND]\n"
|
" ctest_memcheck([BUILD build_dir] [RETURN_VALUE res] [APPEND]\n"
|
||||||
|
|
|
@ -46,12 +46,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "read CTestCustom files.";
|
return "read CTestCustom files.";
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" ctest_read_custom_files( directory ... )\n"
|
" ctest_read_custom_files( directory ... )\n"
|
||||||
|
|
|
@ -47,12 +47,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "runs a ctest -S script";
|
return "runs a ctest -S script";
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" ctest_run_script([NEW_PROCESS] script_file_name script_file_name1 \n"
|
" ctest_run_script([NEW_PROCESS] script_file_name script_file_name1 \n"
|
||||||
|
|
|
@ -47,12 +47,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "sleeps for some amount of time";
|
return "sleeps for some amount of time";
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" ctest_sleep(<seconds>)\n"
|
" ctest_sleep(<seconds>)\n"
|
||||||
|
|
|
@ -55,12 +55,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Starts the testing for a given model";
|
return "Starts the testing for a given model";
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" ctest_start(Model [TRACK <track>] [APPEND] [source [binary]])\n"
|
" ctest_start(Model [TRACK <track>] [APPEND] [source [binary]])\n"
|
||||||
|
|
|
@ -48,12 +48,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Submit results to a dashboard server.";
|
return "Submit results to a dashboard server.";
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" ctest_submit([PARTS ...] [FILES ...] [RETRY_COUNT count] "
|
" ctest_submit([PARTS ...] [FILES ...] [RETRY_COUNT count] "
|
||||||
|
|
|
@ -39,12 +39,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Run tests in the project build tree.";
|
return "Run tests in the project build tree.";
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" ctest_test([BUILD build_dir] [APPEND]\n"
|
" ctest_test([BUILD build_dir] [APPEND]\n"
|
||||||
|
|
|
@ -59,11 +59,11 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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
|
// Unused methods
|
||||||
virtual const char* GetTerseDocumentation() { return ""; }
|
virtual const char* GetTerseDocumentation() const { return ""; }
|
||||||
virtual const char* GetFullDocumentation() { return ""; }
|
virtual const char* GetFullDocumentation() const { return ""; }
|
||||||
|
|
||||||
cmTypeMacro(cmCTestSubdirCommand, cmCommand);
|
cmTypeMacro(cmCTestSubdirCommand, cmCommand);
|
||||||
|
|
||||||
|
@ -161,11 +161,11 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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
|
// Unused methods
|
||||||
virtual const char* GetTerseDocumentation() { return ""; }
|
virtual const char* GetTerseDocumentation() const { return ""; }
|
||||||
virtual const char* GetFullDocumentation() { return ""; }
|
virtual const char* GetFullDocumentation() const { return ""; }
|
||||||
|
|
||||||
cmTypeMacro(cmCTestAddSubdirectoryCommand, cmCommand);
|
cmTypeMacro(cmCTestAddSubdirectoryCommand, cmCommand);
|
||||||
|
|
||||||
|
@ -251,11 +251,11 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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
|
// Unused methods
|
||||||
virtual const char* GetTerseDocumentation() { return ""; }
|
virtual const char* GetTerseDocumentation() const { return ""; }
|
||||||
virtual const char* GetFullDocumentation() { return ""; }
|
virtual const char* GetFullDocumentation() const { return ""; }
|
||||||
|
|
||||||
cmTypeMacro(cmCTestAddTestCommand, cmCommand);
|
cmTypeMacro(cmCTestAddTestCommand, cmCommand);
|
||||||
|
|
||||||
|
@ -299,11 +299,11 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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
|
// Unused methods
|
||||||
virtual const char* GetTerseDocumentation() { return ""; }
|
virtual const char* GetTerseDocumentation() const { return ""; }
|
||||||
virtual const char* GetFullDocumentation() { return ""; }
|
virtual const char* GetFullDocumentation() const { return ""; }
|
||||||
|
|
||||||
cmTypeMacro(cmCTestSetTestsPropertiesCommand, cmCommand);
|
cmTypeMacro(cmCTestSetTestsPropertiesCommand, cmCommand);
|
||||||
|
|
||||||
|
|
|
@ -39,12 +39,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Update the work tree from version control.";
|
return "Update the work tree from version control.";
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" ctest_update([SOURCE source] [RETURN_VALUE res])\n"
|
" ctest_update([SOURCE source] [RETURN_VALUE res])\n"
|
||||||
|
|
|
@ -43,12 +43,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Upload files to a dashboard server.";
|
return "Upload files to a dashboard server.";
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" ctest_upload(FILES ...)\n"
|
" ctest_upload(FILES ...)\n"
|
||||||
|
|
|
@ -44,12 +44,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Add a custom build rule to the generated build system.";
|
return "Add a custom build rule to the generated build system.";
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
"There are two main signatures for add_custom_command "
|
"There are two main signatures for add_custom_command "
|
||||||
|
|
|
@ -42,13 +42,13 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* The name of the command as specified in CMakeList.txt.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetName()
|
virtual const char* GetName() const
|
||||||
{return "add_custom_target";}
|
{return "add_custom_target";}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Succinct documentation.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Add a target with no output so it will always be built.";
|
return "Add a target with no output so it will always be built.";
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" add_custom_target(Name [ALL] [command1 [args1...]]\n"
|
" add_custom_target(Name [ALL] [command1 [args1...]]\n"
|
||||||
|
|
|
@ -41,12 +41,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Adds -D define flags to the compilation of source files.";
|
return "Adds -D define flags to the compilation of source files.";
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" add_definitions(-DFOO -DBAR ...)\n"
|
" add_definitions(-DFOO -DBAR ...)\n"
|
||||||
|
|
|
@ -40,12 +40,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Add a dependency between top-level targets.";
|
return "Add a dependency between top-level targets.";
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" add_dependencies(target-name depend-target1\n"
|
" add_dependencies(target-name depend-target1\n"
|
||||||
|
|
|
@ -41,12 +41,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
"Add an executable to the project using the specified source files.";
|
"Add an executable to the project using the specified source files.";
|
||||||
|
@ -55,7 +55,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" add_executable(<name> [WIN32] [MACOSX_BUNDLE]\n"
|
" add_executable(<name> [WIN32] [MACOSX_BUNDLE]\n"
|
||||||
|
|
|
@ -64,6 +64,12 @@ bool cmAddLibraryCommand
|
||||||
type = cmTarget::MODULE_LIBRARY;
|
type = cmTarget::MODULE_LIBRARY;
|
||||||
haveSpecifiedType = true;
|
haveSpecifiedType = true;
|
||||||
}
|
}
|
||||||
|
else if(libType == "OBJECT")
|
||||||
|
{
|
||||||
|
++s;
|
||||||
|
type = cmTarget::OBJECT_LIBRARY;
|
||||||
|
haveSpecifiedType = true;
|
||||||
|
}
|
||||||
else if(libType == "UNKNOWN")
|
else if(libType == "UNKNOWN")
|
||||||
{
|
{
|
||||||
++s;
|
++s;
|
||||||
|
@ -118,6 +124,14 @@ bool cmAddLibraryCommand
|
||||||
this->SetError("called with IMPORTED argument but no library type.");
|
this->SetError("called with IMPORTED argument but no library type.");
|
||||||
return false;
|
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.
|
// Make sure the target does not already exist.
|
||||||
if(this->Makefile->FindTargetToUse(libName.c_str()))
|
if(this->Makefile->FindTargetToUse(libName.c_str()))
|
||||||
|
|
|
@ -41,12 +41,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Add a library to the project using the specified source files.";
|
return "Add a library to the project using the specified source files.";
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" add_library(<name> [STATIC | SHARED | MODULE]\n"
|
" add_library(<name> [STATIC | SHARED | MODULE]\n"
|
||||||
|
|
|
@ -42,12 +42,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Add a subdirectory to the build.";
|
return "Add a subdirectory to the build.";
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" add_subdirectory(source_dir [binary_dir] \n"
|
" add_subdirectory(source_dir [binary_dir] \n"
|
||||||
|
|
|
@ -41,12 +41,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Add a test to the project with the specified arguments.";
|
return "Add a test to the project with the specified arguments.";
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" add_test(testname Exename arg1 arg2 ... )\n"
|
" add_test(testname Exename arg1 arg2 ... )\n"
|
||||||
|
|
|
@ -44,12 +44,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Find all source files in a directory.";
|
return "Find all source files in a directory.";
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" aux_source_directory(<dir> <variable>)\n"
|
" aux_source_directory(<dir> <variable>)\n"
|
||||||
|
|
|
@ -40,17 +40,17 @@ public:
|
||||||
/**
|
/**
|
||||||
* This determines if the command is invoked when in script mode.
|
* 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.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Break from an enclosing foreach or while loop.";
|
return "Break from an enclosing foreach or while loop.";
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" break()\n"
|
" break()\n"
|
||||||
|
|
|
@ -50,12 +50,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Get the command line to build this project.";
|
return "Get the command line to build this project.";
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" build_command(<variable>\n"
|
" build_command(<variable>\n"
|
||||||
|
|
|
@ -40,17 +40,17 @@ public:
|
||||||
/**
|
/**
|
||||||
* This determines if the command is invoked when in script mode.
|
* 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.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
"Deprecated. Use ${CMAKE_SYSTEM} and ${CMAKE_CXX_COMPILER} instead.";
|
"Deprecated. Use ${CMAKE_SYSTEM} and ${CMAKE_CXX_COMPILER} instead.";
|
||||||
|
@ -59,7 +59,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" build_name(variable)\n"
|
" build_name(variable)\n"
|
||||||
|
@ -69,7 +69,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/** This command is kept for compatibility with older CMake versions. */
|
/** This command is kept for compatibility with older CMake versions. */
|
||||||
virtual bool IsDiscouraged()
|
virtual bool IsDiscouraged() const
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,17 +40,17 @@ public:
|
||||||
/**
|
/**
|
||||||
* This determines if the command is invoked when in script mode.
|
* 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.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Set the minimum required version of cmake for a project.";
|
return "Set the minimum required version of cmake for a project.";
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" cmake_minimum_required(VERSION major[.minor[.patch[.tweak]]]\n"
|
" cmake_minimum_required(VERSION major[.minor[.patch[.tweak]]]\n"
|
||||||
|
|
|
@ -41,17 +41,17 @@ public:
|
||||||
/**
|
/**
|
||||||
* This determines if the command is invoked when in script mode.
|
* 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.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Manage CMake Policy settings.";
|
return "Manage CMake Policy settings.";
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
"As CMake evolves it is sometimes necessary to change existing "
|
"As CMake evolves it is sometimes necessary to change existing "
|
||||||
|
|
|
@ -96,7 +96,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* This determines if the command is invoked when in script mode.
|
* This determines if the command is invoked when in script mode.
|
||||||
*/
|
*/
|
||||||
virtual bool IsScriptable()
|
virtual bool IsScriptable() const
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -105,7 +105,7 @@ public:
|
||||||
* This determines if usage of the method is discouraged or not.
|
* This determines if usage of the method is discouraged or not.
|
||||||
* This is currently only used for generating the documentation.
|
* This is currently only used for generating the documentation.
|
||||||
*/
|
*/
|
||||||
virtual bool IsDiscouraged()
|
virtual bool IsDiscouraged() const
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -116,7 +116,7 @@ public:
|
||||||
* cmMacroHelperCommand and cmFunctionHelperCommand
|
* cmMacroHelperCommand and cmFunctionHelperCommand
|
||||||
* which cannot provide appropriate documentation.
|
* which cannot provide appropriate documentation.
|
||||||
*/
|
*/
|
||||||
virtual bool ShouldAppearInDocumentation()
|
virtual bool ShouldAppearInDocumentation() const
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -124,17 +124,17 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* The name of the command as specified in CMakeList.txt.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetName() = 0;
|
virtual const char* GetName() const = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Succinct documentation.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation() = 0;
|
virtual const char* GetTerseDocumentation() const = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation() = 0;
|
virtual const char* GetFullDocumentation() const = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable the command.
|
* Enable the command.
|
||||||
|
@ -151,7 +151,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* Query whether the command is enabled.
|
* Query whether the command is enabled.
|
||||||
*/
|
*/
|
||||||
bool GetEnabled()
|
bool GetEnabled() const
|
||||||
{return this->Enabled;}
|
{return this->Enabled;}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -81,7 +81,6 @@ private:
|
||||||
cmStdString InputBuffer;
|
cmStdString InputBuffer;
|
||||||
std::vector<char> OutputBuffer;
|
std::vector<char> OutputBuffer;
|
||||||
int CurrentLine;
|
int CurrentLine;
|
||||||
int UnionsAvailable;
|
|
||||||
int Verbose;
|
int Verbose;
|
||||||
|
|
||||||
void Print(const char* place, const char* str);
|
void Print(const char* place, const char* str);
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
This file computes an ordered list of link items to use when linking a
|
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
|
single target in one configuration. Each link item is identified by
|
||||||
the string naming it. A graph of dependencies is created in which
|
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
|
those which must *follow* them on the link line. For example, the
|
||||||
graph
|
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
|
There are two types of items: those with known direct dependencies and
|
||||||
those without known dependencies. We will call the two types "known
|
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
|
names correspond to targets (built or imported) and those for which an
|
||||||
old-style <item>_LIB_DEPENDS variable is defined. All other items are
|
old-style <item>_LIB_DEPENDS variable is defined. All other items are
|
||||||
unknown and we must infer dependencies for them. For items that look
|
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
|
twice for non-trivial). If at any time another component finishes and
|
||||||
re-adds an already pending component, the pending component is reset
|
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
|
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.
|
appears.
|
||||||
|
|
||||||
After the original link line has been completed, we append to it the
|
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;
|
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 the target found, if any.
|
||||||
return tgt;
|
return tgt;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1772,6 +1772,7 @@ void cmComputeLinkInformation::GetRPath(std::vector<std::string>& runtimeDirs,
|
||||||
!linking_for_install);
|
!linking_for_install);
|
||||||
bool use_link_rpath =
|
bool use_link_rpath =
|
||||||
outputRuntime && linking_for_install &&
|
outputRuntime && linking_for_install &&
|
||||||
|
!this->Makefile->IsOn("CMAKE_SKIP_INSTALL_RPATH") &&
|
||||||
this->Target->GetPropertyAsBool("INSTALL_RPATH_USE_LINK_PATH");
|
this->Target->GetPropertyAsBool("INSTALL_RPATH_USE_LINK_PATH");
|
||||||
|
|
||||||
// Construct the RPATH.
|
// Construct the RPATH.
|
||||||
|
|
|
@ -31,7 +31,7 @@ dependencies for each target such that no cycles are left and the
|
||||||
build order is safe.
|
build order is safe.
|
||||||
|
|
||||||
For most target types cyclic dependencies are not allowed. However
|
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
|
general the directed dependency graph forms a directed-acyclic-graph
|
||||||
of strongly connected components. All strongly connected components
|
of strongly connected components. All strongly connected components
|
||||||
should consist of only STATIC_LIBRARY targets.
|
should consist of only STATIC_LIBRARY targets.
|
||||||
|
|
|
@ -34,17 +34,17 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* This determines if the command is invoked when in script mode.
|
||||||
*/
|
*/
|
||||||
virtual bool IsScriptable() { return true; }
|
virtual bool IsScriptable() const { return true; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Succinct documentation.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Copy a file to another location and modify its contents.";
|
return "Copy a file to another location and modify its contents.";
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* Longer documentation.
|
* Longer documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" configure_file(<input> <output>\n"
|
" configure_file(<input> <output>\n"
|
||||||
|
|
|
@ -153,11 +153,11 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
|
||||||
std::string ccFile = this->BinaryDirectory + "/CMakeCache.txt";
|
std::string ccFile = this->BinaryDirectory + "/CMakeCache.txt";
|
||||||
cmSystemTools::RemoveFile(ccFile.c_str());
|
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
|
// first create the directories
|
||||||
sourceDirectory = this->BinaryDirectory.c_str();
|
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");
|
FILE *fout = fopen(outFileName.c_str(),"w");
|
||||||
if (!fout)
|
if (!fout)
|
||||||
{
|
{
|
||||||
|
|
|
@ -70,7 +70,7 @@ bool cmCreateTestSourceList
|
||||||
if (cmSystemTools::GetFilenameExtension(*i).size() < 2)
|
if (cmSystemTools::GetFilenameExtension(*i).size() < 2)
|
||||||
{
|
{
|
||||||
this->SetError(
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
std::string driver = this->Makefile->GetCurrentOutputDirectory();
|
std::string driver = this->Makefile->GetCurrentOutputDirectory();
|
||||||
|
|
|
@ -40,12 +40,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Create a test driver and source list for building test programs.";
|
return "Create a test driver and source list for building test programs.";
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" create_test_sourcelist(sourceListName driverName\n"
|
" create_test_sourcelist(sourceListName driverName\n"
|
||||||
|
|
|
@ -32,12 +32,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Define and document custom properties.";
|
return "Define and document custom properties.";
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* Longer documentation.
|
* Longer documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" define_property(<GLOBAL | DIRECTORY | TARGET | SOURCE |\n"
|
" define_property(<GLOBAL | DIRECTORY | TARGET | SOURCE |\n"
|
||||||
|
|
|
@ -261,11 +261,13 @@ bool cmDepends::CheckDependencies(std::istream& internalDepends,
|
||||||
void cmDepends::SetIncludePathFromLanguage(const char* lang)
|
void cmDepends::SetIncludePathFromLanguage(const char* lang)
|
||||||
{
|
{
|
||||||
// Look for the new per "TARGET_" variant first:
|
// Look for the new per "TARGET_" variant first:
|
||||||
|
const char * includePath = 0;
|
||||||
std::string includePathVar = "CMAKE_";
|
std::string includePathVar = "CMAKE_";
|
||||||
includePathVar += lang;
|
includePathVar += lang;
|
||||||
includePathVar += "_TARGET_INCLUDE_PATH";
|
includePathVar += "_TARGET_INCLUDE_PATH";
|
||||||
cmMakefile* mf = this->LocalGenerator->GetMakefile();
|
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);
|
cmSystemTools::ExpandListArgument(includePath, this->IncludePath);
|
||||||
}
|
}
|
||||||
|
@ -275,7 +277,8 @@ void cmDepends::SetIncludePathFromLanguage(const char* lang)
|
||||||
includePathVar = "CMAKE_";
|
includePathVar = "CMAKE_";
|
||||||
includePathVar += lang;
|
includePathVar += lang;
|
||||||
includePathVar += "_INCLUDE_PATH";
|
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);
|
cmSystemTools::ExpandListArgument(includePath, this->IncludePath);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
class cmDependsFortranSourceInfo
|
class cmDependsFortranSourceInfo
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// The name of the soruce file.
|
// The name of the source file.
|
||||||
std::string Source;
|
std::string Source;
|
||||||
|
|
||||||
// Set of provided and required modules.
|
// Set of provided and required modules.
|
||||||
|
@ -810,8 +810,8 @@ bool cmDependsFortran::ModulesDiffer(const char* modFile,
|
||||||
* -GNU
|
* -GNU
|
||||||
* -Intel
|
* -Intel
|
||||||
*
|
*
|
||||||
* Eat the stream content until all recompile only realated changes
|
* Eat the stream content until all recompile only related changes
|
||||||
* are left bedind.
|
* are left behind.
|
||||||
*/
|
*/
|
||||||
if (strcmp(compilerId, "GNU") == 0 )
|
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
|
// including the case none was given, this will compare the whole
|
||||||
// content.
|
// content.
|
||||||
if(!cmDependsFortranStreamsDiffer(finModFile, finStampFile))
|
if(!cmDependsFortranStreamsDiffer(finModFile, finStampFile))
|
||||||
|
@ -1209,7 +1209,7 @@ void cmDependsFortranParser_RuleElif(cmDependsFortranParser* parser)
|
||||||
* cmDependsFortranParser_RuleIf(..)
|
* 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
|
// already. If the second condition isn't meet already
|
||||||
// (parser->InPPFalseBranch == 0) correct it.
|
// (parser->InPPFalseBranch == 0) correct it.
|
||||||
if(!parser->SkipToEnd.empty() &&
|
if(!parser->SkipToEnd.empty() &&
|
||||||
|
@ -1228,7 +1228,7 @@ void cmDependsFortranParser_RuleElse(cmDependsFortranParser* parser)
|
||||||
return;
|
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()
|
// parser->SkipToEnd.top()
|
||||||
if(!parser->SkipToEnd.empty() &&
|
if(!parser->SkipToEnd.empty() &&
|
||||||
parser->SkipToEnd.top())
|
parser->SkipToEnd.top())
|
||||||
|
|
|
@ -355,7 +355,9 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
|
||||||
"If this is set to TRUE, then the rpath information "
|
"If this is set to TRUE, then the rpath information "
|
||||||
"is not added to compiled executables. The default "
|
"is not added to compiled executables. The default "
|
||||||
"is to add rpath information if the platform supports it. "
|
"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");
|
"Variables that Provide Information");
|
||||||
cm->DefineProperty
|
cm->DefineProperty
|
||||||
("CMAKE_SOURCE_DIR", cmProperty::VARIABLE,
|
("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,
|
"this package from the cache using the cache editor or cmake -U", false,
|
||||||
"Variables That Change Behavior");
|
"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
|
cm->DefineProperty
|
||||||
("CMAKE_USER_MAKE_RULES_OVERRIDE", cmProperty::VARIABLE,
|
("CMAKE_USER_MAKE_RULES_OVERRIDE", cmProperty::VARIABLE,
|
||||||
"Specify a CMake file that overrides platform information.",
|
"Specify a CMake file that overrides platform information.",
|
||||||
|
@ -895,7 +917,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
|
||||||
|
|
||||||
cm->DefineProperty
|
cm->DefineProperty
|
||||||
("BORLAND", cmProperty::VARIABLE,
|
("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,
|
"This is set to true if the Borland compiler is being used.",false,
|
||||||
"Variables That Describe the System");
|
"Variables That Describe the System");
|
||||||
|
|
||||||
|
@ -1180,6 +1202,20 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
|
||||||
"is always built with no RPATH.",false,
|
"is always built with no RPATH.",false,
|
||||||
"Variables that Control the Build");
|
"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
|
cm->DefineProperty
|
||||||
("CMAKE_EXE_LINKER_FLAGS", cmProperty::VARIABLE,
|
("CMAKE_EXE_LINKER_FLAGS", cmProperty::VARIABLE,
|
||||||
"Linker flags used to create executables.",
|
"Linker flags used to create executables.",
|
||||||
|
@ -1258,6 +1294,22 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
|
||||||
"See that target property for additional information.",
|
"See that target property for additional information.",
|
||||||
false,
|
false,
|
||||||
"Variables that Control the Build");
|
"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
|
// Variables defined when the a language is enabled These variables will
|
||||||
// also be defined whenever CMake has loaded its support for compiling (LANG)
|
// also be defined whenever CMake has loaded its support for compiling (LANG)
|
||||||
|
|
|
@ -40,17 +40,17 @@ public:
|
||||||
/**
|
/**
|
||||||
* This determines if the command is invoked when in script mode.
|
* 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.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Starts the else portion of an if block.";
|
return "Starts the else portion of an if block.";
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" else(expression)\n"
|
" else(expression)\n"
|
||||||
|
|
|
@ -40,17 +40,17 @@ public:
|
||||||
/**
|
/**
|
||||||
* This determines if the command is invoked when in script mode.
|
* 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.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Starts the elseif portion of an if block.";
|
return "Starts the elseif portion of an if block.";
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" elseif(expression)\n"
|
" elseif(expression)\n"
|
||||||
|
|
|
@ -43,12 +43,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Enable a language (CXX/C/Fortran/etc)";
|
return "Enable a language (CXX/C/Fortran/etc)";
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" enable_language(languageName [OPTIONAL] )\n"
|
" enable_language(languageName [OPTIONAL] )\n"
|
||||||
|
|
|
@ -48,12 +48,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Enable testing for current directory and below.";
|
return "Enable testing for current directory and below.";
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" enable_testing()\n"
|
" enable_testing()\n"
|
||||||
|
|
|
@ -47,17 +47,17 @@ public:
|
||||||
/**
|
/**
|
||||||
* This determines if the command is invoked when in script mode.
|
* 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.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Ends a list of commands in a FOREACH block.";
|
return "Ends a list of commands in a FOREACH block.";
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" endforeach(expression)\n"
|
" endforeach(expression)\n"
|
||||||
|
|
|
@ -47,17 +47,17 @@ public:
|
||||||
/**
|
/**
|
||||||
* This determines if the command is invoked when in script mode.
|
* 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.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Ends a list of commands in a function block.";
|
return "Ends a list of commands in a function block.";
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" endfunction(expression)\n"
|
" endfunction(expression)\n"
|
||||||
|
|
|
@ -40,17 +40,17 @@ public:
|
||||||
/**
|
/**
|
||||||
* This determines if the command is invoked when in script mode.
|
* 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.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Ends a list of commands in an if block.";
|
return "Ends a list of commands in an if block.";
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" endif(expression)\n"
|
" endif(expression)\n"
|
||||||
|
|
|
@ -47,17 +47,17 @@ public:
|
||||||
/**
|
/**
|
||||||
* This determines if the command is invoked when in script mode.
|
* 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.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Ends a list of commands in a macro block.";
|
return "Ends a list of commands in a macro block.";
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" endmacro(expression)\n"
|
" endmacro(expression)\n"
|
||||||
|
|
|
@ -12,12 +12,21 @@
|
||||||
#include "cmEndWhileCommand.h"
|
#include "cmEndWhileCommand.h"
|
||||||
|
|
||||||
bool cmEndWhileCommand
|
bool cmEndWhileCommand
|
||||||
::InvokeInitialPass(std::vector<cmListFileArgument> const&,
|
::InvokeInitialPass(std::vector<cmListFileArgument> const& args,
|
||||||
cmExecutionStatus &)
|
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 "
|
this->SetError("An ENDWHILE command was found outside of a proper "
|
||||||
"WHILE ENDWHILE structure. Or its arguments did not "
|
"WHILE ENDWHILE structure. Or its arguments did not "
|
||||||
"match the opening WHILE command.");
|
"match the opening WHILE command.");
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ public:
|
||||||
* Override cmCommand::InvokeInitialPass to get arguments before
|
* Override cmCommand::InvokeInitialPass to get arguments before
|
||||||
* expansion.
|
* expansion.
|
||||||
*/
|
*/
|
||||||
virtual bool InvokeInitialPass(std::vector<cmListFileArgument> const&,
|
virtual bool InvokeInitialPass(std::vector<cmListFileArgument> const& args,
|
||||||
cmExecutionStatus &status);
|
cmExecutionStatus &status);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -47,17 +47,17 @@ public:
|
||||||
/**
|
/**
|
||||||
* This determines if the command is invoked when in script mode.
|
* 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.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Ends a list of commands in a while block.";
|
return "Ends a list of commands in a while block.";
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" endwhile(expression)\n"
|
" endwhile(expression)\n"
|
||||||
|
|
|
@ -42,18 +42,18 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* The name of the command as specified in CMakeList.txt.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetName()
|
virtual const char* GetName() const
|
||||||
{return "exec_program";}
|
{return "exec_program";}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This determines if the command is invoked when in script mode.
|
* This determines if the command is invoked when in script mode.
|
||||||
*/
|
*/
|
||||||
virtual bool IsScriptable() { return true; }
|
virtual bool IsScriptable() const { return true; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Succinct documentation.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
"Deprecated. Use the execute_process() command instead.";
|
"Deprecated. Use the execute_process() command instead.";
|
||||||
|
@ -62,7 +62,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
"Run an executable program during the processing of the CMakeList.txt"
|
"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. */
|
/** This command is kept for compatibility with older CMake versions. */
|
||||||
virtual bool IsDiscouraged()
|
virtual bool IsDiscouraged() const
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,18 +41,18 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* The name of the command as specified in CMakeList.txt.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetName()
|
virtual const char* GetName() const
|
||||||
{return "execute_process";}
|
{return "execute_process";}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This determines if the command is invoked when in script mode.
|
* This determines if the command is invoked when in script mode.
|
||||||
*/
|
*/
|
||||||
virtual bool IsScriptable() { return true; }
|
virtual bool IsScriptable() const { return true; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Succinct documentation.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Execute one or more child processes.";
|
return "Execute one or more child processes.";
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" execute_process(COMMAND <cmd1> [args1...]]\n"
|
" execute_process(COMMAND <cmd1> [args1...]]\n"
|
||||||
|
|
|
@ -124,6 +124,14 @@ bool cmExportCommand
|
||||||
{
|
{
|
||||||
targets.push_back(target);
|
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
|
else
|
||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
|
|
|
@ -45,12 +45,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
"Export targets from the build tree for use by outside projects.";
|
"Export targets from the build tree for use by outside projects.";
|
||||||
|
@ -59,7 +59,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" export(TARGETS [target1 [target2 [...]]] [NAMESPACE <namespace>]\n"
|
" export(TARGETS [target1 [target2 [...]]] [NAMESPACE <namespace>]\n"
|
||||||
|
|
|
@ -48,12 +48,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Deprecated. Use INSTALL(EXPORT) or EXPORT command.";
|
return "Deprecated. Use INSTALL(EXPORT) or EXPORT command.";
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
"This command generates an old-style library dependencies file. "
|
"This command generates an old-style library dependencies file. "
|
||||||
|
@ -83,7 +83,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/** This command is kept for compatibility with older CMake versions. */
|
/** This command is kept for compatibility with older CMake versions. */
|
||||||
virtual bool IsDiscouraged()
|
virtual bool IsDiscouraged() const
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,12 +30,6 @@ cmExprParserHelper::~cmExprParserHelper()
|
||||||
this->CleanupParser();
|
this->CleanupParser();
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmExprParserHelper::SetLineFile(long line, const char* file)
|
|
||||||
{
|
|
||||||
this->FileLine = line;
|
|
||||||
this->FileName = file;
|
|
||||||
}
|
|
||||||
|
|
||||||
int cmExprParserHelper::ParseString(const char* str, int verb)
|
int cmExprParserHelper::ParseString(const char* str, int verb)
|
||||||
{
|
{
|
||||||
if ( !str)
|
if ( !str)
|
||||||
|
|
|
@ -46,8 +46,6 @@ public:
|
||||||
|
|
||||||
int GetResult() { return this->Result; }
|
int GetResult() { return this->Result; }
|
||||||
|
|
||||||
void SetLineFile(long line, const char* file);
|
|
||||||
|
|
||||||
const char* GetError() { return this->ErrorString.c_str(); }
|
const char* GetError() { return this->ErrorString.c_str(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -55,7 +53,6 @@ private:
|
||||||
cmStdString InputBuffer;
|
cmStdString InputBuffer;
|
||||||
std::vector<char> OutputBuffer;
|
std::vector<char> OutputBuffer;
|
||||||
int CurrentLine;
|
int CurrentLine;
|
||||||
int UnionsAvailable;
|
|
||||||
int Verbose;
|
int Verbose;
|
||||||
|
|
||||||
void Print(const char* place, const char* str);
|
void Print(const char* place, const char* str);
|
||||||
|
|
|
@ -392,10 +392,6 @@ void cmExtraCodeBlocksGenerator
|
||||||
make.c_str(), makefile, compiler.c_str());
|
make.c_str(), makefile, compiler.c_str());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
// ignore these:
|
|
||||||
case cmTarget::INSTALL_FILES:
|
|
||||||
case cmTarget::INSTALL_PROGRAMS:
|
|
||||||
case cmTarget::INSTALL_DIRECTORY:
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1049,10 +1049,6 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
// ignore these:
|
|
||||||
case cmTarget::INSTALL_FILES:
|
|
||||||
case cmTarget::INSTALL_PROGRAMS:
|
|
||||||
case cmTarget::INSTALL_DIRECTORY:
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,12 +52,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "Create FLTK user interfaces Wrappers.";
|
return "Create FLTK user interfaces Wrappers.";
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" fltk_wrap_ui(resultingLibraryName source1\n"
|
" fltk_wrap_ui(resultingLibraryName source1\n"
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include "cmFileCommand.h"
|
#include "cmFileCommand.h"
|
||||||
#include "cmake.h"
|
#include "cmake.h"
|
||||||
#include "cmHexFileConverter.h"
|
#include "cmHexFileConverter.h"
|
||||||
|
#include "cmInstallType.h"
|
||||||
#include "cmFileTimeComparison.h"
|
#include "cmFileTimeComparison.h"
|
||||||
#include "cmCryptoHash.h"
|
#include "cmCryptoHash.h"
|
||||||
|
|
||||||
|
@ -1690,7 +1691,7 @@ struct cmFileInstaller: public cmFileCopier
|
||||||
{
|
{
|
||||||
cmFileInstaller(cmFileCommand* command):
|
cmFileInstaller(cmFileCommand* command):
|
||||||
cmFileCopier(command, "INSTALL"),
|
cmFileCopier(command, "INSTALL"),
|
||||||
InstallType(cmTarget::INSTALL_FILES),
|
InstallType(cmInstallType_FILES),
|
||||||
Optional(false),
|
Optional(false),
|
||||||
DestDirLength(0)
|
DestDirLength(0)
|
||||||
{
|
{
|
||||||
|
@ -1711,7 +1712,7 @@ struct cmFileInstaller: public cmFileCopier
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
cmTarget::TargetType InstallType;
|
cmInstallType InstallType;
|
||||||
bool Optional;
|
bool Optional;
|
||||||
int DestDirLength;
|
int DestDirLength;
|
||||||
std::string Rename;
|
std::string Rename;
|
||||||
|
@ -1745,7 +1746,7 @@ protected:
|
||||||
virtual bool Install(const char* fromFile, const char* toFile)
|
virtual bool Install(const char* fromFile, const char* toFile)
|
||||||
{
|
{
|
||||||
// Support installing from empty source to make a directory.
|
// 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());
|
return this->InstallDirectory(fromFile, toFile, MatchProperties());
|
||||||
}
|
}
|
||||||
|
@ -1767,14 +1768,14 @@ protected:
|
||||||
// Add execute permissions based on the target type.
|
// Add execute permissions based on the target type.
|
||||||
switch(this->InstallType)
|
switch(this->InstallType)
|
||||||
{
|
{
|
||||||
case cmTarget::SHARED_LIBRARY:
|
case cmInstallType_SHARED_LIBRARY:
|
||||||
case cmTarget::MODULE_LIBRARY:
|
case cmInstallType_MODULE_LIBRARY:
|
||||||
if(this->Makefile->IsOn("CMAKE_INSTALL_SO_NO_EXE"))
|
if(this->Makefile->IsOn("CMAKE_INSTALL_SO_NO_EXE"))
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case cmTarget::EXECUTABLE:
|
case cmInstallType_EXECUTABLE:
|
||||||
case cmTarget::INSTALL_PROGRAMS:
|
case cmInstallType_PROGRAMS:
|
||||||
this->FilePermissions |= mode_owner_execute;
|
this->FilePermissions |= mode_owner_execute;
|
||||||
this->FilePermissions |= mode_group_execute;
|
this->FilePermissions |= mode_group_execute;
|
||||||
this->FilePermissions |= mode_world_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->Rename.empty())
|
||||||
{
|
{
|
||||||
if(this->InstallType != cmTarget::INSTALL_FILES &&
|
if(this->InstallType != cmInstallType_FILES &&
|
||||||
this->InstallType != cmTarget::INSTALL_PROGRAMS)
|
this->InstallType != cmInstallType_PROGRAMS)
|
||||||
{
|
{
|
||||||
this->FileCommand->SetError("INSTALL option RENAME may be used "
|
this->FileCommand->SetError("INSTALL option RENAME may be used "
|
||||||
"only with FILES or PROGRAMS.");
|
"only with FILES or PROGRAMS.");
|
||||||
|
@ -1936,31 +1937,31 @@ bool cmFileInstaller
|
||||||
{
|
{
|
||||||
if ( stype == "EXECUTABLE" )
|
if ( stype == "EXECUTABLE" )
|
||||||
{
|
{
|
||||||
this->InstallType = cmTarget::EXECUTABLE;
|
this->InstallType = cmInstallType_EXECUTABLE;
|
||||||
}
|
}
|
||||||
else if ( stype == "FILE" )
|
else if ( stype == "FILE" )
|
||||||
{
|
{
|
||||||
this->InstallType = cmTarget::INSTALL_FILES;
|
this->InstallType = cmInstallType_FILES;
|
||||||
}
|
}
|
||||||
else if ( stype == "PROGRAM" )
|
else if ( stype == "PROGRAM" )
|
||||||
{
|
{
|
||||||
this->InstallType = cmTarget::INSTALL_PROGRAMS;
|
this->InstallType = cmInstallType_PROGRAMS;
|
||||||
}
|
}
|
||||||
else if ( stype == "STATIC_LIBRARY" )
|
else if ( stype == "STATIC_LIBRARY" )
|
||||||
{
|
{
|
||||||
this->InstallType = cmTarget::STATIC_LIBRARY;
|
this->InstallType = cmInstallType_STATIC_LIBRARY;
|
||||||
}
|
}
|
||||||
else if ( stype == "SHARED_LIBRARY" )
|
else if ( stype == "SHARED_LIBRARY" )
|
||||||
{
|
{
|
||||||
this->InstallType = cmTarget::SHARED_LIBRARY;
|
this->InstallType = cmInstallType_SHARED_LIBRARY;
|
||||||
}
|
}
|
||||||
else if ( stype == "MODULE" )
|
else if ( stype == "MODULE" )
|
||||||
{
|
{
|
||||||
this->InstallType = cmTarget::MODULE_LIBRARY;
|
this->InstallType = cmInstallType_MODULE_LIBRARY;
|
||||||
}
|
}
|
||||||
else if ( stype == "DIRECTORY" )
|
else if ( stype == "DIRECTORY" )
|
||||||
{
|
{
|
||||||
this->InstallType = cmTarget::INSTALL_DIRECTORY;
|
this->InstallType = cmInstallType_DIRECTORY;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -41,17 +41,17 @@ public:
|
||||||
/**
|
/**
|
||||||
* This determines if the command is invoked when in script mode.
|
* 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.
|
* 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.
|
* Succinct documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetTerseDocumentation()
|
virtual const char* GetTerseDocumentation() const
|
||||||
{
|
{
|
||||||
return "File manipulation command.";
|
return "File manipulation command.";
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* More documentation.
|
* More documentation.
|
||||||
*/
|
*/
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" file(WRITE filename \"message to write\"... )\n"
|
" file(WRITE filename \"message to write\"... )\n"
|
||||||
|
|
|
@ -108,11 +108,11 @@ void cmFindBase::GenerateDocumentation()
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
const char* cmFindBase::GetFullDocumentation()
|
const char* cmFindBase::GetFullDocumentation() const
|
||||||
{
|
{
|
||||||
if(this->GenericDocumentation.empty())
|
if(this->GenericDocumentation.empty())
|
||||||
{
|
{
|
||||||
this->GenerateDocumentation();
|
const_cast<cmFindBase *>(this)->GenerateDocumentation();
|
||||||
}
|
}
|
||||||
return this->GenericDocumentation.c_str();
|
return this->GenericDocumentation.c_str();
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ public:
|
||||||
virtual bool ParseArguments(std::vector<std::string> const& args);
|
virtual bool ParseArguments(std::vector<std::string> const& args);
|
||||||
cmTypeMacro(cmFindBase, cmFindCommon);
|
cmTypeMacro(cmFindBase, cmFindCommon);
|
||||||
|
|
||||||
virtual const char* GetFullDocumentation();
|
virtual const char* GetFullDocumentation() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void GenerateDocumentation();
|
virtual void GenerateDocumentation();
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue