parent
827d08989c
commit
394daad242
@ -0,0 +1,37 @@
|
||||
# - CPack Bundle generator (Mac OS X) specific options
|
||||
#
|
||||
# Installers built on Mac OS X using the Bundle generator use the
|
||||
# aforementioned DragNDrop variables, plus the following Bundle-specific
|
||||
# parameters:
|
||||
#
|
||||
# CPACK_BUNDLE_NAME - The name of the generated bundle. This
|
||||
# appears in the OSX finder as the bundle name. Required.
|
||||
#
|
||||
# CPACK_BUNDLE_PLIST - Path to an OSX plist file that will be used
|
||||
# as the Info.plist for the generated bundle. This assumes that
|
||||
# the caller has generated or specified their own Info.plist file.
|
||||
# Required.
|
||||
#
|
||||
# CPACK_BUNDLE_ICON - Path to an OSX icns file that will be used as
|
||||
# the icon for the generated bundle. This is the icon that appears
|
||||
# in the OSX finder for the bundle, and in the OSX dock when the
|
||||
# bundle is opened. Required.
|
||||
#
|
||||
# CPACK_BUNDLE_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.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2006-2009 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.)
|
||||
|
||||
#Bundle Generator specific code should be put here
|
@ -0,0 +1,456 @@
|
||||
# - Build binary and source package installers
|
||||
#
|
||||
# The CPackComponent module is the module which handles
|
||||
# the component part of CPack. See CPack module for
|
||||
# general information about CPack.
|
||||
#
|
||||
# For certain kinds of binary installers (including the graphical
|
||||
# installers on Mac OS X and Windows), CPack generates installers that
|
||||
# allow users to select individual application components to
|
||||
# install. The contents of each of the components are identified by
|
||||
# the COMPONENT argument of CMake's INSTALL command. These components
|
||||
# can be annotated with user-friendly names and descriptions,
|
||||
# inter-component dependencies, etc., and grouped in various ways to
|
||||
# customize the resulting installer. See the cpack_add_* commands,
|
||||
# described below, for more information about component-specific
|
||||
# installations.
|
||||
#
|
||||
# Component-specific installation allows users to select specific sets
|
||||
# of components to install during the install process. Installation
|
||||
# components are identified by the COMPONENT argument of CMake's
|
||||
# INSTALL commands, and should be further described by the following
|
||||
# CPack commands:
|
||||
#
|
||||
# cpack_add_component - Describes a CPack installation component
|
||||
# named by the COMPONENT argument to a CMake INSTALL command.
|
||||
#
|
||||
# cpack_add_component(compname
|
||||
# [DISPLAY_NAME name]
|
||||
# [DESCRIPTION description]
|
||||
# [HIDDEN | REQUIRED | DISABLED ]
|
||||
# [GROUP group]
|
||||
# [DEPENDS comp1 comp2 ... ]
|
||||
# [INSTALL_TYPES type1 type2 ... ]
|
||||
# [DOWNLOADED]
|
||||
# [ARCHIVE_FILE filename])
|
||||
#
|
||||
# The cmake_add_component command describes an installation
|
||||
# component, which the user can opt to install or remove as part of
|
||||
# the graphical installation process. compname is the name of the
|
||||
# component, as provided to the COMPONENT argument of one or more
|
||||
# CMake INSTALL commands.
|
||||
#
|
||||
# DISPLAY_NAME is the displayed name of the component, used in
|
||||
# graphical installers to display the component name. This value can
|
||||
# be any string.
|
||||
#
|
||||
# DESCRIPTION is an extended description of the component, used in
|
||||
# graphical installers to give the user additional information about
|
||||
# the component. Descriptions can span multiple lines using "\n" as
|
||||
# the line separator. Typically, these descriptions should be no
|
||||
# more than a few lines long.
|
||||
#
|
||||
# HIDDEN indicates that this component will be hidden in the
|
||||
# graphical installer, so that the user cannot directly change
|
||||
# whether it is installed or not.
|
||||
#
|
||||
# REQUIRED indicates that this component is required, and therefore
|
||||
# will always be installed. It will be visible in the graphical
|
||||
# installer, but it cannot be unselected. (Typically, required
|
||||
# components are shown greyed out).
|
||||
#
|
||||
# DISABLED indicates that this component should be disabled
|
||||
# (unselected) by default. The user is free to select this component
|
||||
# for installation, unless it is also HIDDEN.
|
||||
#
|
||||
# DEPENDS lists the components on which this component depends. If
|
||||
# this component is selected, then each of the components listed
|
||||
# must also be selected. The dependency information is encoded
|
||||
# within the installer itself, so that users cannot install
|
||||
# inconsitent sets of components.
|
||||
#
|
||||
# GROUP names the component group of which this component is a
|
||||
# part. If not provided, the component will be a standalone
|
||||
# component, not part of any component group. Component groups are
|
||||
# described with the cpack_add_component_group command, detailed
|
||||
# below.
|
||||
#
|
||||
# INSTALL_TYPES lists the installation types of which this component
|
||||
# is a part. When one of these installations types is selected, this
|
||||
# component will automatically be selected. Installation types are
|
||||
# described with the cpack_add_install_type command, detailed below.
|
||||
#
|
||||
# DOWNLOADED indicates that this component should be downloaded
|
||||
# on-the-fly by the installer, rather than packaged in with the
|
||||
# installer itself. For more information, see the cpack_configure_downloads
|
||||
# command.
|
||||
#
|
||||
# ARCHIVE_FILE provides a name for the archive file created by CPack
|
||||
# to be used for downloaded components. If not supplied, CPack will
|
||||
# create a file with some name based on CPACK_PACKAGE_FILE_NAME and
|
||||
# the name of the component. See cpack_configure_downloads for more
|
||||
# information.
|
||||
#
|
||||
# cpack_add_component_group - Describes a group of related CPack
|
||||
# installation components.
|
||||
#
|
||||
# cpack_add_component_group(groupname
|
||||
# [DISPLAY_NAME name]
|
||||
# [DESCRIPTION description]
|
||||
# [PARENT_GROUP parent]
|
||||
# [EXPANDED]
|
||||
# [BOLD_TITLE])
|
||||
#
|
||||
# The cpack_add_component_group describes a group of installation
|
||||
# components, which will be placed together within the listing of
|
||||
# options. Typically, component groups allow the user to
|
||||
# select/deselect all of the components within a single group via a
|
||||
# single group-level option. Use component groups to reduce the
|
||||
# complexity of installers with many options. groupname is an
|
||||
# arbitrary name used to identify the group in the GROUP argument of
|
||||
# the cpack_add_component command, which is used to place a
|
||||
# component in a group. The name of the group must not conflict with
|
||||
# the name of any component.
|
||||
#
|
||||
# DISPLAY_NAME is the displayed name of the component group, used in
|
||||
# graphical installers to display the component group name. This
|
||||
# value can be any string.
|
||||
#
|
||||
# DESCRIPTION is an extended description of the component group,
|
||||
# used in graphical installers to give the user additional
|
||||
# information about the components within that group. Descriptions
|
||||
# can span multiple lines using "\n" as the line
|
||||
# separator. Typically, these descriptions should be no more than a
|
||||
# few lines long.
|
||||
#
|
||||
# PARENT_GROUP, if supplied, names the parent group of this group.
|
||||
# Parent groups are used to establish a hierarchy of groups,
|
||||
# providing an arbitrary hierarchy of groups.
|
||||
#
|
||||
# EXPANDED indicates that, by default, the group should show up as
|
||||
# "expanded", so that the user immediately sees all of the
|
||||
# components within the group. Otherwise, the group will initially
|
||||
# show up as a single entry.
|
||||
#
|
||||
# BOLD_TITLE indicates that the group title should appear in bold,
|
||||
# to call the user's attention to the group.
|
||||
#
|
||||
# cpack_add_install_type - Add a new installation type containing a
|
||||
# set of predefined component selections to the graphical installer.
|
||||
#
|
||||
# cpack_add_install_type(typename
|
||||
# [DISPLAY_NAME name])
|
||||
#
|
||||
# The cpack_add_install_type command identifies a set of preselected
|
||||
# components that represents a common use case for an
|
||||
# application. For example, a "Developer" install type might include
|
||||
# an application along with its header and library files, while an
|
||||
# "End user" install type might just include the application's
|
||||
# executable. Each component identifies itself with one or more
|
||||
# install types via the INSTALL_TYPES argument to
|
||||
# cpack_add_component.
|
||||
#
|
||||
# DISPLAY_NAME is the displayed name of the install type, which will
|
||||
# typically show up in a drop-down box within a graphical
|
||||
# installer. This value can be any string.
|
||||
#
|
||||
# cpack_configure_downloads - Configure CPack to download selected
|
||||
# components on-the-fly as part of the installation process.
|
||||
#
|
||||
# cpack_configure_downloads(site
|
||||
# [UPLOAD_DIRECTORY dirname]
|
||||
# [ALL]
|
||||
# [ADD_REMOVE|NO_ADD_REMOVE])
|
||||
#
|
||||
# The cpack_configure_downloads command configures installation-time
|
||||
# downloads of selected components. For each downloadable component,
|
||||
# CPack will create an archive containing the contents of that
|
||||
# component, which should be uploaded to the given site. When the
|
||||
# user selects that component for installation, the installer will
|
||||
# download and extract the component in place. This feature is
|
||||
# useful for creating small installers that only download the
|
||||
# requested components, saving bandwidth. Additionally, the
|
||||
# installers are small enough that they will be installed as part of
|
||||
# the normal installation process, and the "Change" button in
|
||||
# Windows Add/Remove Programs control panel will allow one to add or
|
||||
# remove parts of the application after the original
|
||||
# installation. On Windows, the downloaded-components functionality
|
||||
# requires the ZipDLL plug-in for NSIS, available at:
|
||||
#
|
||||
# http://nsis.sourceforge.net/ZipDLL_plug-in
|
||||
#
|
||||
# On Mac OS X, installers that download components on-the-fly can
|
||||
# only be built and installed on system using Mac OS X 10.5 or
|
||||
# later.
|
||||
#
|
||||
# The site argument is a URL where the archives for downloadable
|
||||
# components will reside, e.g., http://www.cmake.org/files/2.6.1/installer/
|
||||
# All of the archives produced by CPack should be uploaded to that location.
|
||||
#
|
||||
# UPLOAD_DIRECTORY is the local directory where CPack will create the
|
||||
# various archives for each of the components. The contents of this
|
||||
# directory should be uploaded to a location accessible by the URL given
|
||||
# in the site argument. If omitted, CPack will use the directory
|
||||
# CPackUploads inside the CMake binary directory to store the generated
|
||||
# archives.
|
||||
#
|
||||
# The ALL flag indicates that all components be downloaded. Otherwise, only
|
||||
# those components explicitly marked as DOWNLOADED or that have a specified
|
||||
# ARCHIVE_FILE will be downloaded. Additionally, the ALL option implies
|
||||
# ADD_REMOVE (unless NO_ADD_REMOVE is specified).
|
||||
#
|
||||
# ADD_REMOVE indicates that CPack should install a copy of the installer
|
||||
# that can be called from Windows' Add/Remove Programs dialog (via the
|
||||
# "Modify" button) to change the set of installed components. NO_ADD_REMOVE
|
||||
# turns off this behavior. This option is ignored on Mac OS X.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2006-2009 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.)
|
||||
|
||||
# Define var in order to avoid multiple inclusion
|
||||
IF(NOT CPackComponent_CMake_INCLUDED)
|
||||
SET(CPackComponent_CMake_INCLUDED 1)
|
||||
|
||||
# Argument-parsing macro from http://www.cmake.org/Wiki/CMakeMacroParseArguments
|
||||
MACRO(cpack_parse_arguments prefix arg_names option_names)
|
||||
SET(${prefix}_DEFAULT_ARGS)
|
||||
FOREACH(arg_name ${arg_names})
|
||||
SET(${prefix}_${arg_name})
|
||||
ENDFOREACH(arg_name)
|
||||
FOREACH(option ${option_names})
|
||||
SET(${prefix}_${option} FALSE)
|
||||
ENDFOREACH(option)
|
||||
|
||||
SET(current_arg_name DEFAULT_ARGS)
|
||||
SET(current_arg_list)
|
||||
FOREACH(arg ${ARGN})
|
||||
SET(larg_names ${arg_names})
|
||||
LIST(FIND larg_names "${arg}" is_arg_name)
|
||||
IF (is_arg_name GREATER -1)
|
||||
SET(${prefix}_${current_arg_name} ${current_arg_list})
|
||||
SET(current_arg_name ${arg})
|
||||
SET(current_arg_list)
|
||||
ELSE (is_arg_name GREATER -1)
|
||||
SET(loption_names ${option_names})
|
||||
LIST(FIND loption_names "${arg}" is_option)
|
||||
IF (is_option GREATER -1)
|
||||
SET(${prefix}_${arg} TRUE)
|
||||
ELSE (is_option GREATER -1)
|
||||
SET(current_arg_list ${current_arg_list} ${arg})
|
||||
ENDIF (is_option GREATER -1)
|
||||
ENDIF (is_arg_name GREATER -1)
|
||||
ENDFOREACH(arg)
|
||||
SET(${prefix}_${current_arg_name} ${current_arg_list})
|
||||
ENDMACRO(cpack_parse_arguments)
|
||||
|
||||
# Macro that appends a SET command for the given variable name (var)
|
||||
# to the macro named strvar, but only if the variable named "var"
|
||||
# has been defined. The string will eventually be appended to a CPack
|
||||
# configuration file.
|
||||
MACRO(cpack_append_variable_set_command var strvar)
|
||||
IF (DEFINED ${var})
|
||||
SET(${strvar} "${${strvar}}SET(${var}")
|
||||
FOREACH(APPENDVAL ${${var}})
|
||||
SET(${strvar} "${${strvar}} ${APPENDVAL}")
|
||||
ENDFOREACH(APPENDVAL)
|
||||
SET(${strvar} "${${strvar}})\n")
|
||||
ENDIF (DEFINED ${var})
|
||||
ENDMACRO(cpack_append_variable_set_command)
|
||||
|
||||
# Macro that appends a SET command for the given variable name (var)
|
||||
# to the macro named strvar, but only if the variable named "var"
|
||||
# has been defined and is a string. The string will eventually be
|
||||
# appended to a CPack configuration file.
|
||||
MACRO(cpack_append_string_variable_set_command var strvar)
|
||||
IF (DEFINED ${var})
|
||||
LIST(LENGTH ${var} CPACK_APP_VALUE_LEN)
|
||||
IF(${CPACK_APP_VALUE_LEN} EQUAL 1)
|
||||
SET(${strvar} "${${strvar}}SET(${var} \"${${var}}\")\n")
|
||||
ENDIF(${CPACK_APP_VALUE_LEN} EQUAL 1)
|
||||
ENDIF (DEFINED ${var})
|
||||
ENDMACRO(cpack_append_string_variable_set_command)
|
||||
|
||||
# Macro that appends a SET command for the given variable name (var)
|
||||
# to the macro named strvar, but only if the variable named "var"
|
||||
# has been set to true. The string will eventually be
|
||||
# appended to a CPack configuration file.
|
||||
MACRO(cpack_append_option_set_command var strvar)
|
||||
IF (${var})
|
||||
LIST(LENGTH ${var} CPACK_APP_VALUE_LEN)
|
||||
IF(${CPACK_APP_VALUE_LEN} EQUAL 1)
|
||||
SET(${strvar} "${${strvar}}SET(${var} TRUE)\n")
|
||||
ENDIF(${CPACK_APP_VALUE_LEN} EQUAL 1)
|
||||
ENDIF (${var})
|
||||
ENDMACRO(cpack_append_option_set_command)
|
||||
|
||||
# Macro that adds a component to the CPack installer
|
||||
MACRO(cpack_add_component compname)
|
||||
STRING(TOUPPER ${compname} CPACK_ADDCOMP_UNAME)
|
||||
cpack_parse_arguments(CPACK_COMPONENT_${CPACK_ADDCOMP_UNAME}
|
||||
"DISPLAY_NAME;DESCRIPTION;GROUP;DEPENDS;INSTALL_TYPES;ARCHIVE_FILE"
|
||||
"HIDDEN;REQUIRED;DISABLED;DOWNLOADED"
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
if (CPACK_COMPONENT_${CPACK_ADDCOMP_UNAME}_DOWNLOADED)
|
||||
SET(CPACK_ADDCOMP_STR "\n# Configuration for downloaded component \"${compname}\"\n")
|
||||
else ()
|
||||
SET(CPACK_ADDCOMP_STR "\n# Configuration for component \"${compname}\"\n")
|
||||
endif ()
|
||||
|
||||
IF(NOT CPACK_MONOLITHIC_INSTALL)
|
||||
# If the user didn't set CPACK_COMPONENTS_ALL explicitly, update the
|
||||
# value of CPACK_COMPONENTS_ALL in the configuration file. This will
|
||||
# take care of any components that have been added after the CPack
|
||||
# moduled was included.
|
||||
IF(NOT CPACK_COMPONENTS_ALL_SET_BY_USER)
|
||||
GET_CMAKE_PROPERTY(CPACK_ADDCOMP_COMPONENTS COMPONENTS)
|
||||
SET(CPACK_ADDCOMP_STR "${CPACK_ADDCOMP_STR}\nSET(CPACK_COMPONENTS_ALL")
|
||||
FOREACH(COMP ${CPACK_ADDCOMP_COMPONENTS})
|
||||
SET(CPACK_ADDCOMP_STR "${CPACK_ADDCOMP_STR} ${COMP}")
|
||||
ENDFOREACH(COMP)
|
||||
SET(CPACK_ADDCOMP_STR "${CPACK_ADDCOMP_STR})\n")
|
||||
ENDIF(NOT CPACK_COMPONENTS_ALL_SET_BY_USER)
|
||||
ENDIF(NOT CPACK_MONOLITHIC_INSTALL)
|
||||
|
||||
cpack_append_string_variable_set_command(
|
||||
CPACK_COMPONENT_${CPACK_ADDCOMP_UNAME}_DISPLAY_NAME
|
||||
CPACK_ADDCOMP_STR)
|
||||
cpack_append_string_variable_set_command(
|
||||
CPACK_COMPONENT_${CPACK_ADDCOMP_UNAME}_DESCRIPTION
|
||||
CPACK_ADDCOMP_STR)
|
||||
cpack_append_variable_set_command(
|
||||
CPACK_COMPONENT_${CPACK_ADDCOMP_UNAME}_GROUP
|
||||
CPACK_ADDCOMP_STR)
|
||||
cpack_append_variable_set_command(
|
||||
CPACK_COMPONENT_${CPACK_ADDCOMP_UNAME}_DEPENDS
|
||||
CPACK_ADDCOMP_STR)
|
||||
cpack_append_variable_set_command(
|
||||
CPACK_COMPONENT_${CPACK_ADDCOMP_UNAME}_INSTALL_TYPES
|
||||
CPACK_ADDCOMP_STR)
|
||||
cpack_append_string_variable_set_command(
|
||||
CPACK_COMPONENT_${CPACK_ADDCOMP_UNAME}_ARCHIVE_FILE
|
||||
CPACK_ADDCOMP_STR)
|
||||
cpack_append_option_set_command(
|
||||
CPACK_COMPONENT_${CPACK_ADDCOMP_UNAME}_HIDDEN
|
||||
CPACK_ADDCOMP_STR)
|
||||
cpack_append_option_set_command(
|
||||
CPACK_COMPONENT_${CPACK_ADDCOMP_UNAME}_REQUIRED
|
||||
CPACK_ADDCOMP_STR)
|
||||
cpack_append_option_set_command(
|
||||
CPACK_COMPONENT_${CPACK_ADDCOMP_UNAME}_DISABLED
|
||||
CPACK_ADDCOMP_STR)
|
||||
cpack_append_option_set_command(
|
||||
CPACK_COMPONENT_${CPACK_ADDCOMP_UNAME}_DOWNLOADED
|
||||
CPACK_ADDCOMP_STR)
|
||||
# Backward compatibility issue.
|
||||
# Write to config iff the macros is used after CPack.cmake has been
|
||||
# included, other it's not necessary because the variables
|
||||
# will be encoded by cpack_encode_variables.
|
||||
IF(CPack_CMake_INCLUDED)
|
||||
FILE(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${CPACK_ADDCOMP_STR}")
|
||||
ENDIF(CPack_CMake_INCLUDED)
|
||||
ENDMACRO(cpack_add_component)
|
||||
|
||||
# Macro that adds a component group to the CPack installer
|
||||
MACRO(cpack_add_component_group grpname)
|
||||
STRING(TOUPPER ${grpname} CPACK_ADDGRP_UNAME)
|
||||
cpack_parse_arguments(CPACK_COMPONENT_GROUP_${CPACK_ADDGRP_UNAME}
|
||||
"DISPLAY_NAME;DESCRIPTION"
|
||||
"EXPANDED;BOLD_TITLE"
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
SET(CPACK_ADDGRP_STR "\n# Configuration for component group \"${grpname}\"\n")
|
||||
cpack_append_string_variable_set_command(
|
||||
CPACK_COMPONENT_GROUP_${CPACK_ADDGRP_UNAME}_DISPLAY_NAME
|
||||
CPACK_ADDGRP_STR)
|
||||
cpack_append_string_variable_set_command(
|
||||
CPACK_COMPONENT_GROUP_${CPACK_ADDGRP_UNAME}_DESCRIPTION
|
||||
CPACK_ADDGRP_STR)
|
||||
cpack_append_option_set_command(
|
||||
CPACK_COMPONENT_GROUP_${CPACK_ADDGRP_UNAME}_EXPANDED
|
||||
CPACK_ADDGRP_STR)
|
||||
cpack_append_option_set_command(
|
||||
CPACK_COMPONENT_GROUP_${CPACK_ADDGRP_UNAME}_BOLD_TITLE
|
||||
CPACK_ADDGRP_STR)
|
||||
# Backward compatibility issue.
|
||||
# Write to config iff the macros is used after CPack.cmake has been
|
||||
# included, other it's not necessary because the variables
|
||||
# will be encoded by cpack_encode_variables.
|
||||
IF(CPack_CMake_INCLUDED)
|
||||
FILE(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${CPACK_ADDGRP_STR}")
|
||||
ENDIF(CPack_CMake_INCLUDED)
|
||||
ENDMACRO(cpack_add_component_group)
|
||||
|
||||
# Macro that adds an installation type to the CPack installer
|
||||
MACRO(cpack_add_install_type insttype)
|
||||
STRING(TOUPPER ${insttype} CPACK_INSTTYPE_UNAME)
|
||||
cpack_parse_arguments(CPACK_INSTALL_TYPE_${CPACK_INSTTYPE_UNAME}
|
||||
"DISPLAY_NAME"
|
||||
""
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
SET(CPACK_INSTTYPE_STR
|
||||
"\n# Configuration for installation type \"${insttype}\"\n")
|
||||
SET(CPACK_INSTTYPE_STR
|
||||
"${CPACK_INSTTYPE_STR}LIST(APPEND CPACK_ALL_INSTALL_TYPES ${insttype})\n")
|
||||
cpack_append_string_variable_set_command(
|
||||
CPACK_INSTALL_TYPE_${CPACK_INSTTYPE_UNAME}_DISPLAY_NAME
|
||||
CPACK_INSTTYPE_STR)
|
||||
# Backward compatibility issue.
|
||||
# Write to config iff the macros is used after CPack.cmake has been
|
||||
# included, other it's not necessary because the variables
|
||||
# will be encoded by cpack_encode_variables.
|
||||
IF(CPack_CMake_INCLUDED)
|
||||
FILE(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${CPACK_INSTTYPE_STR}")
|
||||
ENDIF(CPack_CMake_INCLUDED)
|
||||
ENDMACRO(cpack_add_install_type)
|
||||
|
||||
MACRO(cpack_configure_downloads site)
|
||||
cpack_parse_arguments(CPACK_DOWNLOAD
|
||||
"UPLOAD_DIRECTORY"
|
||||
"ALL;ADD_REMOVE;NO_ADD_REMOVE"
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
SET(CPACK_CONFIG_DL_STR
|
||||
"\n# Downloaded components configuration\n")
|
||||
SET(CPACK_UPLOAD_DIRECTORY ${CPACK_DOWNLOAD_UPLOAD_DIRECTORY})
|
||||
SET(CPACK_DOWNLOAD_SITE ${site})
|
||||
cpack_append_string_variable_set_command(
|
||||
CPACK_DOWNLOAD_SITE
|
||||
CPACK_CONFIG_DL_STR)
|
||||
cpack_append_string_variable_set_command(
|
||||
CPACK_UPLOAD_DIRECTORY
|
||||
CPACK_CONFIG_DL_STR)
|
||||
cpack_append_option_set_command(
|
||||
CPACK_DOWNLOAD_ALL
|
||||
CPACK_CONFIG_DL_STR)
|
||||
IF (${CPACK_DOWNLOAD_ALL} AND NOT ${CPACK_DOWNLOAD_NO_ADD_REMOVE})
|
||||
SET(CPACK_DOWNLOAD_ADD_REMOVE ON)
|
||||
ENDIF (${CPACK_DOWNLOAD_ALL} AND NOT ${CPACK_DOWNLOAD_NO_ADD_REMOVE})
|
||||
SET(CPACK_ADD_REMOVE ${CPACK_DOWNLOAD_ADD_REMOVE})
|
||||
cpack_append_option_set_command(
|
||||
CPACK_ADD_REMOVE
|
||||
CPACK_CONFIG_DL_STR)
|
||||
# Backward compatibility issue.
|
||||
# Write to config iff the macros is used after CPack.cmake has been
|
||||
# included, other it's not necessary because the variables
|
||||
# will be encoded by cpack_encode_variables.
|
||||
IF(CPack_CMake_INCLUDED)
|
||||
FILE(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${CPACK_CONFIG_DL_STR}")
|
||||
ENDIF(CPack_CMake_INCLUDED)
|
||||
ENDMACRO(cpack_configure_downloads)
|
||||
ENDIF(NOT CPackComponent_CMake_INCLUDED)
|
@ -0,0 +1,83 @@
|
||||
# - CPack NSIS generator specific options
|
||||
#
|
||||
# The following variables are specific to the graphical installers built
|
||||
# on Windows using the Nullsoft Installation System.
|
||||
#
|
||||
# CPACK_PACKAGE_INSTALL_REGISTRY_KEY - Registry key used when
|
||||
# installing this project.
|
||||
#
|
||||
# CPACK_NSIS_INSTALL_ROOT - The default installation directory presented
|
||||
# to the end user by the NSIS installer is under this root dir. The full
|
||||
# directory presented to the end user is:
|
||||
# ${CPACK_NSIS_INSTALL_ROOT}/${CPACK_PACKAGE_INSTALL_DIRECTORY}
|
||||
#
|
||||
# CPACK_NSIS_MUI_ICON - The icon file (.ico) for the generated
|
||||
# install program.
|
||||
#
|
||||
# CPACK_NSIS_MUI_UNIICON - The icon file (.ico) for the generated
|
||||
# uninstall program.
|
||||
#
|
||||
# CPACK_PACKAGE_ICON - A branding image that will be displayed inside
|
||||
# the installer.
|
||||
#
|
||||
# CPACK_NSIS_EXTRA_INSTALL_COMMANDS - Extra NSIS commands that will
|
||||
# be added to the install Section.
|
||||
#
|
||||
# CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS - Extra NSIS commands that will
|
||||
# be added to the uninstall Section.
|
||||
#
|
||||
# CPACK_NSIS_COMPRESSOR - The arguments that will be passed to the
|
||||
# NSIS SetCompressor command.
|
||||
#
|
||||
# CPACK_NSIS_MODIFY_PATH - If this is set to "ON", then an extra page
|
||||
# will appear in the installer that will allow the user to choose
|
||||
# whether the program directory should be added to the system PATH
|
||||
# variable.
|
||||
#
|
||||
# CPACK_NSIS_DISPLAY_NAME - The display name string that appears in
|
||||
# the Windows Add/Remove Program control panel
|
||||
#
|
||||
# CPACK_NSIS_PACKAGE_NAME - The title displayed at the top of the
|
||||
# installer.
|
||||
#
|
||||
# CPACK_NSIS_INSTALLED_ICON_NAME - A path to the executable that
|
||||
# contains the installer icon.
|
||||
#
|
||||
# CPACK_NSIS_HELP_LINK - URL to a web site providing assistance in
|
||||
# installing your application.
|
||||
#
|
||||
# CPACK_NSIS_URL_INFO_ABOUT - URL to a web site providing more
|
||||
# information about your application.
|
||||
#
|
||||
# CPACK_NSIS_CONTACT - Contact information for questions and comments
|
||||
# about the installation process.
|
||||
#
|
||||
# CPACK_NSIS_CREATE_ICONS_EXTRA - Additional NSIS commands for
|
||||
# creating start menu shortcuts.
|
||||
#
|
||||
# CPACK_NSIS_DELETE_ICONS_EXTRA -Additional NSIS commands to
|
||||
# uninstall start menu shortcuts.
|
||||
#
|
||||
# CPACK_NSIS_EXECUTABLES_DIRECTORY - Creating NSIS start menu links
|
||||
# assumes that they are in 'bin' unless this variable is set.
|
||||
# For example, you would set this to 'exec' if your executables are
|
||||
# in an exec directory.
|
||||
#
|
||||
# CPACK_NSIS_MUI_FINISHPAGE_RUN - Specify an executable to add an option
|
||||
# to run on the finish page of the NSIS installer.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2006-2009 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.)
|
||||
|
||||
#FIXME we should put NSIS specific code here
|
||||
#FIXME but I'm not doing it because I'm not able to test it...
|
@ -0,0 +1,29 @@
|
||||
@CHECK_PROTOTYPE_DEFINITION_HEADER@
|
||||
|
||||
static void cmakeRequireSymbol(int dummy, ...) {
|
||||
(void) dummy;
|
||||
}
|
||||
|
||||
static void checkSymbol(void) {
|
||||
#ifndef @CHECK_PROTOTYPE_DEFINITION_SYMBOL@
|
||||
cmakeRequireSymbol(0, &@CHECK_PROTOTYPE_DEFINITION_SYMBOL@);
|
||||
#endif
|
||||
}
|
||||
|
||||
@CHECK_PROTOTYPE_DEFINITION_PROTO@ {
|
||||
return @CHECK_PROTOTYPE_DEFINITION_RETURN@;
|
||||
}
|
||||
|
||||
#ifdef __CLASSIC_C__
|
||||
int main() {
|
||||
int ac;
|
||||
char*av[];
|
||||
#else
|
||||
int main(int ac, char *av[]) {
|
||||
#endif
|
||||
checkSymbol();
|
||||
if (ac > 1000) {
|
||||
return *av[0];
|
||||
}
|
||||
return 0;
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
# - Check if the protoype we expect is correct.
|
||||
# check_prototype_definition(FUNCTION PROTOTYPE RETURN HEADER VARIABLE)
|
||||
# FUNCTION - The name of the function (used to check if prototype exists)
|
||||
# PROTOTYPE- The prototype to check.
|
||||
# RETURN - The return value of the function.
|
||||
# HEADER - The header files required.
|
||||
# VARIABLE - The variable to store the result.
|
||||
# Example:
|
||||
# check_prototype_definition(getpwent_r
|
||||
# "struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)"
|
||||
# "NULL"
|
||||
# "unistd.h;pwd.h"
|
||||
# SOLARIS_GETPWENT_R)
|
||||
# The following variables may be set before calling this macro to
|
||||
# modify the way the check is run:
|
||||
#
|
||||
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
|
||||
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
|
||||
# CMAKE_REQUIRED_INCLUDES = list of include directories
|
||||
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2005-2009 Kitware, Inc.
|
||||
# Copyright 2010-2011 Andreas Schneider <asn@cryptomilk.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.)
|
||||
#
|
||||
|
||||
get_filename_component(__check_proto_def_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
|
||||
function(CHECK_PROTOTYPE_DEFINITION _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIABLE)
|
||||
|
||||
if ("${_VARIABLE}" MATCHES "^${_VARIABLE}$")
|
||||
set(CHECK_PROTOTYPE_DEFINITION_CONTENT "/* */\n")
|
||||
|
||||
set(CHECK_PROTOTYPE_DEFINITION_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
||||
if (CMAKE_REQUIRED_LIBRARIES)
|
||||
set(CHECK_PROTOTYPE_DEFINITION_LIBS
|
||||
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
||||
else(CMAKE_REQUIRED_LIBRARIES)
|
||||
set(CHECK_PROTOTYPE_DEFINITION_LIBS)
|
||||
endif(CMAKE_REQUIRED_LIBRARIES)
|
||||
if (CMAKE_REQUIRED_INCLUDES)
|
||||
set(CMAKE_SYMBOL_EXISTS_INCLUDES
|
||||
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
|
||||
else(CMAKE_REQUIRED_INCLUDES)
|
||||
set(CMAKE_SYMBOL_EXISTS_INCLUDES)
|
||||
endif(CMAKE_REQUIRED_INCLUDES)
|
||||
|
||||
foreach(_FILE ${_HEADER})
|
||||
set(CHECK_PROTOTYPE_DEFINITION_HEADER
|
||||
"${CHECK_PROTOTYPE_DEFINITION_HEADER}#include <${_FILE}>\n")
|
||||
endforeach(_FILE)
|
||||
|
||||
set(CHECK_PROTOTYPE_DEFINITION_SYMBOL ${_FUNCTION})
|
||||
set(CHECK_PROTOTYPE_DEFINITION_PROTO ${_PROTOTYPE})
|
||||
set(CHECK_PROTOTYPE_DEFINITION_RETURN ${_RETURN})
|
||||
|
||||
configure_file("${__check_proto_def_dir}/CheckPrototypeDefinition.c.in"
|
||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c" @ONLY)
|
||||
|
||||
file(READ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c _SOURCE)
|
||||
|
||||
try_compile(${_VARIABLE}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c
|
||||
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
||||
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CHECK_PROTOTYPE_DEFINITION_FLAGS}
|
||||
"${CHECK_PROTOTYPE_DEFINITION_LIBS}"
|
||||
"${CMAKE_SYMBOL_EXISTS_INCLUDES}"
|
||||
OUTPUT_VARIABLE OUTPUT)
|
||||
|
||||
if (${_VARIABLE})
|
||||
set(${_VARIABLE} 1 CACHE INTERNAL "Have correct prototype for ${_FUNCTION}")
|
||||
message(STATUS "Checking prototype ${_FUNCTION} for ${_VARIABLE} - True")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Determining if the prototype ${_FUNCTION} exists for ${_VARIABLE} passed with the following output:\n"
|
||||
"${OUTPUT}\n\n")
|
||||
else (${_VARIABLE})
|
||||
message(STATUS "Checking prototype ${_FUNCTION} for ${_VARIABLE} - False")
|
||||
set(${_VARIABLE} 0 CACHE INTERNAL "Have correct prototype for ${_FUNCTION}")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||
"Determining if the prototype ${_FUNCTION} exists for ${_VARIABLE} failed with the following output:\n"
|
||||
"${OUTPUT}\n\n${_SOURCE}\n\n")
|
||||
endif (${_VARIABLE})
|
||||
endif("${_VARIABLE}" MATCHES "^${_VARIABLE}$")
|
||||
|
||||
endfunction(CHECK_PROTOTYPE_DEFINITION)
|
@ -0,0 +1,8 @@
|
||||
SET(CMAKE_Fortran_FLAGS_INIT "")
|
||||
SET(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g")
|
||||
SET(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "")
|
||||
SET(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3")
|
||||
SET(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
|
||||
SET(CMAKE_Fortran_MODDIR_FLAG "-YMOD_OUT_DIR=")
|
||||
SET(CMAKE_Fortran_MODPATH_FLAG "-p")
|
||||
SET(CMAKE_Fortran_VERBOSE_FLAG "-v")
|
@ -0,0 +1,6 @@
|
||||
# This file is loaded when gcc/g++ is used for assembler files (the "ASM" cmake language)
|
||||
include(Compiler/GNU)
|
||||
|
||||
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;S;asm)
|
||||
|
||||
__compiler_gnu(ASM)
|
@ -0,0 +1,3 @@
|
||||
SET(CMAKE_ASM_VERBOSE_FLAG "-v")
|
||||
|
||||
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s )
|
@ -1 +1,4 @@
|
||||
SET(CMAKE_C_VERBOSE_FLAG "-v")
|
||||
|
||||
SET(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
|
||||
SET(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
||||
|
@ -1 +1,4 @@
|
||||
SET(CMAKE_CXX_VERBOSE_FLAG "-v")
|
||||
|
||||
SET(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
|
||||
SET(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
||||
|
@ -0,0 +1,13 @@
|
||||
SET(CMAKE_ASM_VERBOSE_FLAG "-v")
|
||||
|
||||
SET(CMAKE_ASM_FLAGS_INIT "")
|
||||
SET(CMAKE_ASM_FLAGS_DEBUG_INIT "-g")
|
||||
SET(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
|
||||
SET(CMAKE_ASM_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
|
||||
SET(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
|
||||
|
||||
IF(UNIX)
|
||||
SET(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;S)
|
||||
ELSE(UNIX)
|
||||
SET(CMAKE_ASM_SOURCE_FILE_EXTENSIONS asm)
|
||||
ENDIF(UNIX)
|
@ -0,0 +1,24 @@
|
||||
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s )
|
||||
|
||||
SET(CMAKE_ASM_VERBOSE_FLAG "-#")
|
||||
|
||||
SET(CMAKE_SHARED_LIBRARY_ASM_FLAGS "-KPIC")
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_ASM_FLAGS "-G")
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_ASM_FLAG "-R")
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_ASM_FLAG_SEP ":")
|
||||
SET(CMAKE_SHARED_LIBRARY_SONAME_ASM_FLAG "-h")
|
||||
|
||||
SET(CMAKE_ASM_FLAGS_INIT "")
|
||||
SET(CMAKE_ASM_FLAGS_DEBUG_INIT "-g")
|
||||
SET(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG")
|
||||
SET(CMAKE_ASM_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG")
|
||||
SET(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-g -xO2")
|
||||
|
||||
# Initialize ASM link type selection flags. These flags are used when
|
||||
# building a shared library, shared module, or executable that links
|
||||
# to other libraries to select whether to use the static or shared
|
||||
# versions of the libraries.
|
||||
FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
|
||||
SET(CMAKE_${type}_LINK_STATIC_ASM_FLAGS "-Bstatic")
|
||||
SET(CMAKE_${type}_LINK_DYNAMIC_ASM_FLAGS "-Bdynamic")
|
||||
ENDFOREACH(type)
|
@ -0,0 +1,13 @@
|
||||
SET(CMAKE_ASM_VERBOSE_FLAG "-V")
|
||||
|
||||
# -qthreaded = Ensures that all optimizations will be thread-safe
|
||||
# -qalias=noansi = Turns off type-based aliasing completely (safer optimizer)
|
||||
# -qhalt=e = Halt on error messages (rather than just severe errors)
|
||||
SET(CMAKE_ASM_FLAGS_INIT "-qthreaded -qalias=noansi -qhalt=e -qsourcetype=assembler")
|
||||
|
||||
SET(CMAKE_ASM_FLAGS_DEBUG_INIT "-g")
|
||||
SET(CMAKE_ASM_FLAGS_RELEASE_INIT "-O -DNDEBUG")
|
||||
SET(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-O -DNDEBUG")
|
||||
SET(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-g")
|
||||
|
||||
SET(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s )
|
@ -1,8 +1,14 @@
|
||||
SET(CMAKE_Fortran_VERBOSE_FLAG "-V")
|
||||
include(Compiler/XL)
|
||||
__compiler_xl(Fortran)
|
||||
|
||||
SET(CMAKE_Fortran_MODDIR_FLAG "-qmoddir=")
|
||||
|
||||
SET(CMAKE_Fortran_DEFINE_FLAG "-WF,-D")
|
||||
|
||||
SET(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g")
|
||||
SET(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O")
|
||||
SET(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-O")
|
||||
SET(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-g")
|
||||
# -qthreaded = Ensures that all optimizations will be thread-safe
|
||||
# -qhalt=e = Halt on error messages (rather than just severe errors)
|
||||
SET(CMAKE_Fortran_FLAGS_INIT "-qthreaded -qhalt=e")
|
||||
|
||||
# We require updates to CMake C++ code to support preprocessing rules for Fortran.
|
||||
SET(CMAKE_Fortran_CREATE_PREPROCESSED_SOURCE)
|
||||
SET(CMAKE_Fortran_CREATE_ASSEMBLY_SOURCE)
|
||||
|
@ -0,0 +1,48 @@
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2002-2011 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.)
|
||||
|
||||
# This module is shared by multiple languages; use include blocker.
|
||||
if(__COMPILER_XL)
|
||||
return()
|
||||
endif()
|
||||
set(__COMPILER_XL 1)
|
||||
|
||||
# Find the CreateExportList program that comes with this toolchain.
|
||||
find_program(CMAKE_XL_CreateExportList
|
||||
NAMES CreateExportList
|
||||
DOC "IBM XL CreateExportList tool"
|
||||
)
|
||||
|
||||
macro(__compiler_xl lang)
|
||||
# Feature flags.
|
||||
set(CMAKE_${lang}_VERBOSE_FLAG "-V")
|
||||
|
||||
set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g")
|
||||
set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O")
|
||||
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-O")
|
||||
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-g")
|
||||
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
||||
set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
|
||||
|
||||
# The compiler front-end passes all object files, archive files, and shared
|
||||
# library files named on the command line to CreateExportList to create a
|
||||
# list of all symbols to be exported from the shared library. This causes
|
||||
# all archive members to be copied into the shared library whether they are
|
||||
# needed or not. Instead we run the tool ourselves to pass only the object
|
||||
# files so that we export only the symbols actually provided by the sources.
|
||||
set(CMAKE_${lang}_CREATE_SHARED_LIBRARY
|
||||
"${CMAKE_XL_CreateExportList} <OBJECT_DIR>/objects.exp <OBJECTS>"
|
||||
"<CMAKE_${lang}_COMPILER> <CMAKE_SHARED_LIBRARY_${lang}_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS> -Wl,-bE:<OBJECT_DIR>/objects.exp <CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>"
|
||||
)
|
||||
endmacro()
|
@ -0,0 +1,100 @@
|
||||
# - Find Armadillo
|
||||
# Find the Armadillo C++ library
|
||||
#
|
||||
#
|
||||
# == Using Armadillo: ==
|
||||
# find_package(Armadillo RECQUIRED)
|
||||
# include_directories(${ARMADILLO_INCLUDE_DIRS})
|
||||
# add_executable(foo foo.cc)
|
||||
# target_link_libraries(foo ${ARMADILLO_LIBRARIES})
|
||||
#
|
||||
#=============================================================================
|
||||
#
|
||||
# This module sets the following variables:
|
||||
# ARMADILLO_FOUND - set to true if the library is found
|
||||
# ARMADILLO_INCLUDE_DIRS - list of required include directories
|
||||
# ARMADILLO_LIBRARIES - list of libraries to be linked
|
||||
# ARMADILLO_VERSION_MAJOR - major version number
|
||||
# ARMADILLO_VERSION_MINOR - minor version number
|
||||
# ARMADILLO_VERSION_PATCH - patch version number
|
||||
# ARMADILLO_VERSION_STRING - version number as a string (ex: "1.0.4")
|
||||
# ARMADILLO_VERSION_NAME - name of the version (ex: "Antipodean Antileech")
|
||||
#
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 Clement Creusot <creusot@cs.york.ac.uk>
|
||||
#
|
||||
# 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.)
|
||||
|
||||
|
||||
# UNIX paths are standard, no need to write.
|
||||
find_library(ARMADILLO_LIBRARY
|
||||
NAMES armadillo
|
||||
PATHS "$ENV{ProgramFiles}/Armadillo/lib" "$ENV{ProgramFiles}/Armadillo/lib64" "$ENV{ProgramFiles}/Armadillo"
|
||||
)
|
||||
find_path(ARMADILLO_INCLUDE_DIR
|
||||
NAMES armadillo
|
||||
PATHS "$ENV{ProgramFiles}/Armadillo/include"
|
||||
)
|
||||
|
||||
|
||||
if(ARMADILLO_INCLUDE_DIR)
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# Extract version information from <armadillo>
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
# WARNING: Early releases of Armadillo didn't have the arma_version.hpp file.
|
||||
# (e.g. v.0.9.8-1 in ubuntu maverick packages (2001-03-15))
|
||||
# If the file is missing, set all values to 0
|
||||
set(ARMADILLO_VERSION_MAJOR 0)
|
||||
set(ARMADILLO_VERSION_MINOR 0)
|
||||
set(ARMADILLO_VERSION_PATCH 0)
|
||||
set(ARMADILLO_VERSION_NAME "EARLY RELEASE")
|
||||
|
||||
if(EXISTS "${ARMADILLO_INCLUDE_DIR}/armadillo_bits/arma_version.hpp")
|
||||
|
||||
# Read and parse armdillo version header file for version number
|
||||
file(READ "${ARMADILLO_INCLUDE_DIR}/armadillo_bits/arma_version.hpp" _armadillo_HEADER_CONTENTS)
|
||||
string(REGEX REPLACE ".*#define ARMA_VERSION_MAJOR ([0-9]+).*" "\\1" ARMADILLO_VERSION_MAJOR "${_armadillo_HEADER_CONTENTS}")
|
||||
string(REGEX REPLACE ".*#define ARMA_VERSION_MINOR ([0-9]+).*" "\\1" ARMADILLO_VERSION_MINOR "${_armadillo_HEADER_CONTENTS}")
|
||||
string(REGEX REPLACE ".*#define ARMA_VERSION_PATCH ([0-9]+).*" "\\1" ARMADILLO_VERSION_PATCH "${_armadillo_HEADER_CONTENTS}")
|
||||
|
||||
# WARNING: The number of spaces before the version name is not one.
|
||||
string(REGEX REPLACE ".*#define ARMA_VERSION_NAME\ +\"([0-9a-zA-Z\ _-]+)\".*" "\\1" ARMADILLO_VERSION_NAME "${_armadillo_HEADER_CONTENTS}")
|
||||
|
||||
endif(EXISTS "${ARMADILLO_INCLUDE_DIR}/armadillo_bits/arma_version.hpp")
|
||||
|
||||
set(ARMADILLO_VERSION_STRING "${ARMADILLO_VERSION_MAJOR}.${ARMADILLO_VERSION_MINOR}.${ARMADILLO_VERSION_PATCH}")
|
||||
endif (ARMADILLO_INCLUDE_DIR)
|
||||
|
||||
#======================
|
||||
|
||||
|
||||
# Checks 'RECQUIRED', 'QUIET' and versions.
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Armadillo
|
||||
REQUIRED_VARS ARMADILLO_LIBRARY ARMADILLO_INCLUDE_DIR
|
||||
VERSION_VAR ARMADILLO_VERSION_STRING)
|
||||
# version_var fails with cmake < 2.8.4.
|
||||
|
||||
if (ARMADILLO_FOUND)
|
||||
set(ARMADILLO_INCLUDE_DIRS ${ARMADILLO_INCLUDE_DIR})
|
||||
set(ARMADILLO_LIBRARIES ${ARMADILLO_LIBRARY})
|
||||
endif (ARMADILLO_FOUND)
|
||||
|
||||
|
||||
# Hide internal variables
|
||||
mark_as_advanced(
|
||||
ARMADILLO_INCLUDE_DIR
|
||||
ARMADILLO_LIBRARY)
|
||||
|
||||
#======================
|
@ -0,0 +1,182 @@
|
||||
# - Define GNU standard installation directories
|
||||
# Provides install directory variables as defined for GNU software:
|
||||
# http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
|
||||
# Inclusion of this module defines the following variables:
|
||||
# CMAKE_INSTALL_<dir> - destination for files of a given type
|
||||
# CMAKE_INSTALL_FULL_<dir> - corresponding absolute path
|
||||
# where <dir> is one of:
|
||||
# BINDIR - user executables (bin)
|
||||
# SBINDIR - system admin executables (sbin)
|
||||
# LIBEXECDIR - program executables (libexec)
|
||||
# SYSCONFDIR - read-only single-machine data (etc)
|
||||
# SHAREDSTATEDIR - modifiable architecture-independent data (com)
|
||||
# LOCALSTATEDIR - modifiable single-machine data (var)
|
||||
# LIBDIR - object code libraries (lib or lib64)
|
||||
# INCLUDEDIR - C header files (include)
|
||||
# OLDINCLUDEDIR - C header files for non-gcc (/usr/include)
|
||||
# DATAROOTDIR - read-only architecture-independent data root (share)
|
||||
# DATADIR - read-only architecture-independent data (DATAROOTDIR)
|
||||
# INFODIR - info documentation (DATAROOTDIR/info)
|
||||
# LOCALEDIR - locale-dependent data (DATAROOTDIR/locale)
|
||||
# MANDIR - man documentation (DATAROOTDIR/man)
|
||||
# DOCDIR - documentation root (DATAROOTDIR/doc/PROJECT_NAME)
|
||||
# Each CMAKE_INSTALL_<dir> value may be passed to the DESTINATION options of
|
||||
# install() commands for the corresponding file type. If the includer does
|
||||
# not define a value the above-shown default will be used and the value will
|
||||
# appear in the cache for editing by the user.
|
||||
# Each CMAKE_INSTALL_FULL_<dir> value contains an absolute path constructed
|
||||
# from the corresponding destination by prepending (if necessary) the value
|
||||
# of CMAKE_INSTALL_PREFIX.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 Nikita Krupen'ko <krnekit@gmail.com>
|
||||
# Copyright 2011 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.)
|
||||
|
||||
# Installation directories
|
||||
#
|
||||
if(NOT DEFINED CMAKE_INSTALL_BINDIR)
|
||||
set(CMAKE_INSTALL_BINDIR "bin" CACHE PATH "user executables (bin)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_SBINDIR)
|
||||
set(CMAKE_INSTALL_SBINDIR "sbin" CACHE PATH "system admin executables (sbin)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_LIBEXECDIR)
|
||||
set(CMAKE_INSTALL_LIBEXECDIR "libexec" CACHE PATH "program executables (libexec)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_SYSCONFDIR)
|
||||
set(CMAKE_INSTALL_SYSCONFDIR "etc" CACHE PATH "read-only single-machine data (etc)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_SHAREDSTATEDIR)
|
||||
set(CMAKE_INSTALL_SHAREDSTATEDIR "com" CACHE PATH "modifiable architecture-independent data (com)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_LOCALSTATEDIR)
|
||||
set(CMAKE_INSTALL_LOCALSTATEDIR "var" CACHE PATH "modifiable single-machine data (var)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
||||
set(_LIBDIR_DEFAULT "lib")
|
||||
# Override this default 'lib' with 'lib64' iff:
|
||||
# - we are on Linux system but NOT cross-compiling
|
||||
# - we are NOT on debian
|
||||
# - we are on a 64 bits system
|
||||
# reason is: amd64 ABI: http://www.x86-64.org/documentation/abi.pdf
|
||||
# Note that the future of multi-arch handling may be even
|
||||
# more complicated than that: http://wiki.debian.org/Multiarch
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux"
|
||||
AND NOT CMAKE_CROSSCOMPILING
|
||||
AND NOT EXISTS "/etc/debian_version")
|
||||
if(NOT DEFINED CMAKE_SIZEOF_VOID_P)
|
||||
message(AUTHOR_WARNING
|
||||
"Unable to determine default CMAKE_INSTALL_LIBDIR directory because no target architecture is known. "
|
||||
"Please enable at least one language before including GNUInstallDirs.")
|
||||
else()
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
set(_LIBDIR_DEFAULT "lib64")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
set(CMAKE_INSTALL_LIBDIR "${_LIBDIR_DEFAULT}" CACHE PATH "object code libraries (${_LIBDIR_DEFAULT})")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_INCLUDEDIR)
|
||||
set(CMAKE_INSTALL_INCLUDEDIR "include" CACHE PATH "C header files (include)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_OLDINCLUDEDIR)
|
||||
set(CMAKE_INSTALL_OLDINCLUDEDIR "/usr/include" CACHE PATH "C header files for non-gcc (/usr/include)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_DATAROOTDIR)
|
||||
set(CMAKE_INSTALL_DATAROOTDIR "share" CACHE PATH "read-only architecture-independent data root (share)")
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Values whose defaults are relative to DATAROOTDIR. Store empty values in
|
||||
# the cache and store the defaults in local variables if the cache values are
|
||||
# not set explicitly. This auto-updates the defaults as DATAROOTDIR changes.
|
||||
|
||||
if(NOT CMAKE_INSTALL_DATADIR)
|
||||
set(CMAKE_INSTALL_DATADIR "" CACHE PATH "read-only architecture-independent data (DATAROOTDIR)")
|
||||
set(CMAKE_INSTALL_DATADIR "${CMAKE_INSTALL_DATAROOTDIR}")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_INFODIR)
|
||||
set(CMAKE_INSTALL_INFODIR "" CACHE PATH "info documentation (DATAROOTDIR/info)")
|
||||
set(CMAKE_INSTALL_INFODIR "${CMAKE_INSTALL_DATAROOTDIR}/info")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_LOCALEDIR)
|
||||
set(CMAKE_INSTALL_LOCALEDIR "" CACHE PATH "locale-dependent data (DATAROOTDIR/locale)")
|
||||
set(CMAKE_INSTALL_LOCALEDIR "${CMAKE_INSTALL_DATAROOTDIR}/locale")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_MANDIR)
|
||||
set(CMAKE_INSTALL_MANDIR "" CACHE PATH "man documentation (DATAROOTDIR/man)")
|
||||
set(CMAKE_INSTALL_MANDIR "${CMAKE_INSTALL_DATAROOTDIR}/man")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_DOCDIR)
|
||||
set(CMAKE_INSTALL_DOCDIR "" CACHE PATH "documentation root (DATAROOTDIR/doc/PROJECT_NAME)")
|
||||
set(CMAKE_INSTALL_DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}")
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
mark_as_advanced(
|
||||
CMAKE_INSTALL_BINDIR
|
||||
CMAKE_INSTALL_SBINDIR
|
||||
CMAKE_INSTALL_LIBEXECDIR
|
||||
CMAKE_INSTALL_SYSCONFDIR
|
||||
CMAKE_INSTALL_SHAREDSTATEDIR
|
||||
CMAKE_INSTALL_LOCALSTATEDIR
|
||||
CMAKE_INSTALL_LIBDIR
|
||||
CMAKE_INSTALL_INCLUDEDIR
|
||||
CMAKE_INSTALL_OLDINCLUDEDIR
|
||||
CMAKE_INSTALL_DATAROOTDIR
|
||||
CMAKE_INSTALL_DATADIR
|
||||
CMAKE_INSTALL_INFODIR
|
||||
CMAKE_INSTALL_LOCALEDIR
|
||||
CMAKE_INSTALL_MANDIR
|
||||
CMAKE_INSTALL_DOCDIR
|
||||
)
|
||||
|
||||
# Result directories
|
||||
#
|
||||
foreach(dir
|
||||
BINDIR
|
||||
SBINDIR
|
||||
LIBEXECDIR
|
||||
SYSCONFDIR
|
||||
SHAREDSTATEDIR
|
||||
LOCALSTATEDIR
|
||||
LIBDIR
|
||||
INCLUDEDIR
|
||||
OLDINCLUDEDIR
|
||||
DATAROOTDIR
|
||||
DATADIR
|
||||
INFODIR
|
||||
LOCALEDIR
|
||||
MANDIR
|
||||
DOCDIR
|
||||
)
|
||||
if(NOT IS_ABSOLUTE ${CMAKE_INSTALL_${dir}})
|
||||
set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_${dir}}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_${dir}}")
|
||||
endif()
|
||||
endforeach()
|
@ -0,0 +1,2 @@
|
||||
include(Platform/AIX-XL)
|
||||
__aix_compiler_xl(ASM)
|
@ -1,4 +1,2 @@
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-G -Wl,-brtl,-bnoipath") # -shared
|
||||
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib
|
||||
SET(CMAKE_SHARED_LIBRARY_C_FLAGS " ")
|
||||
SET(CMAKE_SHARED_MODULE_C_FLAGS " ")
|
||||
include(Platform/AIX-XL)
|
||||
__aix_compiler_xl(C)
|
||||
|
@ -1,4 +1,2 @@
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-G -Wl,-brtl,-bnoipath") # -shared
|
||||
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib
|
||||
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS " ")
|
||||
SET(CMAKE_SHARED_MODULE_CXX_FLAGS " ")
|
||||
include(Platform/AIX-XL)
|
||||
__aix_compiler_xl(CXX)
|
||||
|
@ -1,4 +1,2 @@
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-G -Wl,-brtl,-bnoipath") # -shared
|
||||
SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib
|
||||
SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS " ")
|
||||
SET(CMAKE_SHARED_MODULE_Fortran_FLAGS " ")
|
||||
include(Platform/AIX-XL)
|
||||
__aix_compiler_xl(Fortran)
|
||||
|
@ -0,0 +1,28 @@
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2002-2011 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.)
|
||||
|
||||
# This module is shared by multiple languages; use include blocker.
|
||||
if(__AIX_COMPILER_XL)
|
||||
return()
|
||||
endif()
|
||||
set(__AIX_COMPILER_XL 1)
|
||||
|
||||
macro(__aix_compiler_xl lang)
|
||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-blibpath:")
|
||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":")
|
||||
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-G -Wl,-brtl,-bnoipath") # -shared
|
||||
set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib
|
||||
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS " ")
|
||||
set(CMAKE_SHARED_MODULE_${lang}_FLAGS " ")
|
||||
endmacro()
|
@ -0,0 +1 @@
|
||||
set(CMAKE_Fortran_VERBOSE_FLAG "-X -v") # Runs gcc under the hood.
|
@ -0,0 +1,6 @@
|
||||
include(Platform/HP-UX-HP)
|
||||
__hpux_compiler_hp(ASM)
|
||||
|
||||
set(CMAKE_SHARED_LIBRARY_CREATE_ASM_FLAGS "-E -b +nodefaultrpath -L/usr/lib")
|
||||
|
||||
set(CMAKE_ASM_CREATE_SHARED_LIBRARY "ld <CMAKE_SHARED_LIBRARY_CREATE_ASM_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_ASM_FLAG><TARGET_SONAME> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
|
@ -0,0 +1,11 @@
|
||||
include(Platform/HP-UX-HP)
|
||||
__hpux_compiler_hp(C)
|
||||
|
||||
set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-E -b +nodefaultrpath -L/usr/lib")
|
||||
|
||||
set(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
||||
set(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
|
||||
set(CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> -Aa -Ae <FLAGS> -o <OBJECT> -c <SOURCE>")
|
||||
|
||||
# use ld directly to create shared libraries for hp cc
|
||||
set(CMAKE_C_CREATE_SHARED_LIBRARY "ld <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_C_FLAG><TARGET_SONAME> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
|
@ -0,0 +1,16 @@
|
||||
include(Platform/HP-UX-HP)
|
||||
__hpux_compiler_hp(CXX)
|
||||
|
||||
set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "+Z -Wl,-E,+nodefaultrpath -b -L/usr/lib")
|
||||
|
||||
set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
|
||||
set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE
|
||||
"<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -S <SOURCE>"
|
||||
"mv `basename \"<SOURCE>\" | sed 's/\\.[^./]*$$//'`.s <ASSEMBLY_SOURCE>"
|
||||
"rm -f `basename \"<SOURCE>\" | sed 's/\\.[^./]*$$//'`.o"
|
||||
)
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
|
||||
set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "+O3 -DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE_INIT "+O2 -DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g")
|
@ -0,0 +1,7 @@
|
||||
include(Platform/HP-UX-HP)
|
||||
__hpux_compiler_hp(Fortran)
|
||||
|
||||
set(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-E -b -L/usr/lib")
|
||||
|
||||
set(CMAKE_Fortran_CREATE_SHARED_LIBRARY
|
||||
"ld <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG><TARGET_SONAME> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
|
@ -0,0 +1,34 @@
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2002-2011 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.)
|
||||
|
||||
# This module is shared by multiple languages; use include blocker.
|
||||
if(__HPUX_COMPILER_HP)
|
||||
return()
|
||||
endif()
|
||||
set(__HPUX_COMPILER_HP 1)
|
||||
set(_Wl_C "")
|
||||
set(_Wl_CXX "-Wl,")
|
||||
set(_Wl_Fortran "")
|
||||
set(_Wl_ASM "")
|
||||
|
||||
macro(__hpux_compiler_hp lang)
|
||||
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "+Z")
|
||||
set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,+s,-E,+nodefaultrpath")
|
||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "${_Wl_${lang}}+b")
|
||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":")
|
||||
set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "${_Wl_${lang}}+h")
|
||||
set(CMAKE_EXECUTABLE_RUNTIME_${lang}_FLAG "-Wl,+b")
|
||||
|
||||
set(CMAKE_${lang}_FLAGS_INIT "")
|
||||
endmacro()
|
@ -0,0 +1 @@
|
||||
set(CMAKE_Fortran_VERBOSE_FLAG "-X -v") # Runs gcc under the hood.
|
@ -0,0 +1,2 @@
|
||||
include(Platform/Windows-Intel)
|
||||
__windows_compiler_intel(ASM)
|
@ -1,2 +1,4 @@
|
||||
# kFreeBSD looks just like Linux.
|
||||
INCLUDE(Platform/Linux)
|
||||
|
||||
SET(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-kfreebsd-gnu[a-z0-9_]*")
|
||||
|
@ -0,0 +1,183 @@
|
||||
# - ProcessorCount(var)
|
||||
# Determine the number of processors/cores and save value in ${var}
|
||||
#
|
||||
# Sets the variable named ${var} to the number of physical cores available on
|
||||
# the machine if the information can be determined. Otherwise it is set to 0.
|
||||
# Currently this functionality is implemented for AIX, cygwin, FreeBSD, HPUX,
|
||||
# IRIX, Linux, Mac OS X, QNX, Sun and Windows.
|
||||
#
|
||||
# This function is guaranteed to return a positive integer (>=1) if it
|
||||
# succeeds. It returns 0 if there's a problem determining the processor count.
|
||||
#
|
||||
# Example use, in a ctest -S dashboard script:
|
||||
#
|
||||
# include(ProcessorCount)
|
||||
# ProcessorCount(N)
|
||||
# if(NOT N EQUAL 0)
|
||||
# set(CTEST_BUILD_FLAGS -j${N})
|
||||
# set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
|
||||
# endif()
|
||||
#
|
||||
# This function is intended to offer an approximation of the value of the
|
||||
# number of compute cores available on the current machine, such that you
|
||||
# may use that value for parallel building and parallel testing. It is meant
|
||||
# to help utilize as much of the machine as seems reasonable. Of course,
|
||||
# knowledge of what else might be running on the machine simultaneously
|
||||
# should be used when deciding whether to request a machine's full capacity
|
||||
# all for yourself.
|
||||
|
||||
# A more reliable way might be to compile a small C program that uses the CPUID
|
||||
# instruction, but that again requires compiler support or compiling assembler
|
||||
# code.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2010-2011 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.)
|
||||
|
||||
function(ProcessorCount var)
|
||||
# Unknown:
|
||||
set(count 0)
|
||||
|
||||
if(WIN32)
|
||||
# Windows:
|
||||
set(count "$ENV{NUMBER_OF_PROCESSORS}")
|
||||
#message("ProcessorCount: WIN32, trying environment variable")
|
||||
endif()
|
||||
|
||||
if(NOT count)
|
||||
# Mac, FreeBSD, OpenBSD (systems with sysctl):
|
||||
find_program(ProcessorCount_cmd_sysctl sysctl
|
||||
PATHS /usr/sbin /sbin)
|
||||
if(ProcessorCount_cmd_sysctl)
|
||||
execute_process(COMMAND ${ProcessorCount_cmd_sysctl} -n hw.ncpu
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
OUTPUT_VARIABLE count)
|
||||
#message("ProcessorCount: trying sysctl '${ProcessorCount_cmd_sysctl}'")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT count)
|
||||
# Linux (systems with getconf):
|
||||
find_program(ProcessorCount_cmd_getconf getconf)
|
||||
if(ProcessorCount_cmd_getconf)
|
||||
execute_process(COMMAND ${ProcessorCount_cmd_getconf} _NPROCESSORS_ONLN
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
OUTPUT_VARIABLE count)
|
||||
#message("ProcessorCount: trying getconf '${ProcessorCount_cmd_getconf}'")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT count)
|
||||
# HPUX (systems with machinfo):
|
||||
find_program(ProcessorCount_cmd_machinfo machinfo
|
||||
PATHS /usr/contrib/bin)
|
||||
if(ProcessorCount_cmd_machinfo)
|
||||
execute_process(COMMAND ${ProcessorCount_cmd_machinfo}
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
OUTPUT_VARIABLE machinfo_output)
|
||||
string(REGEX MATCHALL "Number of CPUs = ([0-9]+)" procs "${machinfo_output}")
|
||||
set(count "${CMAKE_MATCH_1}")
|
||||
#message("ProcessorCount: trying machinfo '${ProcessorCount_cmd_machinfo}'")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT count)
|
||||
# IRIX (systems with hinv):
|
||||
find_program(ProcessorCount_cmd_hinv hinv
|
||||
PATHS /sbin)
|
||||
if(ProcessorCount_cmd_hinv)
|
||||
execute_process(COMMAND ${ProcessorCount_cmd_hinv}
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
OUTPUT_VARIABLE hinv_output)
|
||||
string(REGEX MATCHALL "([0-9]+) .* Processors" procs "${hinv_output}")
|
||||
set(count "${CMAKE_MATCH_1}")
|
||||
#message("ProcessorCount: trying hinv '${ProcessorCount_cmd_hinv}'")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT count)
|
||||
# AIX (systems with lsconf):
|
||||
find_program(ProcessorCount_cmd_lsconf lsconf
|
||||
PATHS /usr/sbin)
|
||||
if(ProcessorCount_cmd_lsconf)
|
||||
execute_process(COMMAND ${ProcessorCount_cmd_lsconf}
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
OUTPUT_VARIABLE lsconf_output)
|
||||
string(REGEX MATCHALL "Number Of Processors: ([0-9]+)" procs "${lsconf_output}")
|
||||
set(count "${CMAKE_MATCH_1}")
|
||||
#message("ProcessorCount: trying lsconf '${ProcessorCount_cmd_lsconf}'")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT count)
|
||||
# QNX (systems with pidin):
|
||||
find_program(ProcessorCount_cmd_pidin pidin)
|
||||
if(ProcessorCount_cmd_pidin)
|
||||
execute_process(COMMAND ${ProcessorCount_cmd_pidin} info
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
OUTPUT_VARIABLE pidin_output)
|
||||
string(REGEX MATCHALL "Processor[0-9]+: " procs "${pidin_output}")
|
||||
list(LENGTH procs count)
|
||||
#message("ProcessorCount: trying pidin '${ProcessorCount_cmd_pidin}'")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT count)
|
||||
# Sun (systems where uname -X emits "NumCPU" in its output):
|
||||
find_program(ProcessorCount_cmd_uname uname)
|
||||
if(ProcessorCount_cmd_uname)
|
||||
execute_process(COMMAND ${ProcessorCount_cmd_uname} -X
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
OUTPUT_VARIABLE uname_X_output)
|
||||
string(REGEX MATCHALL "NumCPU = ([0-9]+)" procs "${uname_X_output}")
|
||||
set(count "${CMAKE_MATCH_1}")
|
||||
#message("ProcessorCount: trying uname -X '${ProcessorCount_cmd_uname}'")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Execute this code when all previously attempted methods return empty
|
||||
# output:
|
||||
#
|
||||
if(NOT count)
|
||||
# Systems with /proc/cpuinfo:
|
||||
set(cpuinfo_file /proc/cpuinfo)
|
||||
if(EXISTS "${cpuinfo_file}")
|
||||
file(STRINGS "${cpuinfo_file}" procs REGEX "^processor.: [0-9]+$")
|
||||
list(LENGTH procs count)
|
||||
#message("ProcessorCount: trying cpuinfo '${cpuinfo_file}'")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Since cygwin builds of CMake do not define WIN32 anymore, but they still
|
||||
# run on Windows, and will still have this env var defined:
|
||||
#
|
||||
if(NOT count)
|
||||
set(count "$ENV{NUMBER_OF_PROCESSORS}")
|
||||
#message("ProcessorCount: last fallback, trying environment variable")
|
||||
endif()
|
||||
|
||||
# Ensure an integer return (avoid inadvertently returning an empty string
|
||||
# or an error string)... If it's not a decimal integer, return 0:
|
||||
#
|
||||
if(NOT count MATCHES "^[0-9]+$")
|
||||
set(count 0)
|
||||
endif()
|
||||
|
||||
set(${var} ${count} PARENT_SCOPE)
|
||||
endfunction()
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue