SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG
DONATE


YUM REPOSITORY

 
 

cmake

Section: User Commands (1)
Updated: January 08, 2009
Index 

DESCRIPTION

The "cmake" executable is the CMake command-line interface. It may be used to configure projects in scripts. Project configuration settings may be specified on the command line with the -D option. The -i option will cause cmake to interactively prompt for such settings.

CMake is a cross-platform build system generator. Projects specify their build process with platform-independent CMake listfiles included in each directory of a source tree with the name CMakeLists.txt. Users build a project by using CMake to generate a build system for a native tool on their platform.

 

MODULES

The following modules are provided with CMake. They can be used with INCLUDE(ModuleName).


  CMake Modules - Modules coming with CMake, the Cross-Platform Makefile Generator.

This is the documentation for the modules and scripts coming with CMake. Using these modules you can check the computer system for installed software packages, features of the compiler and the existance of headers to name just a few.

AddFileDependencies
ADD_FILE_DEPENDENCIES(source_file depend_files...)

Adds the given files as dependencies to source_file

BundleUtilities

 BundleUtilities.cmake

A collection of CMake utility functions useful for dealing with .app bundles on the Mac and bundle-like directories on any OS.

The following functions are provided by this script:


   get_bundle_main_executable
   get_dotapp_dir
   get_bundle_and_executable
   get_bundle_all_executables
   get_item_key
   clear_bundle_keys
   set_bundle_key_values
   get_bundle_keys
   copy_resolved_item_into_bundle
   fixup_bundle_item
   fixup_bundle
   copy_and_fixup_bundle
   verify_bundle_prerequisites
   verify_bundle_symlinks
   verify_app

Requires CMake 2.6 or greater because it uses function, break and PARENT_SCOPE. Also depends on GetPrerequisites.cmake.

CMakeBackwardCompatibilityCXX
define a bunch of backwards compatibility variables


  CMAKE_ANSI_CXXFLAGS - flag for ansi c++ 
  CMAKE_HAS_ANSI_STRING_STREAM - has <strstream>
  INCLUDE(TestForANSIStreamHeaders)
  INCLUDE(CheckIncludeFileCXX)
  INCLUDE(TestForSTDNamespace)
  INCLUDE(TestForANSIForScope)

CMakeDependentOption
Macro to provide an option dependent on other options.

This macro presents an option to the user only if a set of other conditions are true. When the option is not presented a default value is used, but any value set by the user is preserved for when the option is presented again. Example invocation:


  CMAKE_DEPENDENT_OPTION(USE_FOO "Use Foo" ON
                         "USE_BAR;NOT USE_ZOT" OFF)

If USE_BAR is true and USE_ZOT is false, this provides an option called USE_FOO that defaults to ON. Otherwise, it sets USE_FOO to OFF. If the status of USE_BAR or USE_ZOT ever changes, any value for the USE_FOO option is saved so that when the option is re-enabled it retains its old value.

CMakeDetermineASM-ATTCompiler

 determine the compiler to use for ASM using AT&T syntax

CMakeDetermineASMCompiler

 determine the compiler to use for ASM programs

CMakeExportBuildSettings
export build settings from a project.


  CMAKE_EXPORT_BUILD_SETTINGS(SETTINGS_FILE)

macro defined to export the build settings for use by another project.


  SETTINGS_FILE - the file into which the settings are to be stored.

CMakeFindFrameworks
helper module to find OSX frameworks

CMakeForceCompiler

 This module defines macros intended for use by cross-compiling toolchain files when CMake is not able to automatically detect the compiler identification.

Macro CMAKE_FORCE_C_COMPILER has the following signature:


   CMAKE_FORCE_C_COMPILER(<compiler> <compiler-id>)

It sets CMAKE_C_COMPILER to the given compiler and the cmake internal variable CMAKE_C_COMPILER_ID to the given compiler-id. It also bypasses the check for working compiler and basic compiler information tests.

Macro CMAKE_FORCE_CXX_COMPILER has the following signature:


   CMAKE_FORCE_CXX_COMPILER(<compiler> <compiler-id>)

It sets CMAKE_CXX_COMPILER to the given compiler and the cmake internal variable CMAKE_CXX_COMPILER_ID to the given compiler-id. It also bypasses the check for working compiler and basic compiler information tests.

So a simple toolchain file could look like this:


   INCLUDE (CMakeForceCompiler)
   SET(CMAKE_SYSTEM_NAME Generic)
   CMAKE_FORCE_C_COMPILER   (chc12 MetrowerksHicross)
   CMAKE_FORCE_CXX_COMPILER (chc12 MetrowerksHicross)

CMakeImportBuildSettings
import build settings from another project


  CMAKE_IMPORT_BUILD_SETTINGS(SETTINGS_FILE) 

macro defined to import the build settings from another project. SETTINGS_FILE is a file created by the other project's call to the CMAKE_EXPORT_BUILD_SETTINGS macro, see CMakeExportBuildSettings.

CMakeJavaInformation

 This should be included before the _INIT variables are used to initialize the cache. Since the rule variables have if blocks on them, users can still define them here. But, it should still be after the platform file so changes can be made to those values.

CMakePrintSystemInformation
print system information

This file can be used for diagnostic purposes just include it in a project to see various internal CMake variables.

CPack
Build binary and source package installers

The CPack module generates binary and source installers in a variety of formats using the cpack program. Inclusion of the CPack module adds two new targets to the resulting makefiles, package and package_source, which build the binary and source installers, respectively. The generated binary installers contain everything installed via CMake's INSTALL command (and the deprecated INSTALL_FILES, INSTALL_PROGRAMS, and INSTALL_TARGETS commands).

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.

Before including the CPack module, there are a variety of variables that can be set to customize the resulting installers. The most commonly-used variables are:


   CPACK_PACKAGE_NAME - The name of the package (or application). If
   not specified, defaults to the project name.


   CPACK_PACKAGE_VENDOR - The name of the package vendor (e.g.,
   "Kitware").


   CPACK_PACKAGE_VERSION_MAJOR - Package major Version


   CPACK_PACKAGE_VERSION_MINOR - Package minor Version


   CPACK_PACKAGE_VERSION_PATCH - Package patch Version


   CPACK_PACKAGE_DESCRIPTION_FILE - A text file used to describe the
   project. Used, for example, the introduction screen of a
   CPack-generated Windows installer to describe the project.


   CPACK_PACKAGE_DESCRIPTION_SUMMARY - Short description of the
   project (only a few words).


   CPACK_PACKAGE_FILE_NAME - The name of the package file to generate,
   not including the extension. For example, cmake-2.6.1-Linux-i686.


   CPACK_PACKAGE_INSTALL_DIRECTORY - Installation directory on the
   target system, e.g., "CMake 2.5".


   CPACK_RESOURCE_FILE_LICENSE - License file for the project, which
   will typically be displayed to the user (often with an explicit
   "Accept" button, for graphical installers) prior to installation.


   CPACK_RESOURCE_FILE_README - ReadMe file for the project, which
   typically describes in some detail


   CPACK_RESOURCE_FILE_WELCOME - Welcome file for the project, which
   welcomes users to this installer. Typically used in the graphical
   installers on Windows and Mac OS X.


   CPACK_MONOLITHIC_INSTALL - Disables the component-based 
   installation mechanism, so that all components are always installed.


   CPACK_GENERATOR - List of CPack generators to use. If not
   specified, CPack will create a set of options (e.g.,
   CPACK_BINARY_NSIS) allowing the user to enable/disable individual
   generators.


   CPACK_OUTPUT_CONFIG_FILE - The name of the CPack configuration file
   for binary installers that will be generated by the CPack
   module. Defaults to CPackConfig.cmake.


   CPACK_PACKAGE_EXECUTABLES - Lists each of the executables along
   with a text label, to be used to create Start Menu shortcuts on
   Windows. For example, setting this to the list ccmake;CMake will
   create a shortcut named "CMake" that will execute the installed
   executable ccmake.


   CPACK_STRIP_FILES - List of files to be stripped. Starting with
   CMake 2.6.0 CPACK_STRIP_FILES will be a boolean variable which
   enables stripping of all files (a list of files evaluates to TRUE
   in CMake, so this change is compatible).

The following CPack variables are specific to source packages, and will not affect binary packages:


   CPACK_SOURCE_PACKAGE_FILE_NAME - The name of the source package,
   e.g., cmake-2.6.1


   CPACK_SOURCE_STRIP_FILES - List of files in the source tree that
   will be stripped. Starting with CMake 2.6.0
   CPACK_SOURCE_STRIP_FILES will be a boolean variable which enables
   stripping of all files (a list of files evaluates to TRUE in CMake,
   so this change is compatible).


   CPACK_SOURCE_GENERATOR - List of generators used for the source
   packages. As with CPACK_GENERATOR, if this is not specified then
   CPack will create a set of options (e.g., CPACK_SOURCE_ZIP)
   allowing users to select which packages will be generated.


   CPACK_SOURCE_OUTPUT_CONFIG_FILE - The name of the CPack
   configuration file for source installers that will be generated by
   the CPack module. Defaults to CPackSourceConfig.cmake.


   CPACK_SOURCE_IGNORE_FILES - Pattern of files in the source tree
   that won't be packaged when building a source package. This is a
   list of patterns, e.g., /CVS/;/\\.svn/;\\.swp$;\\.#;/#;.*~;cscope.*

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_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 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.

The following variable is specific to installers build on Mac OS X using PackageMaker:


   CPACK_OSX_PACKAGE_VERSION - The version of Mac OS X that the
   resulting PackageMaker archive should be compatible
   with. Different versions of Mac OS X support different
   features. For example, CPack can only build component-based
   installers for Mac OS X 10.4 or newer, and can only build
   installers that download component son-the-fly for Mac OS X 10.5
   or newer. If left blank, this value will be set to the minimum
   version of Mac OS X that supports the requested features. Set this
   variable to some value (e.g., 10.4) only if you want to guarantee
   that your installer will work on that version of Mac OS X, and
   don't mind missing extra features available in the installer
   shipping with later versions of Mac OS X.

The following variables are for advanced uses of CPack:


   CPACK_CMAKE_GENERATOR - What CMake generator should be used if the
   project is CMake project. Defaults to the value of CMAKE_GENERATOR;
   few users will want to change this setting.


   CPACK_INSTALL_CMAKE_PROJECTS - List of four values that specify
   what project to install. The four values are: Build directory,
   Project Name, Project Component, Directory. If omitted, CPack will
   build an installer that installers everything.


   CPACK_SYSTEM_NAME - System name, defaults to the value of
   ${CMAKE_SYSTEM_NAME}.


   CPACK_PACKAGE_VERSION - Package full version, used internally. By
   default, this is built from CPACK_PACKAGE_VERSION_MAJOR,
   CPACK_PACKAGE_VERSION_MINOR, and CPACK_PACKAGE_VERSION_PATCH.


   CPACK_TOPLEVEL_TAG - Directory for the installed files.


   CPACK_INSTALL_COMMANDS - Extra commands to install components.


   CPACK_INSTALL_DIRECTORIES - Extra directories to install.

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.

CPackRPM

 CPack script for creating RPM package Author: Eric Noulard with the help of Alexander Neundorf. All variables used by CPackRPM begins with CPACK_RPM_ prefix

Here comes the list of used variables:

CTest
Configure a project for testing with CTest/Dart

This file configures a project to use the CTest/Dart testing/dashboard process. This module should be included in the CMakeLists.txt file at the top of a project. Typical usage:


  INCLUDE(CTest)
  IF(BUILD_TESTING)
    # ... testing related CMake code ...
  ENDIF(BUILD_TESTING)

The BUILD_TESTING option is created by the CTest module to determine whether testing support should be enabled. The default is ON.

CTestTestfile

 CMake generated Testfile for Source directory: /usr/src/packages/BUILD/cmake-2.6.2/Modules Build directory: /usr/src/packages/BUILD/cmake-2.6.2/Modules

This file replicates the SUBDIRS() and ADD_TEST() commands from the source tree CMakeLists.txt file, skipping any SUBDIRS() or ADD_TEST() commands that are excluded by CMake control structures, i.e. IF() commands.

CheckCCompilerFlag
Check whether the C compiler supports a given flag.

CHECK_C_COMPILER_FLAG(FLAG VARIABLE)


  FLAG - the compiler flag
  VARIABLE - variable to store the result


  This actually calls the check_c_source_compiles macro.
  See help for CheckCSourceCompiles for a listing of variables
  that can modify the build.

CheckCSourceCompiles
macro which checks if the source code compiles

CHECK_C_SOURCE_COMPILES(SOURCE VAR)


  SOURCE   - source code to try to compile
  VAR      - variable to store whether the source code compiled

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

CheckCSourceRuns
macro which checks if the source code runs

CHECK_C_SOURCE_RUNS(SOURCE VAR)


  SOURCE   - source code to try to compile
  VAR      - variable to store the result, 1 for success, empty for failure

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

CheckCXXCompilerFlag
Check whether the CXX compiler supports a given flag.

CHECK_CXX_COMPILER_FLAG(FLAG VARIABLE)


  FLAG - the compiler flag
  VARIABLE - variable to store the result

CheckCXXSourceCompiles
macro which checks if the source code compiles

CHECK_CXX_SOURCE_COMPILES(SOURCE VAR)


  SOURCE - source code to try to compile
  VAR    - variable to store whether the source code compiled

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

CheckCXXSourceRuns
macro which checks if the source code compiles

CHECK_CXX_SOURCE_RUNS(SOURCE VAR)


  SOURCE - source code to try to compile
  VAR    - variable to store the result, 1 for success, empty for failure

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

CheckFortranFunctionExists
macro which checks if the Fortran function exists

CHECK_FORTRAN_FUNCTION_EXISTS(FUNCTION VARIABLE)


  FUNCTION - the name of the Fortran function
  VARIABLE - variable to store the result

The following variables may be set before calling this macro to modify the way the check is run:


  CMAKE_REQUIRED_LIBRARIES = list of libraries to link

CheckFunctionExists
macro which checks if the function exists

CHECK_FUNCTION_EXISTS(FUNCTION VARIABLE)


  FUNCTION - the name of the function
  VARIABLE - variable to store the result

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

CheckIncludeFile
macro which checks the include file exists.

CHECK_INCLUDE_FILE(INCLUDE VARIABLE)


  INCLUDE  - name of include file
  VARIABLE - variable to return result
   

an optional third argument is the CFlags to add to the compile line or you can use CMAKE_REQUIRED_FLAGS

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

CheckIncludeFileCXX
Check if the include file exists.


  CHECK_INCLUDE_FILE_CXX(INCLUDE VARIABLE)


  INCLUDE  - name of include file
  VARIABLE - variable to return result
  

An optional third argument is the CFlags to add to the compile line or you can use CMAKE_REQUIRED_FLAGS.

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

CheckIncludeFiles
Check if the files can be included

CHECK_INCLUDE_FILES(INCLUDE VARIABLE)


  INCLUDE  - list of files to include
  VARIABLE - variable to return result

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

CheckLibraryExists
Check if the function exists.

CHECK_LIBRARY_EXISTS (LIBRARY FUNCTION LOCATION VARIABLE)


  LIBRARY  - the name of the library you are looking for
  FUNCTION - the name of the function
  LOCATION - location where the library should be found
  VARIABLE - variable to store the result

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_LIBRARIES = list of libraries to link

CheckStructHasMember
Check if the given struct or class has the specified member variable

CHECK_STRUCT_HAS_MEMBER (STRUCT MEMBER HEADER VARIABLE)


  STRUCT - the name of the struct or class you are interested in
  MEMBER - the member which existence you want to check
  HEADER - the header(s) where the prototype should be declared
  VARIABLE - variable to store the result

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

Example: CHECK_STRUCT_HAS_MEMBER("struct timeval" tv_sec sys/select.h HAVE_TIMEVAL_TV_SEC)

CheckSymbolExists
Check if the symbol exists in include files

CHECK_SYMBOL_EXISTS(SYMBOL FILES VARIABLE)


  SYMBOL   - symbol
  FILES    - include files to check
  VARIABLE - variable to return result

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

CheckTypeSize
Check sizeof a type


  CHECK_TYPE_SIZE(TYPE VARIABLE [BUILTIN_TYPES_ONLY])

Check if the type exists and determine size of type. if the type exists, the size will be stored to the variable. This also calls check_include_file for sys/types.h stdint.h and stddef.h, setting HAVE_SYS_TYPES_H, HAVE_STDINT_H, and HAVE_STDDEF_H. This is because many types are stored in these include files.


  VARIABLE - variable to store size if the type exists.
  HAVE_${VARIABLE} - does the variable exists or not
  BUILTIN_TYPES_ONLY - The third argument is optional and if 
                       it is set to the string BUILTIN_TYPES_ONLY
                       this macro will not check for any header files.

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

CheckVariableExists
Check if the variable exists.


  CHECK_VARIABLE_EXISTS(VAR VARIABLE)
  
  VAR      - the name of the variable
  VARIABLE - variable to store the result

This macro is only for C variables.

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_LIBRARIES = list of libraries to link

Dart
Configure a project for testing with CTest or old Dart Tcl Client

This file is the backwards-compatibility version of the CTest module. It supports using the old Dart 1 Tcl client for driving dashboard submissions as well as testing with CTest. This module should be included in the CMakeLists.txt file at the top of a project. Typical usage:


  INCLUDE(Dart)
  IF(BUILD_TESTING)
    # ... testing related CMake code ...
  ENDIF(BUILD_TESTING)

The BUILD_TESTING option is created by the Dart module to determine whether testing support should be enabled. The default is ON.

Documentation
DocumentationVTK.cmake

This file provides support for the VTK documentation framework. It relies on several tools (Doxygen, Perl, etc).

FeatureSummary
Macros for generating a summary of enabled/disabled features

PRINT_ENABLED_FEATURES()


   Print a summary of all enabled features. By default all successfull
   FIND_PACKAGE() calls will appear here, except the ones which used the QUIET keyword.
   Additional features can be added by appending an entry to the global ENABLED_FEATURES
   property. If SET_FEATURE_INFO() is used for that feature, the output will be much 
   more informative.

PRINT_DISABLED_FEATURES()


   Same as PRINT_ENABLED_FEATURES(), but for disabled features. It can be extended
   the same way by adding to the global property DISABLED_FEATURES.

SET_FEATURE_INFO(NAME DESCRIPTION [URL [COMMENT] ] )


    Use this macro to set up information about the named feature, which will
    then be displayed by PRINT_ENABLED/DISABLED_FEATURES().
    Example: SET_FEATURE_INFO(LibXml2 "XML processing library." "http://xmlsoft.org/")

FindASPELL
Try to find ASPELL

Once done this will define


  ASPELL_FOUND - system has ASPELL
  ASPELL_INCLUDE_DIR - the ASPELL include directory
  ASPELL_LIBRARIES - The libraries needed to use ASPELL
  ASPELL_DEFINITIONS - Compiler switches required for using ASPELL

FindAVIFile
Locate AVIFILE library and include paths

AVIFILE (http://avifile.sourceforge.net/)is a set of libraries for i386 machines to use various AVI codecs. Support is limited beyond Linux. Windows provides native AVI support, and so doesn't need this library. This module defines


  AVIFILE_INCLUDE_DIR, where to find avifile.h , etc.
  AVIFILE_LIBRARIES, the libraries to link against
  AVIFILE_DEFINITIONS, definitions to use when compiling
  AVIFILE_FOUND, If false, don't try to use AVIFILE

FindBLAS
Find BLAS library

This module finds an installed fortran library that implements the BLAS linear-algebra interface (see http://www.netlib.org/blas/). The list of libraries searched for is taken from the autoconf macro file, acx_blas.m4 (distributed at http://ac-archive.sourceforge.net/ac-archive/acx_blas.html).

This module sets the following variables:


  BLAS_FOUND - set to true if a library implementing the BLAS interface
    is found
  BLAS_LINKER_FLAGS - uncached list of required linker flags (excluding -l
    and -L).
  BLAS_LIBRARIES - uncached list of libraries (using full path name) to
    link against to use BLAS
  BLAS95_LIBRARIES - uncached list of libraries (using full path name)
    to link against to use BLAS95 interface
  BLAS95_FOUND - set to true if a library implementing the BLAS f95 interface
    is found
  BLA_STATIC  if set on this determines what kind of linkage we do (static)
  BLA_VENDOR  if set checks only the specified vendor, if not set checks
     all the posibilities
  BLA_F95     if set on tries to find the f95 interfaces for BLAS/LAPACK

######### ## List of vendors (BLA_VENDOR) valid in this module # ATLAS, PhiPACK,CXML,DXML,SunPerf,SCSL,SGIMATH,IBMESSL,Intel10_32 (intel mkl v10 32 bit),Intel10_64lp (intel mkl v10 64 bit,lp thread model, lp64 model), # Intel( older versions of mkl 32 and 64 bit), ACML,Apple, NAS, Generic C/CXX should be enabled to use Intel mkl

FindBZip2
Try to find BZip2

Once done this will define


  BZIP2_FOUND - system has BZip2
  BZIP2_INCLUDE_DIR - the BZip2 include directory
  BZIP2_LIBRARIES - Link these to use BZip2
  BZIP2_DEFINITIONS - Compiler switches required for using BZip2
  BZIP2_NEED_PREFIX - this is set if the functions are prefixed with BZ2_

FindBoost
Try to find Boost include dirs and libraries

Usage of this module as follows:


     SET(Boost_USE_STATIC_LIBS ON)
     SET(Boost_USE_MULTITHREAD OFF)
     FIND_PACKAGE( Boost 1.34.1 COMPONENTS date_time filesystem iostreams ... )

The Boost_ADDITIONAL_VERSIONS variable can be used to specify a list of boost version numbers that should be taken into account when searching for the libraries. Unfortunately boost puts the version number into the actual filename for the libraries, so this might be needed in the future when new Boost versions are released.

Currently this module searches for the following version numbers: 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0, 1.35.1, 1.36, 1.36.0, 1.36.1

The components list needs to be the actual names of boost libraries, that is the part of the actual library files that differ on different libraries. So its "date_time" for "libboost_date_time...". Anything else will result in errors

You can provide a minimum version number that should be used. If you provide this version number and specify the REQUIRED attribute, this module will fail if it can't find the specified or a later version. If you specify a version number this is automatically put into the considered list of version numbers and thus doesn't need to be specified in the