Full documentation specific to the given policy is displayed.If a file is specified, the documentation is written into and the output format is determined depending on the filename suffix. Supported are man page, HTML, DocBook and plain text.
+
Full documentation for all policies is displayed.If a file is specified, the documentation is written into and the output format is determined depending on the filename suffix. Supported are man page, HTML, DocBook and plain text.
+
Full documentation specific to the given property is displayed.If a file is specified, the documentation is written into and the output format is determined depending on the filename suffix. Supported are man page, HTML, DocBook and plain text.
***************
*** 414,444 ****
find_file: Find the full path to a file.
find_path(<VAR> name1 [path1 path2 ...])
!
This is the short-hand signature for the command that is sufficient in many cases. It is the same as find_path(<VAR> name1 [PATHS path1 path2 ...])
This command is used to find a full path to named file. A cache entry named by <VAR> is created to store the result of this command. If the full path to a file is found the result is stored in the variable and the search will not be repeated unless the variable is cleared. If nothing is found, the result will be <VAR>-NOTFOUND, and the search will be attempted again the next time find_path is invoked with the same variable. The name of the full path to a file that is searched for is specified by the names listed after the NAMES argument. Additional search locations can be specified after the PATHS argument. If ENV var is found in the PATHS section the environment variable var will be read and converted from a system environment variable to a cmake style list of paths. For example ENV PATH would be a way to list the system path variable. The argument after DOC will be used for the documentation string in the cache. PATH_SUFFIXES can be used to give sub directories that will be appended to the search paths.
If NO_DEFAULT_PATH is specified, then no additional paths are added to the search. If NO_DEFAULT_PATH is not specified, the search process is as follows:
1. Search cmake specific environment variables. This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
<prefix>/include for each <prefix> in CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_FRAMEWORK_PATH
!
2. Search cmake variables with the same names as the cmake specific environment variables. These are intended to be used on the command line with a -DVAR=value. This can be skipped if NO_CMAKE_PATH is passed.
<prefix>/include for each <prefix> in CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_FRAMEWORK_PATH
!
3. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
PATH INCLUDE
!
4. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
<prefix>/include for each <prefix> in CMAKE_SYSTEM_PREFIX_PATH CMAKE_SYSTEM_INCLUDE_PATH CMAKE_SYSTEM_FRAMEWORK_PATH
!
5. Search the paths specified after PATHS or in the short-hand version of the command.
On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
"FIRST" - Try to find frameworks before standard libraries or headers. This is the default on Darwin. "LAST" - Try to find frameworks after standard libraries or headers. "ONLY" - Only try to find frameworks. "NEVER". - Never try to find frameworks.
On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
"FIRST" - Try to find application bundles before standard programs. This is the default on Darwin. "LAST" - Try to find application bundles after standard programs. "ONLY" - Only try to find application bundles. "NEVER". - Never try to find application bundles.
!
The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_INCLUDE. This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
The reason the paths listed in the call to the command are searched last is that most users of CMake would expect things to be found first in the locations specified by their environment. Projects may override this behavior by simply calling the command twice:
find_path(<VAR> NAMES name PATHS paths... NO_DEFAULT_PATH) find_path(<VAR> NAMES name)
!
Once one of these calls succeeds the result variable will be set and stored in the cache so that neither call will search again.
This command is used to find a library. A cache entry named by <VAR> is created to store the result of this command. If the library is found the result is stored in the variable and the search will not be repeated unless the variable is cleared. If nothing is found, the result will be <VAR>-NOTFOUND, and the search will be attempted again the next time find_library is invoked with the same variable. The name of the library that is searched for is specified by the names listed after the NAMES argument. Additional search locations can be specified after the PATHS argument. If ENV var is found in the PATHS section the environment variable var will be read and converted from a system environment variable to a cmake style list of paths. For example ENV PATH would be a way to list the system path variable. The argument after DOC will be used for the documentation string in the cache. PATH_SUFFIXES can be used to give sub directories that will be appended to the search paths.
If NO_DEFAULT_PATH is specified, then no additional paths are added to the search. If NO_DEFAULT_PATH is not specified, the search process is as follows:
1. Search cmake specific environment variables. This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
<prefix>/lib for each <prefix> in CMAKE_PREFIX_PATH CMAKE_LIBRARY_PATH CMAKE_FRAMEWORK_PATH
!
2. Search cmake variables with the same names as the cmake specific environment variables. These are intended to be used on the command line with a -DVAR=value. This can be skipped if NO_CMAKE_PATH is passed.
<prefix>/lib for each <prefix> in CMAKE_PREFIX_PATH CMAKE_LIBRARY_PATH CMAKE_FRAMEWORK_PATH
!
3. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
PATH LIB
!
4. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
<prefix>/lib for each <prefix> in CMAKE_SYSTEM_PREFIX_PATH CMAKE_SYSTEM_LIBRARY_PATH CMAKE_SYSTEM_FRAMEWORK_PATH
!
5. Search the paths specified after PATHS or in the short-hand version of the command.
On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
"FIRST" - Try to find frameworks before standard libraries or headers. This is the default on Darwin. "LAST" - Try to find frameworks after standard libraries or headers. "ONLY" - Only try to find frameworks. "NEVER". - Never try to find frameworks.
On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
"FIRST" - Try to find application bundles before standard programs. This is the default on Darwin. "LAST" - Try to find application bundles after standard programs. "ONLY" - Only try to find application bundles. "NEVER". - Never try to find application bundles.
!
The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_LIBRARY. This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
The reason the paths listed in the call to the command are searched last is that most users of CMake would expect things to be found first in the locations specified by their environment. Projects may override this behavior by simply calling the command twice:
find_library(<VAR> NAMES name PATHS paths... NO_DEFAULT_PATH) find_library(<VAR> NAMES name)
!
Once one of these calls succeeds the result variable will be set and stored in the cache so that neither call will search again.
If the library found is a framework, then VAR will be set to the full path to the framework <fullPath>/A.framework. When a full path to a framework is used as a library, CMake will use a -framework A, and a -F<fullPath> to link the framework to the target.
find_package: Load settings for an external project.
Finds and loads settings from an external project. <package>_FOUND will be set to indicate whether the package was found. When the package is found package-specific information is provided through variables documented by the package itself. The QUIET option disables messages if the package cannot be found. The REQUIRED option stops processing with an error message if the package cannot be found. A package-specific list of components may be listed after the REQUIRED option or after the COMPONENTS option if no REQUIRED option is given. The "[major[.minor[.patch]]]" version argument specifies a desired version with which the package found should be compatible. The EXACT option requests that the version be matched exactly. Version support is currently provided only on a package-by-package basis (details below).
User code should generally look for packages using the above simple signature. The remainder of this command documentation specifies the full command signature and details of the search process. Project maintainers wishing to provide a package to be found by this command are encouraged to read on.
The command has two modes by which it searches for packages: "Module" mode and "Config" mode. Module mode is available when the command is invoked with the above reduced signature. CMake searches for a file called "Find<package>.cmake" in the CMAKE_MODULE_PATH followed by the CMake installation. If the file is found, it is read and processed by CMake. It is responsible for finding the package, checking the version, and producing any needed messages. Many find-modules provide limited or no support for versioning; check the module documentation. If no module is found the command proceeds to Config mode.
The NO_MODULE option may be used to skip Module mode explicitly. It is also implied by use of options not specified in the reduced signature.
Config mode attempts to locate a configuration file provided by the package to be found. A cache entry called <package>_DIR is created to hold the directory containing the file. By default the command searches for a package with the name <package>. If the NAMES option is given the names following it are used instead of <package>. The command searches for a file called "<name>Config.cmake" or "<lower-case-name>-config.cmake" for each name specified. A replacement set of possible configuration file names may be given using the CONFIGS option. The search procedure is specified below. Once found, the configuration file is read and processed by CMake. Since the file is provided by the package it already knows the location of package contents. The full path to the configuration file is stored in the cmake variable <package>_CONFIG.
If the package configuration file cannot be found CMake will generate an error describing the problem unless the QUIET argument is specified. If REQUIRED is specified and the package is not found a fatal error is generated and the configure step stops executing. If <package>_DIR has been set to a directory not containing a configuration file a fatal error is always generated because user intervention is required.
When the "[major[.minor[.patch]]]" version argument is specified Config mode will only find a version of the package that claims compatibility with the requested version. If the EXACT option is given only a version of the package claiming an exact match of the requested version may be found. CMake does not establish any convention for the meaning of version numbers. Package version numbers are checked by "version" files provided by the packages themselves. For a candidate package confguration file "<config-file>.cmake" the corresponding version file is located next to it and named either "<config-file>-version.cmake" or "<config-file>Version.cmake". If no such version file is available then the configuration file is assumed to not be compatible with any requested version. When a version file is found it is loaded to check the requested version number. The version file is loaded in a nested scope in which the following variables have been defined:
PACKAGE_FIND_NAME = the <package> name PACKAGE_FIND_VERSION = full requested version string PACKAGE_FIND_VERSION_MAJOR = requested major version, if any PACKAGE_FIND_VERSION_MINOR = requested minor version, if any PACKAGE_FIND_VERSION_PATCH = requested patch version, if any
The version file checks whether it satisfies the requested version and sets these variables:
PACKAGE_VERSION = package version (major[.minor[.patch]]) PACKAGE_VERSION_EXACT = true if version is exact match PACKAGE_VERSION_COMPATIBLE = true if version is compatible
--- 422,452 ----
find_file: Find the full path to a file.
find_path(<VAR> name1 [path1 path2 ...])
!
This is the short-hand signature for the command that is sufficient in many cases. It is the same as find_path(<VAR> name1 [PATHS path1 path2 ...])
This command is used to find a full path to named file. A cache entry named by <VAR> is created to store the result of this command. If the full path to a file is found the result is stored in the variable and the search will not be repeated unless the variable is cleared. If nothing is found, the result will be <VAR>-NOTFOUND, and the search will be attempted again the next time find_path is invoked with the same variable. The name of the full path to a file that is searched for is specified by the names listed after the NAMES argument. Additional search locations can be specified after the PATHS argument. If ENV var is found in the HINTS or PATHS section the environment variable var will be read and converted from a system environment variable to a cmake style list of paths. For example ENV PATH would be a way to list the system path variable. The argument after DOC will be used for the documentation string in the cache. PATH_SUFFIXES can be used to give sub directories that will be appended to the search paths.
If NO_DEFAULT_PATH is specified, then no additional paths are added to the search. If NO_DEFAULT_PATH is not specified, the search process is as follows:
1. Search paths specified in cmake-specific cache variables. These are intended to be used on the command line with a -DVAR=value. This can be skipped if NO_CMAKE_PATH is passed.
<prefix>/include for each <prefix> in CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_FRAMEWORK_PATH
!
2. Search paths specified in cmake-specific environment variables. These are intended to be set in the user's shell configuration. This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
<prefix>/include for each <prefix> in CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_FRAMEWORK_PATH
!
3. Search the paths specified by the HINTS option. These should be paths computed by system introspection, such as a hint provided by the location of another item already found. Hard-coded guesses should be specified with the PATHS option.
4. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
PATH INCLUDE
!
5. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
<prefix>/include for each <prefix> in CMAKE_SYSTEM_PREFIX_PATH CMAKE_SYSTEM_INCLUDE_PATH CMAKE_SYSTEM_FRAMEWORK_PATH
!
6. Search the paths specified by the PATHS option or in the short-hand version of the command. These are typically hard-coded guesses.
On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
"FIRST" - Try to find frameworks before standard libraries or headers. This is the default on Darwin. "LAST" - Try to find frameworks after standard libraries or headers. "ONLY" - Only try to find frameworks. "NEVER". - Never try to find frameworks.
On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
"FIRST" - Try to find application bundles before standard programs. This is the default on Darwin. "LAST" - Try to find application bundles after standard programs. "ONLY" - Only try to find application bundles. "NEVER". - Never try to find application bundles.
!
The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_INCLUDE. This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
The default search order is designed to be most-specific to least-specific for common use cases. Projects may override the order by simply calling the command multiple times and using the NO_* options:
find_path(<VAR> NAMES name PATHS paths... NO_DEFAULT_PATH) find_path(<VAR> NAMES name)
!
Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.
This command is used to find a library. A cache entry named by <VAR> is created to store the result of this command. If the library is found the result is stored in the variable and the search will not be repeated unless the variable is cleared. If nothing is found, the result will be <VAR>-NOTFOUND, and the search will be attempted again the next time find_library is invoked with the same variable. The name of the library that is searched for is specified by the names listed after the NAMES argument. Additional search locations can be specified after the PATHS argument. If ENV var is found in the HINTS or PATHS section the environment variable var will be read and converted from a system environment variable to a cmake style list of paths. For example ENV PATH would be a way to list the system path variable. The argument after DOC will be used for the documentation string in the cache. PATH_SUFFIXES can be used to give sub directories that will be appended to the search paths.
If NO_DEFAULT_PATH is specified, then no additional paths are added to the search. If NO_DEFAULT_PATH is not specified, the search process is as follows:
1. Search paths specified in cmake-specific cache variables. These are intended to be used on the command line with a -DVAR=value. This can be skipped if NO_CMAKE_PATH is passed.
<prefix>/lib for each <prefix> in CMAKE_PREFIX_PATH CMAKE_LIBRARY_PATH CMAKE_FRAMEWORK_PATH
!
2. Search paths specified in cmake-specific environment variables. These are intended to be set in the user's shell configuration. This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
<prefix>/lib for each <prefix> in CMAKE_PREFIX_PATH CMAKE_LIBRARY_PATH CMAKE_FRAMEWORK_PATH
!
3. Search the paths specified by the HINTS option. These should be paths computed by system introspection, such as a hint provided by the location of another item already found. Hard-coded guesses should be specified with the PATHS option.
4. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
PATH LIB
!
5. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
<prefix>/lib for each <prefix> in CMAKE_SYSTEM_PREFIX_PATH CMAKE_SYSTEM_LIBRARY_PATH CMAKE_SYSTEM_FRAMEWORK_PATH
!
6. Search the paths specified by the PATHS option or in the short-hand version of the command. These are typically hard-coded guesses.
On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
"FIRST" - Try to find frameworks before standard libraries or headers. This is the default on Darwin. "LAST" - Try to find frameworks after standard libraries or headers. "ONLY" - Only try to find frameworks. "NEVER". - Never try to find frameworks.
On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
"FIRST" - Try to find application bundles before standard programs. This is the default on Darwin. "LAST" - Try to find application bundles after standard programs. "ONLY" - Only try to find application bundles. "NEVER". - Never try to find application bundles.
!
The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_LIBRARY. This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
The default search order is designed to be most-specific to least-specific for common use cases. Projects may override the order by simply calling the command multiple times and using the NO_* options:
find_library(<VAR> NAMES name PATHS paths... NO_DEFAULT_PATH) find_library(<VAR> NAMES name)
!
Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.
If the library found is a framework, then VAR will be set to the full path to the framework <fullPath>/A.framework. When a full path to a framework is used as a library, CMake will use a -framework A, and a -F<fullPath> to link the framework to the target.
find_package: Load settings for an external project.
Finds and loads settings from an external project. <package>_FOUND will be set to indicate whether the package was found. When the package is found package-specific information is provided through variables documented by the package itself. The QUIET option disables messages if the package cannot be found. The REQUIRED option stops processing with an error message if the package cannot be found. A package-specific list of components may be listed after the REQUIRED option or after the COMPONENTS option if no REQUIRED option is given. The "[major[.minor[.patch]]]" version argument specifies a desired version with which the package found should be compatible. The EXACT option requests that the version be matched exactly. Version support is currently provided only on a package-by-package basis (details below).
User code should generally look for packages using the above simple signature. The remainder of this command documentation specifies the full command signature and details of the search process. Project maintainers wishing to provide a package to be found by this command are encouraged to read on.
The command has two modes by which it searches for packages: "Module" mode and "Config" mode. Module mode is available when the command is invoked with the above reduced signature. CMake searches for a file called "Find<package>.cmake" in the CMAKE_MODULE_PATH followed by the CMake installation. If the file is found, it is read and processed by CMake. It is responsible for finding the package, checking the version, and producing any needed messages. Many find-modules provide limited or no support for versioning; check the module documentation. If no module is found the command proceeds to Config mode.
The NO_MODULE option may be used to skip Module mode explicitly. It is also implied by use of options not specified in the reduced signature.
Config mode attempts to locate a configuration file provided by the package to be found. A cache entry called <package>_DIR is created to hold the directory containing the file. By default the command searches for a package with the name <package>. If the NAMES option is given the names following it are used instead of <package>. The command searches for a file called "<name>Config.cmake" or "<lower-case-name>-config.cmake" for each name specified. A replacement set of possible configuration file names may be given using the CONFIGS option. The search procedure is specified below. Once found, the configuration file is read and processed by CMake. Since the file is provided by the package it already knows the location of package contents. The full path to the configuration file is stored in the cmake variable <package>_CONFIG.
If the package configuration file cannot be found CMake will generate an error describing the problem unless the QUIET argument is specified. If REQUIRED is specified and the package is not found a fatal error is generated and the configure step stops executing. If <package>_DIR has been set to a directory not containing a configuration file a fatal error is always generated because user intervention is required.
When the "[major[.minor[.patch]]]" version argument is specified Config mode will only find a version of the package that claims compatibility with the requested version. If the EXACT option is given only a version of the package claiming an exact match of the requested version may be found. CMake does not establish any convention for the meaning of version numbers. Package version numbers are checked by "version" files provided by the packages themselves. For a candidate package confguration file "<config-file>.cmake" the corresponding version file is located next to it and named either "<config-file>-version.cmake" or "<config-file>Version.cmake". If no such version file is available then the configuration file is assumed to not be compatible with any requested version. When a version file is found it is loaded to check the requested version number. The version file is loaded in a nested scope in which the following variables have been defined:
PACKAGE_FIND_NAME = the <package> name PACKAGE_FIND_VERSION = full requested version string PACKAGE_FIND_VERSION_MAJOR = requested major version, if any PACKAGE_FIND_VERSION_MINOR = requested minor version, if any PACKAGE_FIND_VERSION_PATCH = requested patch version, if any
The version file checks whether it satisfies the requested version and sets these variables:
PACKAGE_VERSION = package version (major[.minor[.patch]]) PACKAGE_VERSION_EXACT = true if version is exact match PACKAGE_VERSION_COMPATIBLE = true if version is compatible
***************
*** 447,484 ****
in order to find a package. Package maintainers providing CMake package configuration files are encouraged to name and install them such that the procedure outlined below will find them without requiring use of additional options.
CMake constructs a set of possible installation prefixes for the package. Under each prefix several directories are searched for a configuration file. The tables below show the directories searched. Each entry is meant for installation trees following Windows (W), UNIX (U), or Apple (A) conventions.
On systems supporting OS X Frameworks and Application Bundles the following directories are searched for frameworks or bundles containing a configuration file:
In all cases the <name> is treated as case-insensitive and corresponds to any of the names specified (<package> or names given by NAMES). If PATH_SUFFIXES is specified the suffixes are appended to each (W) or (U) directory entry one-by-one.
This set of directories is intended to work in cooperation with projects that provide configuration files in their installation trees. Directories above marked with (W) are intended for installations on Windows where the prefix may point at the top of an application's installation directory. Those marked with (U) are intended for installations on UNIX platforms where the prefix is shared by multiple packages. This is merely a convention, so all (W) and (U) directories are still searched on all platforms. Directories marked with (A) are intended for installations on Apple platforms. The cmake variables CMAKE_FIND_FRAMEWORK and CMAKE_FIND_APPBUNDLE determine the order of preference as specified below.
The set of installation prefixes is constructed using the following steps. If NO_DEFAULT_PATH is specified steps 1-5 are skipped.
1. Search cmake specific environment variables. This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
2. Search cmake variables with the same names as the cmake specific environment variables. These are intended to be used on the command line with a -DVAR=value. This can be skipped if NO_CMAKE_PATH is passed.
3. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is passed. Path entries ending in "/bin" or "/sbin" are automatically converted to their parent directories.
PATH
!
4. Search project build trees recently configured in a CMake GUI. This can be skipped if NO_CMAKE_BUILDS_PATH is passed. It is intended for the case when a user is building multiple dependent projects one after another.
5. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
"FIRST" - Try to find frameworks before standard libraries or headers. This is the default on Darwin. "LAST" - Try to find frameworks after standard libraries or headers. "ONLY" - Only try to find frameworks. "NEVER". - Never try to find frameworks.
On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
"FIRST" - Try to find application bundles before standard programs. This is the default on Darwin. "LAST" - Try to find application bundles after standard programs. "ONLY" - Only try to find application bundles. "NEVER". - Never try to find application bundles.
!
The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_PACKAGE. This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
The reason the paths listed in the call to the command are searched last is that most users of CMake would expect things to be found first in the locations specified by their environment. Projects may override this behavior by simply calling the command twice:
This command is used to find a directory containing the named file. A cache entry named by <VAR> is created to store the result of this command. If the file in a directory is found the result is stored in the variable and the search will not be repeated unless the variable is cleared. If nothing is found, the result will be <VAR>-NOTFOUND, and the search will be attempted again the next time find_path is invoked with the same variable. The name of the file in a directory that is searched for is specified by the names listed after the NAMES argument. Additional search locations can be specified after the PATHS argument. If ENV var is found in the PATHS section the environment variable var will be read and converted from a system environment variable to a cmake style list of paths. For example ENV PATH would be a way to list the system path variable. The argument after DOC will be used for the documentation string in the cache. PATH_SUFFIXES can be used to give sub directories that will be appended to the search paths.
If NO_DEFAULT_PATH is specified, then no additional paths are added to the search. If NO_DEFAULT_PATH is not specified, the search process is as follows:
1. Search cmake specific environment variables. This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
<prefix>/include for each <prefix> in CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_FRAMEWORK_PATH
!
2. Search cmake variables with the same names as the cmake specific environment variables. These are intended to be used on the command line with a -DVAR=value. This can be skipped if NO_CMAKE_PATH is passed.
<prefix>/include for each <prefix> in CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_FRAMEWORK_PATH
!
3. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
PATH INCLUDE
!
4. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
<prefix>/include for each <prefix> in CMAKE_SYSTEM_PREFIX_PATH CMAKE_SYSTEM_INCLUDE_PATH CMAKE_SYSTEM_FRAMEWORK_PATH
!
5. Search the paths specified after PATHS or in the short-hand version of the command.
On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
"FIRST" - Try to find frameworks before standard libraries or headers. This is the default on Darwin. "LAST" - Try to find frameworks after standard libraries or headers. "ONLY" - Only try to find frameworks. "NEVER". - Never try to find frameworks.
On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
"FIRST" - Try to find application bundles before standard programs. This is the default on Darwin. "LAST" - Try to find application bundles after standard programs. "ONLY" - Only try to find application bundles. "NEVER". - Never try to find application bundles.
!
The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_INCLUDE. This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
The reason the paths listed in the call to the command are searched last is that most users of CMake would expect things to be found first in the locations specified by their environment. Projects may override this behavior by simply calling the command twice:
find_path(<VAR> NAMES name PATHS paths... NO_DEFAULT_PATH) find_path(<VAR> NAMES name)
!
Once one of these calls succeeds the result variable will be set and stored in the cache so that neither call will search again.
When searching for frameworks, if the file is specified as A/b.h, then the framework search will look for A.framework/Headers/b.h. If that is found the path will be set to the path to the framework. CMake will convert this to the correct -F option to include the file.
This command is used to find a program. A cache entry named by <VAR> is created to store the result of this command. If the program is found the result is stored in the variable and the search will not be repeated unless the variable is cleared. If nothing is found, the result will be <VAR>-NOTFOUND, and the search will be attempted again the next time find_program is invoked with the same variable. The name of the program that is searched for is specified by the names listed after the NAMES argument. Additional search locations can be specified after the PATHS argument. If ENV var is found in the PATHS section the environment variable var will be read and converted from a system environment variable to a cmake style list of paths. For example ENV PATH would be a way to list the system path variable. The argument after DOC will be used for the documentation string in the cache. PATH_SUFFIXES can be used to give sub directories that will be appended to the search paths.
If NO_DEFAULT_PATH is specified, then no additional paths are added to the search. If NO_DEFAULT_PATH is not specified, the search process is as follows:
1. Search cmake specific environment variables. This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
<prefix>/[s]bin for each <prefix> in CMAKE_PREFIX_PATH CMAKE_PROGRAM_PATH CMAKE_APPBUNDLE_PATH
!
2. Search cmake variables with the same names as the cmake specific environment variables. These are intended to be used on the command line with a -DVAR=value. This can be skipped if NO_CMAKE_PATH is passed.
<prefix>/[s]bin for each <prefix> in CMAKE_PREFIX_PATH CMAKE_PROGRAM_PATH CMAKE_APPBUNDLE_PATH
!
3. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
PATH
!
4. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
<prefix>/[s]bin for each <prefix> in CMAKE_SYSTEM_PREFIX_PATH CMAKE_SYSTEM_PROGRAM_PATH CMAKE_SYSTEM_APPBUNDLE_PATH
!
5. Search the paths specified after PATHS or in the short-hand version of the command.
On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
"FIRST" - Try to find frameworks before standard libraries or headers. This is the default on Darwin. "LAST" - Try to find frameworks after standard libraries or headers. "ONLY" - Only try to find frameworks. "NEVER". - Never try to find frameworks.
On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
"FIRST" - Try to find application bundles before standard programs. This is the default on Darwin. "LAST" - Try to find application bundles after standard programs. "ONLY" - Only try to find application bundles. "NEVER". - Never try to find application bundles.
!
The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_PROGRAM. This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
The reason the paths listed in the call to the command are searched last is that most users of CMake would expect things to be found first in the locations specified by their environment. Projects may override this behavior by simply calling the command twice:
find_program(<VAR> NAMES name PATHS paths... NO_DEFAULT_PATH) find_program(<VAR> NAMES name)
!
Once one of these calls succeeds the result variable will be set and stored in the cache so that neither call will search again.
--- 455,492 ----
in order to find a package. Package maintainers providing CMake package configuration files are encouraged to name and install them such that the procedure outlined below will find them without requiring use of additional options.
CMake constructs a set of possible installation prefixes for the package. Under each prefix several directories are searched for a configuration file. The tables below show the directories searched. Each entry is meant for installation trees following Windows (W), UNIX (U), or Apple (A) conventions.
On systems supporting OS X Frameworks and Application Bundles the following directories are searched for frameworks or bundles containing a configuration file:
In all cases the <name> is treated as case-insensitive and corresponds to any of the names specified (<package> or names given by NAMES). If PATH_SUFFIXES is specified the suffixes are appended to each (W) or (U) directory entry one-by-one.
This set of directories is intended to work in cooperation with projects that provide configuration files in their installation trees. Directories above marked with (W) are intended for installations on Windows where the prefix may point at the top of an application's installation directory. Those marked with (U) are intended for installations on UNIX platforms where the prefix is shared by multiple packages. This is merely a convention, so all (W) and (U) directories are still searched on all platforms. Directories marked with (A) are intended for installations on Apple platforms. The cmake variables CMAKE_FIND_FRAMEWORK and CMAKE_FIND_APPBUNDLE determine the order of preference as specified below.
The set of installation prefixes is constructed using the following steps. If NO_DEFAULT_PATH is specified all NO_* options are enabled.
1. Search paths specified in cmake-specific cache variables. These are intended to be used on the command line with a -DVAR=value. This can be skipped if NO_CMAKE_PATH is passed.
2. Search paths specified in cmake-specific environment variables. These are intended to be set in the user's shell configuration. This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
3. Search paths specified by the HINTS option. These should be paths computed by system introspection, such as a hint provided by the location of another item already found. Hard-coded guesses should be specified with the PATHS option.
4. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is passed. Path entries ending in "/bin" or "/sbin" are automatically converted to their parent directories.
PATH
!
5. Search project build trees recently configured in a CMake GUI. This can be skipped if NO_CMAKE_BUILDS_PATH is passed. It is intended for the case when a user is building multiple dependent projects one after another.
6. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
7. Search paths specified by the PATHS option. These are typically hard-coded guesses.
On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
"FIRST" - Try to find frameworks before standard libraries or headers. This is the default on Darwin. "LAST" - Try to find frameworks after standard libraries or headers. "ONLY" - Only try to find frameworks. "NEVER". - Never try to find frameworks.
On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
"FIRST" - Try to find application bundles before standard programs. This is the default on Darwin. "LAST" - Try to find application bundles after standard programs. "ONLY" - Only try to find application bundles. "NEVER". - Never try to find application bundles.
!
The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_PACKAGE. This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
The default search order is designed to be most-specific to least-specific for common use cases. Projects may override the order by simply calling the command multiple times and using the NO_* options:
This command is used to find a directory containing the named file. A cache entry named by <VAR> is created to store the result of this command. If the file in a directory is found the result is stored in the variable and the search will not be repeated unless the variable is cleared. If nothing is found, the result will be <VAR>-NOTFOUND, and the search will be attempted again the next time find_path is invoked with the same variable. The name of the file in a directory that is searched for is specified by the names listed after the NAMES argument. Additional search locations can be specified after the PATHS argument. If ENV var is found in the HINTS or PATHS section the environment variable var will be read and converted from a system environment variable to a cmake style list of paths. For example ENV PATH would be a way to list the system path variable. The argument after DOC will be used for the documentation string in the cache. PATH_SUFFIXES can be used to give sub directories that will be appended to the search paths.
If NO_DEFAULT_PATH is specified, then no additional paths are added to the search. If NO_DEFAULT_PATH is not specified, the search process is as follows:
1. Search paths specified in cmake-specific cache variables. These are intended to be used on the command line with a -DVAR=value. This can be skipped if NO_CMAKE_PATH is passed.
<prefix>/include for each <prefix> in CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_FRAMEWORK_PATH
!
2. Search paths specified in cmake-specific environment variables. These are intended to be set in the user's shell configuration. This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
<prefix>/include for each <prefix> in CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_FRAMEWORK_PATH
!
3. Search the paths specified by the HINTS option. These should be paths computed by system introspection, such as a hint provided by the location of another item already found. Hard-coded guesses should be specified with the PATHS option.
4. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
PATH INCLUDE
!
5. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
<prefix>/include for each <prefix> in CMAKE_SYSTEM_PREFIX_PATH CMAKE_SYSTEM_INCLUDE_PATH CMAKE_SYSTEM_FRAMEWORK_PATH
!
6. Search the paths specified by the PATHS option or in the short-hand version of the command. These are typically hard-coded guesses.
On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
"FIRST" - Try to find frameworks before standard libraries or headers. This is the default on Darwin. "LAST" - Try to find frameworks after standard libraries or headers. "ONLY" - Only try to find frameworks. "NEVER". - Never try to find frameworks.
On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
"FIRST" - Try to find application bundles before standard programs. This is the default on Darwin. "LAST" - Try to find application bundles after standard programs. "ONLY" - Only try to find application bundles. "NEVER". - Never try to find application bundles.
!
The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_INCLUDE. This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
The default search order is designed to be most-specific to least-specific for common use cases. Projects may override the order by simply calling the command multiple times and using the NO_* options:
find_path(<VAR> NAMES name PATHS paths... NO_DEFAULT_PATH) find_path(<VAR> NAMES name)
!
Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.
When searching for frameworks, if the file is specified as A/b.h, then the framework search will look for A.framework/Headers/b.h. If that is found the path will be set to the path to the framework. CMake will convert this to the correct -F option to include the file.
This command is used to find a program. A cache entry named by <VAR> is created to store the result of this command. If the program is found the result is stored in the variable and the search will not be repeated unless the variable is cleared. If nothing is found, the result will be <VAR>-NOTFOUND, and the search will be attempted again the next time find_program is invoked with the same variable. The name of the program that is searched for is specified by the names listed after the NAMES argument. Additional search locations can be specified after the PATHS argument. If ENV var is found in the HINTS or PATHS section the environment variable var will be read and converted from a system environment variable to a cmake style list of paths. For example ENV PATH would be a way to list the system path variable. The argument after DOC will be used for the documentation string in the cache. PATH_SUFFIXES can be used to give sub directories that will be appended to the search paths.
If NO_DEFAULT_PATH is specified, then no additional paths are added to the search. If NO_DEFAULT_PATH is not specified, the search process is as follows:
1. Search paths specified in cmake-specific cache variables. These are intended to be used on the command line with a -DVAR=value. This can be skipped if NO_CMAKE_PATH is passed.
<prefix>/[s]bin for each <prefix> in CMAKE_PREFIX_PATH CMAKE_PROGRAM_PATH CMAKE_APPBUNDLE_PATH
!
2. Search paths specified in cmake-specific environment variables. These are intended to be set in the user's shell configuration. This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
<prefix>/[s]bin for each <prefix> in CMAKE_PREFIX_PATH CMAKE_PROGRAM_PATH CMAKE_APPBUNDLE_PATH
!
3. Search the paths specified by the HINTS option. These should be paths computed by system introspection, such as a hint provided by the location of another item already found. Hard-coded guesses should be specified with the PATHS option.
4. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
PATH
!
5. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
<prefix>/[s]bin for each <prefix> in CMAKE_SYSTEM_PREFIX_PATH CMAKE_SYSTEM_PROGRAM_PATH CMAKE_SYSTEM_APPBUNDLE_PATH
!
6. Search the paths specified by the PATHS option or in the short-hand version of the command. These are typically hard-coded guesses.
On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
"FIRST" - Try to find frameworks before standard libraries or headers. This is the default on Darwin. "LAST" - Try to find frameworks after standard libraries or headers. "ONLY" - Only try to find frameworks. "NEVER". - Never try to find frameworks.
On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
"FIRST" - Try to find application bundles before standard programs. This is the default on Darwin. "LAST" - Try to find application bundles after standard programs. "ONLY" - Only try to find application bundles. "NEVER". - Never try to find application bundles.
!
The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_PROGRAM. This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
The default search order is designed to be most-specific to least-specific for common use cases. Projects may override the order by simply calling the command multiple times and using the NO_* options:
find_program(<VAR> NAMES name PATHS paths... NO_DEFAULT_PATH) find_program(<VAR> NAMES name)
!
Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.
***************
*** 500,504 ****
get_cmake_property: Get a property of the CMake instance.
get_cmake_property(VAR property)
!
Get a property from the CMake instance. The value of the property is stored in the variable VAR. If the property is not found, CMake will report an error. Some supported properties include: VARIABLES, CACHE_VARIABLES, COMMANDS, and MACROS.
--- 508,512 ----
get_cmake_property: Get a property of the CMake instance.
get_cmake_property(VAR property)
!
Get a property from the CMake instance. The value of the property is stored in the variable VAR. If the property is not found, CMake will report an error. Some supported properties include: VARIABLES, CACHE_VARIABLES, COMMANDS, MACROS, and COMPONENTS.
FIND_LIBRARY_USE_LIB64_PATHS is a boolean specifying whether the FIND_LIBRARY command should automatically search the lib64 variant of directories called lib in the search path when building 64-bit binaries.
***************
*** 813,817 ****
+ CACHE_VARIABLES: List of cache variables available in the current directory.
+
This read-only property specifies the list of CMake cache variables currently defined. It is intended for debugging purposes.
+
+
CLEAN_NO_CUSTOM: Should the output of custom commands be left.
If this is true then the outputs of custom commands for this directory will not be removed during the "make clean" stage.
***************
*** 832,850 ****
EXCLUDE_FROM_ALL: Exclude the directory from the all target of its parent.
A property on a directory that indicates if its targets are excluded from the default build target. If it is not, then with a Makefile for example typing make will cause the targets to be built. The same concept applies to the default build of other generators.
LISTFILE_STACK: The current stack of listfiles being processed.
This property is mainly useful when trying to debug errors in your CMake scripts. It returns a list of what list files are currently being processed, in order. So if one listfile does an INCLUDE command then that is effectively pushing the included listfile onto the stack.
TEST_INCLUDE_FILE: A cmake file that will be included when ctest is run.
If you specify TEST_INCLUDE_FILE, that file will be included and processed when ctest is run on the directory.
+ DEFINITIONS: For CMake 2.4 compatibility only. Use COMPILE_DEFINITIONS instead.
+
This read-only property specifies the list of flags given so far to the add_definitions command. It is intended for debugging purposes. Use the COMPILE_DEFINITIONS instead.
+
+
EXCLUDE_FROM_ALL: Exclude the directory from the all target of its parent.
A property on a directory that indicates if its targets are excluded from the default build target. If it is not, then with a Makefile for example typing make will cause the targets to be built. The same concept applies to the default build of other generators.
This property specifies rules to transform macro-like #include lines during implicit dependency scanning of C and C++ source files. The list of rules must be semicolon-separated with each entry of the form "A_MACRO(%)=value-with-%" (the % must be literal). During dependency scanning occurrences of A_MACRO(...) on #include lines will be replaced by the value given with the macro argument substituted for '%'. For example, the entry
MYDIR(%)=<mydir/%>
+
will convert lines of the form
#include MYDIR(myheader.h)
+
to
#include <mydir/myheader.h>
+
allowing the dependency to be followed.
This property applies to sources in all targets within a directory. The property value is initialized in each directory by its value in the directory's parent.
+
+
+ INCLUDE_DIRECTORIES: List of preprocessor include file search directories.
+
This read-only property specifies the list of directories given so far to the include_directories command. It is intended for debugging purposes.
+
This read-only property specifies the regular expression used during dependency scanning to match include files that should be followed. See the include_regular_expression command.
+
This read-only property specifies the list of directories given so far to the link_directories command. It is intended for debugging purposes.
+
+
LISTFILE_STACK: The current stack of listfiles being processed.
This property is mainly useful when trying to debug errors in your CMake scripts. It returns a list of what list files are currently being processed, in order. So if one listfile does an INCLUDE command then that is effectively pushing the included listfile onto the stack.
+ MACROS: List of macro commands available in the current directory.
+
This read-only property specifies the list of CMake macros currently defined. It is intended for debugging purposes. See the macro command.
+
+
+ PARENT_DIRECTORY: Source directory that added current subdirectory.
+
This read-only property specifies the source directory that added the current source directory as a subdirectory of the build. In the top-level directory the value is the empty-string.
+
+
TEST_INCLUDE_FILE: A cmake file that will be included when ctest is run.
If you specify TEST_INCLUDE_FILE, that file will be included and processed when ctest is run on the directory.
+
+ VARIABLES: List of variables defined in the current directory.
+
This read-only property specifies the list of CMake variables currently defined. It is intended for debugging purposes.
+
This property specifies rules to transform macro-like #include lines during implicit dependency scanning of C and C++ source files. The list of rules must be semicolon-separated with each entry of the form "A_MACRO(%)=value-with-%" (the % must be literal). During dependency scanning occurrences of A_MACRO(...) on #include lines will be replaced by the value given with the macro argument substituted for '%'. For example, the entry
MYDIR(%)=<mydir/%>
+
will convert lines of the form
#include MYDIR(myheader.h)
+
to
#include <mydir/myheader.h>
+
allowing the dependency to be followed.
This property applies to sources in the target on which it is set.
+
+
IMPORTED: Read-only indication of whether a target is IMPORTED.
The boolean value of this property is true for targets created with the IMPORTED option to add_executable or add_library. It is false for targets built within the project.
***************
*** 1014,1019 ****
MACOSX_BUNDLE: Build an executable as an application bundle on Mac OS X.
!
When this property is set to true the executable when built on Mac OS X will be created as an application bundle. This makes it a GUI executable that can be launched from the Finder.
The bundle Info.plist file is generated automatically. The following target properties may be set to specify its content: MACOSX_BUNDLE_INFO_STRING
MACOSX_BUNDLE: Build an executable as an application bundle on Mac OS X.
!
When this property is set to true the executable when built on Mac OS X will be created as an application bundle. This makes it a GUI executable that can be launched from the Finder. See the MACOSX_BUNDLE_INFO_PLIST target property for information about creation of the Info.plist file for the application bundle.
!
An executable target with MACOSX_BUNDLE enabled will be built as an application bundle on Mac OS X. By default its Info.plist file is created by configuring a template called MacOSXBundleInfo.plist.in located in the CMAKE_MODULE_PATH. This property specifies an alternative template file name which may be a full path.
The following target properties may be set to specify content to be configured into the file:
CMake variables of the same name may be set to affect all targets in a directory that do not have each specific property set. If a custom Info.plist is specified by this property it may of course hard-code all the settings instead of using the target properties.
Default output files will be CPackConfig.cmake and CPackSourceConfig.cmake. This can be overwritten with CPACK_OUTPUT_CONFIG_FILE and CPACK_SOURCE_OUTPUT_CONFIG_FILE.
--- 1384,1467 ----
! 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.
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.
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.
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.
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:
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.
!
***************
*** 1372,1376 ****
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
!
--- 1512,1516 ----
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
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
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
***************
*** 1469,1473 ****
FindBoost: Try to find Boost include dirs and libraries
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.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 Boost_ADDITIONAL_VERSIONS variable
Variables used by this module, they can change the default behaviour and need to be set before calling find_package:
Boost_USE_MULTITHREAD Can be set to OFF to use the non-multithreaded boost libraries. Defaults to ON. Boost_USE_STATIC_LIBS Can be set to ON to force the use of the static boost libraries. Defaults to OFF. Boost_ADDITIONAL_VERSIONS A list of version numbers to use for searching the boost include directory. The default list of version numbers is: 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.0, 1.36.1 If you want to look for an older or newer version set this variable to a list of strings, where each string contains a number, i.e. SET(Boost_ADDITIONAL_VERSIONS "0.99.0" "1.35.0") BOOST_ROOT Preferred installation prefix for searching for Boost, set this if the module has problems finding the proper Boost installation BOOST_INCLUDEDIR Set this to the include directory of Boost, if the module has problems finding the proper Boost installation BOOST_LIBRARYDIR Set this to the lib directory of Boost, if the module has problems finding the proper Boost installation
The last three variables are available also as environment variables
Variables defined by this module:
Boost_FOUND System has Boost, this means the include dir was found, as well as all the libraries specified in the COMPONENTS list Boost_INCLUDE_DIRS Boost include directories, not cached Boost_INCLUDE_DIR This is almost the same as above, but this one is cached and may be modified by advanced users Boost_LIBRARIES Link these to use the Boost libraries that you specified, not cached Boost_LIBRARY_DIRS The path to where the Boost library files are. Boost_VERSION The version number of the boost libraries that have been found, same as in version.hpp from Boost Boost_LIB_VERSION The version number in filename form as its appended to the library filenames Boost_MAJOR_VERSION major version number of boost Boost_MINOR_VERSION minor version number of boost Boost_SUBMINOR_VERSION subminor version number of boost Boost_LIB_DIAGNOSTIC_DEFINITIONS Only set on windows. Can be used with add_definitions to print diagnostic information about the automatic linking done on windows.
--- 1609,1613 ----
FindBoost: Try to find Boost include dirs and libraries
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 Boost_ADDITIONAL_VERSIONS variable
Variables used by this module, they can change the default behaviour and need to be set before calling find_package:
Boost_USE_MULTITHREAD Can be set to OFF to use the non-multithreaded boost libraries. Defaults to ON. Boost_USE_STATIC_LIBS Can be set to ON to force the use of the static boost libraries. Defaults to OFF. Boost_ADDITIONAL_VERSIONS A list of version numbers to use for searching the boost include directory. The default list of version numbers is: 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 If you want to look for an older or newer version set this variable to a list of strings, where each string contains a number, i.e. SET(Boost_ADDITIONAL_VERSIONS "0.99.0" "1.35.0") BOOST_ROOT or BOOSTROOT Preferred installation prefix for searching for Boost, set this if the module has problems finding the proper Boost installation BOOST_INCLUDEDIR Set this to the include directory of Boost, if the module has problems finding the proper Boost installation BOOST_LIBRARYDIR Set this to the lib directory of Boost, if the module has problems finding the proper Boost installation
The last three variables are available also as environment variables
Variables defined by this module:
Boost_FOUND System has Boost, this means the include dir was found, as well as all the libraries specified in the COMPONENTS list Boost_INCLUDE_DIRS Boost include directories, not cached Boost_INCLUDE_DIR This is almost the same as above, but this one is cached and may be modified by advanced users Boost_LIBRARIES Link these to use the Boost libraries that you specified, not cached Boost_LIBRARY_DIRS The path to where the Boost library files are. Boost_VERSION The version number of the boost libraries that have been found, same as in version.hpp from Boost Boost_LIB_VERSION The version number in filename form as its appended to the library filenames Boost_MAJOR_VERSION major version number of boost Boost_MINOR_VERSION minor version number of boost Boost_SUBMINOR_VERSION subminor version number of boost Boost_LIB_DIAGNOSTIC_DEFINITIONS Only set on windows. Can be used with add_definitions to print diagnostic information about the automatic linking done on windows.
This module finds if ImageMagick tools are installed and determines where the executables are. This code sets the following variables:
IMAGEMAGICK_CONVERT_EXECUTABLE = the full path to the 'convert' utility IMAGEMAGICK_MOGRIFY_EXECUTABLE = the full path to the 'mogrify' utility IMAGEMAGICK_IMPORT_EXECUTABLE = the full path to the 'import' utility IMAGEMAGICK_MONTAGE_EXECUTABLE = the full path to the 'montage' utility IMAGEMAGICK_COMPOSITE_EXECUTABLE = the full path to the 'composite' utility
This module finds if Java is installed and determines where the include files and libraries are. It also determines what the name of the library is. This code sets the following variables:
JAVA_AWT_LIB_PATH = the path to the jawt library JAVA_JVM_LIB_PATH = the path to the jvm library JAVA_INCLUDE_PATH = the include path to jni.h JAVA_INCLUDE_PATH2 = the include path to jni_md.h JAVA_AWT_INCLUDE_PATH = the include path to jawt.h
This module will search for a set of ImageMagick tools specified as components in the FIND_PACKAGE call. Typical components include, but are not limited to (future versions of ImageMagick might have additional components not listed here):
If no component is specified in the FIND_PACKAGE call, then it only searches for the ImageMagick executable directory. This code defines the following variables:
ImageMagick_FOUND - TRUE if all components are found. ImageMagick_EXECUTABLE_DIR - Full path to executables directory. ImageMagick_<component>_FOUND - TRUE if <component> is found. ImageMagick_<component>_EXECUTABLE - Full path to <component> executable.
!
There are also components for the following ImageMagick APIs:
Magick++ MagickWand Magick
!
For these components the following variables are set:
ImageMagick_FOUND - TRUE if all components are found. ImageMagick_INCLUDE_DIRS - Full paths to all include dirs. ImageMagick_LIBRARIES - Full paths to all libraries. ImageMagick_<component>_FOUND - TRUE if <component> is found. ImageMagick_<component>_INCLUDE_DIRS - Full path to <component> include dirs. ImageMagick_<component>_LIBRARIES - Full path to <component> libraries.
This module finds if Java is installed and determines where the include files and libraries are. It also determines what the name of the library is. This code sets the following variables:
JNI_INCLUDE_DIRS = the include dirs to use JNI_LIBRARIES = the libraries to use JAVA_AWT_LIBRARY = the path to the jawt library JAVA_JVM_LIBRARY = the path to the jvm library JAVA_INCLUDE_PATH = the include path to jni.h JAVA_INCLUDE_PATH2 = the include path to jni_md.h JAVA_AWT_INCLUDE_PATH = the include path to jawt.h
LAPACK_FOUND - set to true if a library implementing the LAPACK interface is found LAPACK_LINKER_FLAGS - uncached list of required linker flags (excluding -l and -L). LAPACK_LIBRARIES - uncached list of libraries (using full path name) to link against to use LAPACK LAPACK95_LIBRARIES - uncached list of libraries (using full path name) to link against to use LAPACK95
LAPACK_FOUND - set to true if a library implementing the LAPACK interface is found LAPACK_LINKER_FLAGS - uncached list of required linker flags (excluding -l and -L). LAPACK_LIBRARIES - uncached list of libraries (using full path name) to link against to use LAPACK LAPACK95_LIBRARIES - uncached list of libraries (using full path name) to link against to use LAPACK95 LAPACK95_FOUND - set to true if a library implementing the LAPACK 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 # Intel(mkl), ACML,Apple, NAS, Generic
***************
*** 1880,1884 ****
If the command line client executable is found the macro
Subversion_WC_INFO(<dir> <var-prefix>)
is defined to extract information of a subversion working copy at a given location. The macro defines the following variables:
<var-prefix>_WC_URL - url of the repository (at <dir>) <var-prefix>_WC_ROOT - root url of the repository <var-prefix>_WC_REVISION - current revision <var-prefix>_WC_LAST_CHANGED_AUTHOR - author of last commit <var-prefix>_WC_LAST_CHANGED_DATE - date of last commit <var-prefix>_WC_LAST_CHANGED_REV - revision of last commit <var-prefix>_WC_LAST_CHANGED_LOG - last log of base revision <var-prefix>_WC_INFO - output of command `svn info <dir>'
!
Example usage:
FIND_PACKAGE(Subversion) IF(Subversion_FOUND) Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Project) MESSAGE("Current revision is ${Project_WC_REVISION}") ENDIF(Subversion_FOUND)
--- 2024,2028 ----
If the command line client executable is found the macro
Subversion_WC_INFO(<dir> <var-prefix>)
is defined to extract information of a subversion working copy at a given location. The macro defines the following variables:
<var-prefix>_WC_URL - url of the repository (at <dir>) <var-prefix>_WC_ROOT - root url of the repository <var-prefix>_WC_REVISION - current revision <var-prefix>_WC_LAST_CHANGED_AUTHOR - author of last commit <var-prefix>_WC_LAST_CHANGED_DATE - date of last commit <var-prefix>_WC_LAST_CHANGED_REV - revision of last commit <var-prefix>_WC_LAST_CHANGED_LOG - last log of base revision <var-prefix>_WC_INFO - output of command `svn info <dir>'
!
Example usage:
FIND_PACKAGE(Subversion) IF(Subversion_FOUND) Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Project) MESSAGE("Current revision is ${Project_WC_REVISION}") Subversion_WC_LOG(${PROJECT_SOURCE_DIR} Project) MESSAGE("Last changed log is ${Project_LAST_CHANGED_LOG}") ENDIF(Subversion_FOUND)
This policy determines whether the list command will ignore empty elements in the list. CMake 2.4 and below list commands ignored all empty elements in the list. For example, a;b;;c would have length 3 and not 4. The OLD behavior for this policy is to ignore empty list elements. The NEW behavior for this policy is to correctly count empty elements in a list.
This policy was introduced in CMake version 2.6.0. CMake version 2.6 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
+
+ CMP0008: Libraries linked by full-path must have a valid library file name.
+
In CMake 2.4 and below it is possible to write code like
where "somelib" is supposed to be a valid library file name such as "libsomelib.a" or "somelib.lib". For Makefile generators this produces an error at build time because the dependency on the full path cannot be found. For VS IDE and Xcode generators this used to work by accident because CMake would always split off the library directory and ask the linker to search for the library by name (-lsomelib or somelib.lib). Despite the failure with Makefiles, some projects have code like this and build only with VS and/or Xcode. This version of CMake prefers to pass the full path directly to the native build tool, which will fail in this case because it does not name a valid library file.
This policy determines what to do with full paths that do not appear to name a valid library file. The OLD behavior for this policy is to split the library name from the path and ask the linker to search for it. The NEW behavior for this policy is to trust the given path and pass it directly to the native build tool unchanged.
This policy was introduced in CMake version 2.6.1. CMake version 2.6 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
+
This specifies what prefixes to add to library names when the find_library command looks for libraries. On UNIX systems this is typically lib, meaning that when trying to find the foo library it will look for libfoo.
--- 2330,2333 ----
***************
*** 2193,2200 ****
--- 2338,2353 ----
+ CMAKE_INCLUDE_PATH: Path used for searching by FIND_FILE() and FIND_PATH().
+
Specifies a path which will be used both by FIND_FILE() and FIND_PATH(). Both commands will check each of the contained directories for the existence of the file which is currently searched. By default it is empty, it is intended to be set by the project. See also CMAKE_SYSTEM_INCLUDE_PATH, CMAKE_PREFIX_PATH.
+
If "make install" is invoked or INSTALL is built, this directory is pre-pended onto all install directories. This variable defaults to /usr/local on UNIX and c:/Program Files on Windows.
Specifies a path which will be used by FIND_LIBRARY(). FIND_LIBRARY() will check each of the contained directories for the existence of the library which is currently searched. By default it is empty, it is intended to be set by the project. See also CMAKE_SYSTEM_LIBRARY_PATH, CMAKE_PREFIX_PATH.
+
+
CMAKE_MFC_FLAG: Tell cmake to use MFC for an executable or dll.
This can be set in a CMakeLists.txt file and will enable MFC in the application. It should be set to 1 for static the static MFC library, and 2 for the shared MFC library. This is used in visual studio 6 and 7 project files. The CMakeSetup dialog uses MFC and the CMakeLists.txt looks like this:
+ CMAKE_PREFIX_PATH: Path used for searching by FIND_XXX(), with appropriate suffixes added.
+
Specifies a path which will be used by the FIND_XXX() commands. It contains the "base" directories, the FIND_XXX() commands append appropriate subdirectories to the base directories. So FIND_PROGRAM() adds /bin to each of the directories in the path, FIND_LIBRARY() appends /lib to each of the directories, and FIND_PATH() and FIND_FILE() append /include . By default it is empty, it is intended to be set by the project. See also CMAKE_SYSTEM_PREFIX_PATH, CMAKE_INCLUDE_PATH, CMAKE_LIBRARY_PATH, CMAKE_PROGRAM_PATH.
+
Specifies a path which will be used by FIND_PROGRAM(). FIND_PROGRAM() will check each of the contained directories for the existence of the program which is currently searched. By default it is empty, it is intended to be set by the project. See also CMAKE_SYSTEM_PROGRAM_PATH, CMAKE_PREFIX_PATH.
+
Specifies a path which will be used both by FIND_FILE() and FIND_PATH(). Both commands will check each of the contained directories for the existence of the file which is currently searched. By default it contains the standard directories for the current system. It is NOT intended to be modified by the project, use CMAKE_INCLUDE_PATH for this. See also CMAKE_SYSTEM_PREFIX_PATH.
+
Specifies a path which will be used by FIND_LIBRARY(). FIND_LIBRARY() will check each of the contained directories for the existence of the library which is currently searched. By default it contains the standard directories for the current system. It is NOT intended to be modified by the project, use CMAKE_SYSTEM_LIBRARY_PATH for this. See also CMAKE_SYSTEM_PREFIX_PATH.
+
+
+ CMAKE_SYSTEM_PREFIX_PATH: Path used for searching by FIND_XXX(), with appropriate suffixes added.
+
Specifies a path which will be used by the FIND_XXX() commands. It contains the "base" directories, the FIND_XXX() commands append appropriate subdirectories to the base directories. So FIND_PROGRAM() adds /bin to each of the directories in the path, FIND_LIBRARY() appends /lib to each of the directories, and FIND_PATH() and FIND_FILE() append /include . By default this contains the standard directories for the current system. It is NOT intended to be modified by the project, use CMAKE_PREFIX_PATH for this. See also CMAKE_SYSTEM_INCLUDE_PATH, CMAKE_SYSTEM_LIBRARY_PATH, CMAKE_SYSTEM_PROGRAM_PATH.
+
Specifies a path which will be used by FIND_PROGRAM(). FIND_PROGRAM() will check each of the contained directories for the existence of the program which is currently searched. By default it contains the standard directories for the current system. It is NOT intended to be modified by the project, use CMAKE_PROGRAM_PATH for this. See also CMAKE_SYSTEM_PREFIX_PATH.
+
If this variable is set, it should to point to a CMakeLists.txt file that will be read in by CMake after all the system settings have been set, but before they have been used. This would allow you to override any variables that need to be changed for some special project.
***************
*** 2490,2494 ****
This is the full path to the CTest executable ctest which is useful from custom commands that want to use the cmake -E option for portable system commands.
Index: Download.html
===================================================================
RCS file: /cvsroot/CMake/CMakeWeb/HTML/Download.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -C 2 -d -r1.6 -r1.7
*** Download.html 6 May 2008 18:16:17 -0000 1.6
--- Download.html 1 Aug 2008 16:50:29 -0000 1.7
***************
*** 88,99 ****
distribution through CVS. You can also download high-resolution logos.
The 2.6.0 release was packaged with CPack which is included as part of the 2.6.0 release. The .sh files
are self extracting gziped tar files. To install a .sh file, run it with /bin/sh and follow the directions.
The OS-machine.tar.gz files are gziped tar files of the install tree.
The OS-machine.tar.Z files are compressed tar files of the install tree. The tar file distributions can
be untared in any directory. They are prefixed by the version of CMake. For example, the SunOS-sparc tar file is all
! under the directory cmake-2.6.0-SunOS-sparc. This prefix can be removed as long as the share, bin, man and doc
directories are moved relative to each other.
To build the source distributions, unpack them with zip or tar and follow the instructions in Readme.txt at
--- 88,99 ----
distribution through CVS. You can also download high-resolution logos.
The 2.6.1 release was packaged with CPack which is included as part of the 2.6.1 release. The .sh files
are self extracting gziped tar files. To install a .sh file, run it with /bin/sh and follow the directions.
The OS-machine.tar.gz files are gziped tar files of the install tree.
The OS-machine.tar.Z files are compressed tar files of the install tree. The tar file distributions can
be untared in any directory. They are prefixed by the version of CMake. For example, the SunOS-sparc tar file is all
! under the directory cmake-2.6.1-SunOS-sparc. This prefix can be removed as long as the share, bin, man and doc
directories are moved relative to each other.
To build the source distributions, unpack them with zip or tar and follow the instructions in Readme.txt at
***************
*** 105,112 ****
The 2.6.0 release was packaged with CPack which is included as part of the 2.6.0 release.
The .sh files are self extracting gziped tar files. To install a .sh file, run it with /bin/sh and follow the directions.
The OS-machine.tar.gz files are gziped tar files of the install tree.
The OS-machine.tar.Z files are compressed tar files of the install tree.
The tar file distributions can be untared in any directory. They are prefixed by the version of CMake.
! For example, the SunOS-sparc tar file is all under the directory cmake-2.6.0-SunOS-sparc.
This prefix can be removed as long as the share, bin, man and doc directories are moved relative to each other.
To build the source distributions, unpack them with zip or tar and follow the instructions in Readme.txt at the top of the source tree
--- 140,151 ----
!
Latest Release (2.6.1)
!
The 2.6.1 release was packaged with CPack which is included as part of the 2.6.1 release.
The .sh files are self extracting gziped tar files. To install a .sh file, run it with /bin/sh and follow the directions.
The OS-machine.tar.gz files are gziped tar files of the install tree.
The OS-machine.tar.Z files are compressed tar files of the install tree.
The tar file distributions can be untared in any directory. They are prefixed by the version of CMake.
! For example, the SunOS-sparc tar file is all under the directory cmake-2.6.1-SunOS-sparc.
This prefix can be removed as long as the share, bin, man and doc directories are moved relative to each other.
To build the source distributions, unpack them with zip or tar and follow the instructions in Readme.txt at the top of the source tree
***************
*** 156,163 ****
Removes a binary directory. This command will perform some checks prior to deleting the directory in an attempt to avoid malicious or accidental directory deletion.
Performs a memory checking of tests in the given build directory and stores results in MemCheck.xml. The second argument is a variable that will hold value.
Runs a script or scripts much like if it was run from ctest -S. If no argument is provided then the current script is run using the current settings of the variables. If NEW_PROCESS is specified then each script will be run in a seperate process.
Starts the testing for a given model. The command should be called after the binary directory is initialized. If the 'source' and 'binary' directory are not specified, it reads the CTEST_SOURCE_DIRECTORY and CTEST_BINARY_DIRECTORY. If the track is specified, the submissions will go to the specified track.
Removes a binary directory. This command will perform some checks prior to deleting the directory in an attempt to avoid malicious or accidental directory deletion.
Performs a memory checking of tests in the given build directory and stores results in MemCheck.xml. The second argument is a variable that will hold value.
Runs a script or scripts much like if it was run from ctest -S. If no argument is provided then the current script is run using the current settings of the variables. If NEW_PROCESS is specified then each script will be run in a seperate process.
Starts the testing for a given model. The command should be called after the binary directory is initialized. If the 'source' and 'binary' directory are not specified, it reads the CTEST_SOURCE_DIRECTORY and CTEST_BINARY_DIRECTORY. If the track is specified, the submissions will go to the specified track.
Updates the given source directory and stores results in Update.xml. The second argument is a variable that will hold the number of files modified. If there is a problem, the variable will be -1.
Updates the given source directory and stores results in Update.xml. The second argument is a variable that will hold the number of files modified. If there is a problem, the variable will be -1.
***************
*** 334,364 ****
find_file: Find the full path to a file.
find_path(<VAR> name1 [path1 path2 ...])
!
This is the short-hand signature for the command that is sufficient in many cases. It is the same as find_path(<VAR> name1 [PATHS path1 path2 ...])
This command is used to find a full path to named file. A cache entry named by <VAR> is created to store the result of this command. If the full path to a file is found the result is stored in the variable and the search will not be repeated unless the variable is cleared. If nothing is found, the result will be <VAR>-NOTFOUND, and the search will be attempted again the next time find_path is invoked with the same variable. The name of the full path to a file that is searched for is specified by the names listed after the NAMES argument. Additional search locations can be specified after the PATHS argument. If ENV var is found in the PATHS section the environment variable var will be read and converted from a system environment variable to a cmake style list of paths. For example ENV PATH would be a way to list the system path variable. The argument after DOC will be used for the documentation string in the cache. PATH_SUFFIXES can be used to give sub directories that will be appended to the search paths.
If NO_DEFAULT_PATH is specified, then no additional paths are added to the search. If NO_DEFAULT_PATH is not specified, the search process is as follows:
1. Search cmake specific environment variables. This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
<prefix>/include for each <prefix> in CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_FRAMEWORK_PATH
!
2. Search cmake variables with the same names as the cmake specific environment variables. These are intended to be used on the command line with a -DVAR=value. This can be skipped if NO_CMAKE_PATH is passed.
<prefix>/include for each <prefix> in CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_FRAMEWORK_PATH
!
3. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
PATH INCLUDE
!
4. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
<prefix>/include for each <prefix> in CMAKE_SYSTEM_PREFIX_PATH CMAKE_SYSTEM_INCLUDE_PATH CMAKE_SYSTEM_FRAMEWORK_PATH
!
5. Search the paths specified after PATHS or in the short-hand version of the command.
On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
"FIRST" - Try to find frameworks before standard libraries or headers. This is the default on Darwin. "LAST" - Try to find frameworks after standard libraries or headers. "ONLY" - Only try to find frameworks. "NEVER". - Never try to find frameworks.
On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
"FIRST" - Try to find application bundles before standard programs. This is the default on Darwin. "LAST" - Try to find application bundles after standard programs. "ONLY" - Only try to find application bundles. "NEVER". - Never try to find application bundles.
!
The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_INCLUDE. This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
The reason the paths listed in the call to the command are searched last is that most users of CMake would expect things to be found first in the locations specified by their environment. Projects may override this behavior by simply calling the command twice:
find_path(<VAR> NAMES name PATHS paths... NO_DEFAULT_PATH) find_path(<VAR> NAMES name)
!
Once one of these calls succeeds the result variable will be set and stored in the cache so that neither call will search again.
This command is used to find a library. A cache entry named by <VAR> is created to store the result of this command. If the library is found the result is stored in the variable and the search will not be repeated unless the variable is cleared. If nothing is found, the result will be <VAR>-NOTFOUND, and the search will be attempted again the next time find_library is invoked with the same variable. The name of the library that is searched for is specified by the names listed after the NAMES argument. Additional search locations can be specified after the PATHS argument. If ENV var is found in the PATHS section the environment variable var will be read and converted from a system environment variable to a cmake style list of paths. For example ENV PATH would be a way to list the system path variable. The argument after DOC will be used for the documentation string in the cache. PATH_SUFFIXES can be used to give sub directories that will be appended to the search paths.
If NO_DEFAULT_PATH is specified, then no additional paths are added to the search. If NO_DEFAULT_PATH is not specified, the search process is as follows:
1. Search cmake specific environment variables. This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
<prefix>/lib for each <prefix> in CMAKE_PREFIX_PATH CMAKE_LIBRARY_PATH CMAKE_FRAMEWORK_PATH
!
2. Search cmake variables with the same names as the cmake specific environment variables. These are intended to be used on the command line with a -DVAR=value. This can be skipped if NO_CMAKE_PATH is passed.
<prefix>/lib for each <prefix> in CMAKE_PREFIX_PATH CMAKE_LIBRARY_PATH CMAKE_FRAMEWORK_PATH
!
3. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
PATH LIB
!
4. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
<prefix>/lib for each <prefix> in CMAKE_SYSTEM_PREFIX_PATH CMAKE_SYSTEM_LIBRARY_PATH CMAKE_SYSTEM_FRAMEWORK_PATH
!
5. Search the paths specified after PATHS or in the short-hand version of the command.
On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
"FIRST" - Try to find frameworks before standard libraries or headers. This is the default on Darwin. "LAST" - Try to find frameworks after standard libraries or headers. "ONLY" - Only try to find frameworks. "NEVER". - Never try to find frameworks.
On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
"FIRST" - Try to find application bundles before standard programs. This is the default on Darwin. "LAST" - Try to find application bundles after standard programs. "ONLY" - Only try to find application bundles. "NEVER". - Never try to find application bundles.
!
The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_LIBRARY. This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
The reason the paths listed in the call to the command are searched last is that most users of CMake would expect things to be found first in the locations specified by their environment. Projects may override this behavior by simply calling the command twice:
find_library(<VAR> NAMES name PATHS paths... NO_DEFAULT_PATH) find_library(<VAR> NAMES name)
!
Once one of these calls succeeds the result variable will be set and stored in the cache so that neither call will search again.
If the library found is a framework, then VAR will be set to the full path to the framework <fullPath>/A.framework. When a full path to a framework is used as a library, CMake will use a -framework A, and a -F<fullPath> to link the framework to the target.
find_package: Load settings for an external project.
Finds and loads settings from an external project. <package>_FOUND will be set to indicate whether the package was found. When the package is found package-specific information is provided through variables documented by the package itself. The QUIET option disables messages if the package cannot be found. The REQUIRED option stops processing with an error message if the package cannot be found. A package-specific list of components may be listed after the REQUIRED option or after the COMPONENTS option if no REQUIRED option is given. The "[major[.minor[.patch]]]" version argument specifies a desired version with which the package found should be compatible. The EXACT option requests that the version be matched exactly. Version support is currently provided only on a package-by-package basis (details below).
User code should generally look for packages using the above simple signature. The remainder of this command documentation specifies the full command signature and details of the search process. Project maintainers wishing to provide a package to be found by this command are encouraged to read on.
The command has two modes by which it searches for packages: "Module" mode and "Config" mode. Module mode is available when the command is invoked with the above reduced signature. CMake searches for a file called "Find<package>.cmake" in the CMAKE_MODULE_PATH followed by the CMake installation. If the file is found, it is read and processed by CMake. It is responsible for finding the package, checking the version, and producing any needed messages. Many find-modules provide limited or no support for versioning; check the module documentation. If no module is found the command proceeds to Config mode.
The NO_MODULE option may be used to skip Module mode explicitly. It is also implied by use of options not specified in the reduced signature.
Config mode attempts to locate a configuration file provided by the package to be found. A cache entry called <package>_DIR is created to hold the directory containing the file. By default the command searches for a package with the name <package>. If the NAMES option is given the names following it are used instead of <package>. The command searches for a file called "<name>Config.cmake" or "<lower-case-name>-config.cmake" for each name specified. A replacement set of possible configuration file names may be given using the CONFIGS option. The search procedure is specified below. Once found, the configuration file is read and processed by CMake. Since the file is provided by the package it already knows the location of package contents. The full path to the configuration file is stored in the cmake variable <package>_CONFIG.
If the package configuration file cannot be found CMake will generate an error describing the problem unless the QUIET argument is specified. If REQUIRED is specified and the package is not found a fatal error is generated and the configure step stops executing. If <package>_DIR has been set to a directory not containing a configuration file a fatal error is always generated because user intervention is required.
When the "[major[.minor[.patch]]]" version argument is specified Config mode will only find a version of the package that claims compatibility with the requested version. If the EXACT option is given only a version of the package claiming an exact match of the requested version may be found. CMake does not establish any convention for the meaning of version numbers. Package version numbers are checked by "version" files provided by the packages themselves. For a candidate package confguration file "<config-file>.cmake" the corresponding version file is located next to it and named either "<config-file>-version.cmake" or "<config-file>Version.cmake". If no such version file is available then the configuration file is assumed to not be compatible with any requested version. When a version file is found it is loaded to check the requested version number. The version file is loaded in a nested scope in which the following variables have been defined:
PACKAGE_FIND_NAME = the <package> name PACKAGE_FIND_VERSION = full requested version string PACKAGE_FIND_VERSION_MAJOR = requested major version, if any PACKAGE_FIND_VERSION_MINOR = requested minor version, if any PACKAGE_FIND_VERSION_PATCH = requested patch version, if any
The version file checks whether it satisfies the requested version and sets these variables:
PACKAGE_VERSION = package version (major[.minor[.patch]]) PACKAGE_VERSION_EXACT = true if version is exact match PACKAGE_VERSION_COMPATIBLE = true if version is compatible
--- 334,364 ----
find_file: Find the full path to a file.
find_path(<VAR> name1 [path1 path2 ...])
!
This is the short-hand signature for the command that is sufficient in many cases. It is the same as find_path(<VAR> name1 [PATHS path1 path2 ...])
This command is used to find a full path to named file. A cache entry named by <VAR> is created to store the result of this command. If the full path to a file is found the result is stored in the variable and the search will not be repeated unless the variable is cleared. If nothing is found, the result will be <VAR>-NOTFOUND, and the search will be attempted again the next time find_path is invoked with the same variable. The name of the full path to a file that is searched for is specified by the names listed after the NAMES argument. Additional search locations can be specified after the PATHS argument. If ENV var is found in the HINTS or PATHS section the environment variable var will be read and converted from a system environment variable to a cmake style list of paths. For example ENV PATH would be a way to list the system path variable. The argument after DOC will be used for the documentation string in the cache. PATH_SUFFIXES can be used to give sub directories that will be appended to the search paths.
If NO_DEFAULT_PATH is specified, then no additional paths are added to the search. If NO_DEFAULT_PATH is not specified, the search process is as follows:
1. Search paths specified in cmake-specific cache variables. These are intended to be used on the command line with a -DVAR=value. This can be skipped if NO_CMAKE_PATH is passed.
<prefix>/include for each <prefix> in CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_FRAMEWORK_PATH
!
2. Search paths specified in cmake-specific environment variables. These are intended to be set in the user's shell configuration. This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
<prefix>/include for each <prefix> in CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_FRAMEWORK_PATH
!
3. Search the paths specified by the HINTS option. These should be paths computed by system introspection, such as a hint provided by the location of another item already found. Hard-coded guesses should be specified with the PATHS option.
4. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
PATH INCLUDE
!
5. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
<prefix>/include for each <prefix> in CMAKE_SYSTEM_PREFIX_PATH CMAKE_SYSTEM_INCLUDE_PATH CMAKE_SYSTEM_FRAMEWORK_PATH
!
6. Search the paths specified by the PATHS option or in the short-hand version of the command. These are typically hard-coded guesses.
On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
"FIRST" - Try to find frameworks before standard libraries or headers. This is the default on Darwin. "LAST" - Try to find frameworks after standard libraries or headers. "ONLY" - Only try to find frameworks. "NEVER". - Never try to find frameworks.
On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
"FIRST" - Try to find application bundles before standard programs. This is the default on Darwin. "LAST" - Try to find application bundles after standard programs. "ONLY" - Only try to find application bundles. "NEVER". - Never try to find application bundles.
!
The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_INCLUDE. This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
The default search order is designed to be most-specific to least-specific for common use cases. Projects may override the order by simply calling the command multiple times and using the NO_* options:
find_path(<VAR> NAMES name PATHS paths... NO_DEFAULT_PATH) find_path(<VAR> NAMES name)
!
Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.
This command is used to find a library. A cache entry named by <VAR> is created to store the result of this command. If the library is found the result is stored in the variable and the search will not be repeated unless the variable is cleared. If nothing is found, the result will be <VAR>-NOTFOUND, and the search will be attempted again the next time find_library is invoked with the same variable. The name of the library that is searched for is specified by the names listed after the NAMES argument. Additional search locations can be specified after the PATHS argument. If ENV var is found in the HINTS or PATHS section the environment variable var will be read and converted from a system environment variable to a cmake style list of paths. For example ENV PATH would be a way to list the system path variable. The argument after DOC will be used for the documentation string in the cache. PATH_SUFFIXES can be used to give sub directories that will be appended to the search paths.
If NO_DEFAULT_PATH is specified, then no additional paths are added to the search. If NO_DEFAULT_PATH is not specified, the search process is as follows:
1. Search paths specified in cmake-specific cache variables. These are intended to be used on the command line with a -DVAR=value. This can be skipped if NO_CMAKE_PATH is passed.
<prefix>/lib for each <prefix> in CMAKE_PREFIX_PATH CMAKE_LIBRARY_PATH CMAKE_FRAMEWORK_PATH
!
2. Search paths specified in cmake-specific environment variables. These are intended to be set in the user's shell configuration. This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
<prefix>/lib for each <prefix> in CMAKE_PREFIX_PATH CMAKE_LIBRARY_PATH CMAKE_FRAMEWORK_PATH
!
3. Search the paths specified by the HINTS option. These should be paths computed by system introspection, such as a hint provided by the location of another item already found. Hard-coded guesses should be specified with the PATHS option.
4. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
PATH LIB
!
5. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
<prefix>/lib for each <prefix> in CMAKE_SYSTEM_PREFIX_PATH CMAKE_SYSTEM_LIBRARY_PATH CMAKE_SYSTEM_FRAMEWORK_PATH
!
6. Search the paths specified by the PATHS option or in the short-hand version of the command. These are typically hard-coded guesses.
On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
"FIRST" - Try to find frameworks before standard libraries or headers. This is the default on Darwin. "LAST" - Try to find frameworks after standard libraries or headers. "ONLY" - Only try to find frameworks. "NEVER". - Never try to find frameworks.
On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
"FIRST" - Try to find application bundles before standard programs. This is the default on Darwin. "LAST" - Try to find application bundles after standard programs. "ONLY" - Only try to find application bundles. "NEVER". - Never try to find application bundles.
!
The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_LIBRARY. This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
The default search order is designed to be most-specific to least-specific for common use cases. Projects may override the order by simply calling the command multiple times and using the NO_* options:
find_library(<VAR> NAMES name PATHS paths... NO_DEFAULT_PATH) find_library(<VAR> NAMES name)
!
Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.
If the library found is a framework, then VAR will be set to the full path to the framework <fullPath>/A.framework. When a full path to a framework is used as a library, CMake will use a -framework A, and a -F<fullPath> to link the framework to the target.
find_package: Load settings for an external project.
Finds and loads settings from an external project. <package>_FOUND will be set to indicate whether the package was found. When the package is found package-specific information is provided through variables documented by the package itself. The QUIET option disables messages if the package cannot be found. The REQUIRED option stops processing with an error message if the package cannot be found. A package-specific list of components may be listed after the REQUIRED option or after the COMPONENTS option if no REQUIRED option is given. The "[major[.minor[.patch]]]" version argument specifies a desired version with which the package found should be compatible. The EXACT option requests that the version be matched exactly. Version support is currently provided only on a package-by-package basis (details below).
User code should generally look for packages using the above simple signature. The remainder of this command documentation specifies the full command signature and details of the search process. Project maintainers wishing to provide a package to be found by this command are encouraged to read on.
The command has two modes by which it searches for packages: "Module" mode and "Config" mode. Module mode is available when the command is invoked with the above reduced signature. CMake searches for a file called "Find<package>.cmake" in the CMAKE_MODULE_PATH followed by the CMake installation. If the file is found, it is read and processed by CMake. It is responsible for finding the package, checking the version, and producing any needed messages. Many find-modules provide limited or no support for versioning; check the module documentation. If no module is found the command proceeds to Config mode.
The NO_MODULE option may be used to skip Module mode explicitly. It is also implied by use of options not specified in the reduced signature.
Config mode attempts to locate a configuration file provided by the package to be found. A cache entry called <package>_DIR is created to hold the directory containing the file. By default the command searches for a package with the name <package>. If the NAMES option is given the names following it are used instead of <package>. The command searches for a file called "<name>Config.cmake" or "<lower-case-name>-config.cmake" for each name specified. A replacement set of possible configuration file names may be given using the CONFIGS option. The search procedure is specified below. Once found, the configuration file is read and processed by CMake. Since the file is provided by the package it already knows the location of package contents. The full path to the configuration file is stored in the cmake variable <package>_CONFIG.
If the package configuration file cannot be found CMake will generate an error describing the problem unless the QUIET argument is specified. If REQUIRED is specified and the package is not found a fatal error is generated and the configure step stops executing. If <package>_DIR has been set to a directory not containing a configuration file a fatal error is always generated because user intervention is required.
When the "[major[.minor[.patch]]]" version argument is specified Config mode will only find a version of the package that claims compatibility with the requested version. If the EXACT option is given only a version of the package claiming an exact match of the requested version may be found. CMake does not establish any convention for the meaning of version numbers. Package version numbers are checked by "version" files provided by the packages themselves. For a candidate package confguration file "<config-file>.cmake" the corresponding version file is located next to it and named either "<config-file>-version.cmake" or "<config-file>Version.cmake". If no such version file is available then the configuration file is assumed to not be compatible with any requested version. When a version file is found it is loaded to check the requested version number. The version file is loaded in a nested scope in which the following variables have been defined:
PACKAGE_FIND_NAME = the <package> name PACKAGE_FIND_VERSION = full requested version string PACKAGE_FIND_VERSION_MAJOR = requested major version, if any PACKAGE_FIND_VERSION_MINOR = requested minor version, if any PACKAGE_FIND_VERSION_PATCH = requested patch version, if any
The version file checks whether it satisfies the requested version and sets these variables:
PACKAGE_VERSION = package version (major[.minor[.patch]]) PACKAGE_VERSION_EXACT = true if version is exact match PACKAGE_VERSION_COMPATIBLE = true if version is compatible
***************
*** 367,404 ****
in order to find a package. Package maintainers providing CMake package configuration files are encouraged to name and install them such that the procedure outlined below will find them without requiring use of additional options.
CMake constructs a set of possible installation prefixes for the package. Under each prefix several directories are searched for a configuration file. The tables below show the directories searched. Each entry is meant for installation trees following Windows (W), UNIX (U), or Apple (A) conventions.
On systems supporting OS X Frameworks and Application Bundles the following directories are searched for frameworks or bundles containing a configuration file:
In all cases the <name> is treated as case-insensitive and corresponds to any of the names specified (<package> or names given by NAMES). If PATH_SUFFIXES is specified the suffixes are appended to each (W) or (U) directory entry one-by-one.
This set of directories is intended to work in cooperation with projects that provide configuration files in their installation trees. Directories above marked with (W) are intended for installations on Windows where the prefix may point at the top of an application's installation directory. Those marked with (U) are intended for installations on UNIX platforms where the prefix is shared by multiple packages. This is merely a convention, so all (W) and (U) directories are still searched on all platforms. Directories marked with (A) are intended for installations on Apple platforms. The cmake variables CMAKE_FIND_FRAMEWORK and CMAKE_FIND_APPBUNDLE determine the order of preference as specified below.
The set of installation prefixes is constructed using the following steps. If NO_DEFAULT_PATH is specified steps 1-5 are skipped.
1. Search cmake specific environment variables. This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
2. Search cmake variables with the same names as the cmake specific environment variables. These are intended to be used on the command line with a -DVAR=value. This can be skipped if NO_CMAKE_PATH is passed.
3. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is passed. Path entries ending in "/bin" or "/sbin" are automatically converted to their parent directories.
PATH
!
4. Search project build trees recently configured in a CMake GUI. This can be skipped if NO_CMAKE_BUILDS_PATH is passed. It is intended for the case when a user is building multiple dependent projects one after another.
5. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
"FIRST" - Try to find frameworks before standard libraries or headers. This is the default on Darwin. "LAST" - Try to find frameworks after standard libraries or headers. "ONLY" - Only try to find frameworks. "NEVER". - Never try to find frameworks.
On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
"FIRST" - Try to find application bundles before standard programs. This is the default on Darwin. "LAST" - Try to find application bundles after standard programs. "ONLY" - Only try to find application bundles. "NEVER". - Never try to find application bundles.
!
The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_PACKAGE. This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
The reason the paths listed in the call to the command are searched last is that most users of CMake would expect things to be found first in the locations specified by their environment. Projects may override this behavior by simply calling the command twice:
This command is used to find a directory containing the named file. A cache entry named by <VAR> is created to store the result of this command. If the file in a directory is found the result is stored in the variable and the search will not be repeated unless the variable is cleared. If nothing is found, the result will be <VAR>-NOTFOUND, and the search will be attempted again the next time find_path is invoked with the same variable. The name of the file in a directory that is searched for is specified by the names listed after the NAMES argument. Additional search locations can be specified after the PATHS argument. If ENV var is found in the PATHS section the environment variable var will be read and converted from a system environment variable to a cmake style list of paths. For example ENV PATH would be a way to list the system path variable. The argument after DOC will be used for the documentation string in the cache. PATH_SUFFIXES can be used to give sub directories that will be appended to the search paths.
If NO_DEFAULT_PATH is specified, then no additional paths are added to the search. If NO_DEFAULT_PATH is not specified, the search process is as follows:
1. Search cmake specific environment variables. This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
<prefix>/include for each <prefix> in CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_FRAMEWORK_PATH
!
2. Search cmake variables with the same names as the cmake specific environment variables. These are intended to be used on the command line with a -DVAR=value. This can be skipped if NO_CMAKE_PATH is passed.
<prefix>/include for each <prefix> in CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_FRAMEWORK_PATH
!
3. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
PATH INCLUDE
!
4. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
<prefix>/include for each <prefix> in CMAKE_SYSTEM_PREFIX_PATH CMAKE_SYSTEM_INCLUDE_PATH CMAKE_SYSTEM_FRAMEWORK_PATH
!
5. Search the paths specified after PATHS or in the short-hand version of the command.
On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
"FIRST" - Try to find frameworks before standard libraries or headers. This is the default on Darwin. "LAST" - Try to find frameworks after standard libraries or headers. "ONLY" - Only try to find frameworks. "NEVER". - Never try to find frameworks.
On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
"FIRST" - Try to find application bundles before standard programs. This is the default on Darwin. "LAST" - Try to find application bundles after standard programs. "ONLY" - Only try to find application bundles. "NEVER". - Never try to find application bundles.
!
The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_INCLUDE. This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
The reason the paths listed in the call to the command are searched last is that most users of CMake would expect things to be found first in the locations specified by their environment. Projects may override this behavior by simply calling the command twice:
find_path(<VAR> NAMES name PATHS paths... NO_DEFAULT_PATH) find_path(<VAR> NAMES name)
!
Once one of these calls succeeds the result variable will be set and stored in the cache so that neither call will search again.
When searching for frameworks, if the file is specified as A/b.h, then the framework search will look for A.framework/Headers/b.h. If that is found the path will be set to the path to the framework. CMake will convert this to the correct -F option to include the file.
This command is used to find a program. A cache entry named by <VAR> is created to store the result of this command. If the program is found the result is stored in the variable and the search will not be repeated unless the variable is cleared. If nothing is found, the result will be <VAR>-NOTFOUND, and the search will be attempted again the next time find_program is invoked with the same variable. The name of the program that is searched for is specified by the names listed after the NAMES argument. Additional search locations can be specified after the PATHS argument. If ENV var is found in the PATHS section the environment variable var will be read and converted from a system environment variable to a cmake style list of paths. For example ENV PATH would be a way to list the system path variable. The argument after DOC will be used for the documentation string in the cache. PATH_SUFFIXES can be used to give sub directories that will be appended to the search paths.
If NO_DEFAULT_PATH is specified, then no additional paths are added to the search. If NO_DEFAULT_PATH is not specified, the search process is as follows:
1. Search cmake specific environment variables. This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
<prefix>/[s]bin for each <prefix> in CMAKE_PREFIX_PATH CMAKE_PROGRAM_PATH CMAKE_APPBUNDLE_PATH
!
2. Search cmake variables with the same names as the cmake specific environment variables. These are intended to be used on the command line with a -DVAR=value. This can be skipped if NO_CMAKE_PATH is passed.
<prefix>/[s]bin for each <prefix> in CMAKE_PREFIX_PATH CMAKE_PROGRAM_PATH CMAKE_APPBUNDLE_PATH
!
3. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
PATH
!
4. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
<prefix>/[s]bin for each <prefix> in CMAKE_SYSTEM_PREFIX_PATH CMAKE_SYSTEM_PROGRAM_PATH CMAKE_SYSTEM_APPBUNDLE_PATH
!
5. Search the paths specified after PATHS or in the short-hand version of the command.
On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
"FIRST" - Try to find frameworks before standard libraries or headers. This is the default on Darwin. "LAST" - Try to find frameworks after standard libraries or headers. "ONLY" - Only try to find frameworks. "NEVER". - Never try to find frameworks.
On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
"FIRST" - Try to find application bundles before standard programs. This is the default on Darwin. "LAST" - Try to find application bundles after standard programs. "ONLY" - Only try to find application bundles. "NEVER". - Never try to find application bundles.
!
The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_PROGRAM. This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
The reason the paths listed in the call to the command are searched last is that most users of CMake would expect things to be found first in the locations specified by their environment. Projects may override this behavior by simply calling the command twice:
find_program(<VAR> NAMES name PATHS paths... NO_DEFAULT_PATH) find_program(<VAR> NAMES name)
!
Once one of these calls succeeds the result variable will be set and stored in the cache so that neither call will search again.
--- 367,404 ----
in order to find a package. Package maintainers providing CMake package configuration files are encouraged to name and install them such that the procedure outlined below will find them without requiring use of additional options.
CMake constructs a set of possible installation prefixes for the package. Under each prefix several directories are searched for a configuration file. The tables below show the directories searched. Each entry is meant for installation trees following Windows (W), UNIX (U), or Apple (A) conventions.
On systems supporting OS X Frameworks and Application Bundles the following directories are searched for frameworks or bundles containing a configuration file:
In all cases the <name> is treated as case-insensitive and corresponds to any of the names specified (<package> or names given by NAMES). If PATH_SUFFIXES is specified the suffixes are appended to each (W) or (U) directory entry one-by-one.
This set of directories is intended to work in cooperation with projects that provide configuration files in their installation trees. Directories above marked with (W) are intended for installations on Windows where the prefix may point at the top of an application's installation directory. Those marked with (U) are intended for installations on UNIX platforms where the prefix is shared by multiple packages. This is merely a convention, so all (W) and (U) directories are still searched on all platforms. Directories marked with (A) are intended for installations on Apple platforms. The cmake variables CMAKE_FIND_FRAMEWORK and CMAKE_FIND_APPBUNDLE determine the order of preference as specified below.
The set of installation prefixes is constructed using the following steps. If NO_DEFAULT_PATH is specified all NO_* options are enabled.
1. Search paths specified in cmake-specific cache variables. These are intended to be used on the command line with a -DVAR=value. This can be skipped if NO_CMAKE_PATH is passed.
2. Search paths specified in cmake-specific environment variables. These are intended to be set in the user's shell configuration. This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
3. Search paths specified by the HINTS option. These should be paths computed by system introspection, such as a hint provided by the location of another item already found. Hard-coded guesses should be specified with the PATHS option.
4. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is passed. Path entries ending in "/bin" or "/sbin" are automatically converted to their parent directories.
PATH
!
5. Search project build trees recently configured in a CMake GUI. This can be skipped if NO_CMAKE_BUILDS_PATH is passed. It is intended for the case when a user is building multiple dependent projects one after another.
6. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
7. Search paths specified by the PATHS option. These are typically hard-coded guesses.
On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
"FIRST" - Try to find frameworks before standard libraries or headers. This is the default on Darwin. "LAST" - Try to find frameworks after standard libraries or headers. "ONLY" - Only try to find frameworks. "NEVER". - Never try to find frameworks.
On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
"FIRST" - Try to find application bundles before standard programs. This is the default on Darwin. "LAST" - Try to find application bundles after standard programs. "ONLY" - Only try to find application bundles. "NEVER". - Never try to find application bundles.
!
The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_PACKAGE. This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
The default search order is designed to be most-specific to least-specific for common use cases. Projects may override the order by simply calling the command multiple times and using the NO_* options:
This command is used to find a directory containing the named file. A cache entry named by <VAR> is created to store the result of this command. If the file in a directory is found the result is stored in the variable and the search will not be repeated unless the variable is cleared. If nothing is found, the result will be <VAR>-NOTFOUND, and the search will be attempted again the next time find_path is invoked with the same variable. The name of the file in a directory that is searched for is specified by the names listed after the NAMES argument. Additional search locations can be specified after the PATHS argument. If ENV var is found in the HINTS or PATHS section the environment variable var will be read and converted from a system environment variable to a cmake style list of paths. For example ENV PATH would be a way to list the system path variable. The argument after DOC will be used for the documentation string in the cache. PATH_SUFFIXES can be used to give sub directories that will be appended to the search paths.
If NO_DEFAULT_PATH is specified, then no additional paths are added to the search. If NO_DEFAULT_PATH is not specified, the search process is as follows:
1. Search paths specified in cmake-specific cache variables. These are intended to be used on the command line with a -DVAR=value. This can be skipped if NO_CMAKE_PATH is passed.
<prefix>/include for each <prefix> in CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_FRAMEWORK_PATH
!
2. Search paths specified in cmake-specific environment variables. These are intended to be set in the user's shell configuration. This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
<prefix>/include for each <prefix> in CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_FRAMEWORK_PATH
!
3. Search the paths specified by the HINTS option. These should be paths computed by system introspection, such as a hint provided by the location of another item already found. Hard-coded guesses should be specified with the PATHS option.
4. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
PATH INCLUDE
!
5. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
<prefix>/include for each <prefix> in CMAKE_SYSTEM_PREFIX_PATH CMAKE_SYSTEM_INCLUDE_PATH CMAKE_SYSTEM_FRAMEWORK_PATH
!
6. Search the paths specified by the PATHS option or in the short-hand version of the command. These are typically hard-coded guesses.
On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
"FIRST" - Try to find frameworks before standard libraries or headers. This is the default on Darwin. "LAST" - Try to find frameworks after standard libraries or headers. "ONLY" - Only try to find frameworks. "NEVER". - Never try to find frameworks.
On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
"FIRST" - Try to find application bundles before standard programs. This is the default on Darwin. "LAST" - Try to find application bundles after standard programs. "ONLY" - Only try to find application bundles. "NEVER". - Never try to find application bundles.
!
The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_INCLUDE. This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
The default search order is designed to be most-specific to least-specific for common use cases. Projects may override the order by simply calling the command multiple times and using the NO_* options:
find_path(<VAR> NAMES name PATHS paths... NO_DEFAULT_PATH) find_path(<VAR> NAMES name)
!
Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.
When searching for frameworks, if the file is specified as A/b.h, then the framework search will look for A.framework/Headers/b.h. If that is found the path will be set to the path to the framework. CMake will convert this to the correct -F option to include the file.
This command is used to find a program. A cache entry named by <VAR> is created to store the result of this command. If the program is found the result is stored in the variable and the search will not be repeated unless the variable is cleared. If nothing is found, the result will be <VAR>-NOTFOUND, and the search will be attempted again the next time find_program is invoked with the same variable. The name of the program that is searched for is specified by the names listed after the NAMES argument. Additional search locations can be specified after the PATHS argument. If ENV var is found in the HINTS or PATHS section the environment variable var will be read and converted from a system environment variable to a cmake style list of paths. For example ENV PATH would be a way to list the system path variable. The argument after DOC will be used for the documentation string in the cache. PATH_SUFFIXES can be used to give sub directories that will be appended to the search paths.
If NO_DEFAULT_PATH is specified, then no additional paths are added to the search. If NO_DEFAULT_PATH is not specified, the search process is as follows:
1. Search paths specified in cmake-specific cache variables. These are intended to be used on the command line with a -DVAR=value. This can be skipped if NO_CMAKE_PATH is passed.
<prefix>/[s]bin for each <prefix> in CMAKE_PREFIX_PATH CMAKE_PROGRAM_PATH CMAKE_APPBUNDLE_PATH
!
2. Search paths specified in cmake-specific environment variables. These are intended to be set in the user's shell configuration. This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
<prefix>/[s]bin for each <prefix> in CMAKE_PREFIX_PATH CMAKE_PROGRAM_PATH CMAKE_APPBUNDLE_PATH
!
3. Search the paths specified by the HINTS option. These should be paths computed by system introspection, such as a hint provided by the location of another item already found. Hard-coded guesses should be specified with the PATHS option.
4. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
PATH
!
5. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
<prefix>/[s]bin for each <prefix> in CMAKE_SYSTEM_PREFIX_PATH CMAKE_SYSTEM_PROGRAM_PATH CMAKE_SYSTEM_APPBUNDLE_PATH
!
6. Search the paths specified by the PATHS option or in the short-hand version of the command. These are typically hard-coded guesses.
On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
"FIRST" - Try to find frameworks before standard libraries or headers. This is the default on Darwin. "LAST" - Try to find frameworks after standard libraries or headers. "ONLY" - Only try to find frameworks. "NEVER". - Never try to find frameworks.
On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
"FIRST" - Try to find application bundles before standard programs. This is the default on Darwin. "LAST" - Try to find application bundles after standard programs. "ONLY" - Only try to find application bundles. "NEVER". - Never try to find application bundles.
!
The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_PROGRAM. This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
The default search order is designed to be most-specific to least-specific for common use cases. Projects may override the order by simply calling the command multiple times and using the NO_* options:
find_program(<VAR> NAMES name PATHS paths... NO_DEFAULT_PATH) find_program(<VAR> NAMES name)
!
Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.
***************
*** 415,419 ****
get_cmake_property: Get a property of the CMake instance.
get_cmake_property(VAR property)
!
Get a property from the CMake instance. The value of the property is stored in the variable VAR. If the property is not found, CMake will report an error. Some supported properties include: VARIABLES, CACHE_VARIABLES, COMMANDS, and MACROS.
--- 415,419 ----
get_cmake_property: Get a property of the CMake instance.
get_cmake_property(VAR property)
!
Get a property from the CMake instance. The value of the property is stored in the variable VAR. If the property is not found, CMake will report an error. Some supported properties include: VARIABLES, CACHE_VARIABLES, COMMANDS, MACROS, and COMPONENTS.
From cmake-commits at cmake.org Fri Aug 1 20:38:40 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Sat, 02 Aug 2008 00:38:40 +0000
Subject: [Cmake-commits] [cmake-commits] miguelf committed
FindImageMagick.cmake 1.5 1.6
Message-ID: <20080802003840.3754122E2@public.kitware.com>
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv13314
Modified Files:
FindImageMagick.cmake
Log Message:
STYLE: Fixed module list in documentation; Magick should be MagickCore.
Index: FindImageMagick.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindImageMagick.cmake,v
retrieving revision 1.5
retrieving revision 1.6
diff -C 2 -d -r1.5 -r1.6
*** FindImageMagick.cmake 23 Jul 2008 06:47:36 -0000 1.5
--- FindImageMagick.cmake 2 Aug 2008 00:38:37 -0000 1.6
***************
*** 30,34 ****
# Magick++
# MagickWand
! # Magick
#
# For these components the following variables are set:
--- 30,34 ----
# Magick++
# MagickWand
! # MagickCore
#
# For these components the following variables are set:
From cmake-commits at cmake.org Mon Aug 4 09:38:40 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Mon, 04 Aug 2008 13:38:40 +0000
Subject: [Cmake-commits] [cmake-commits] king committed cmELF.cxx 1.12 1.13
Message-ID: <20080804133841.15A541FF7@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv9647/Source
Modified Files:
cmELF.cxx
Log Message:
BUG: Fix operator precedence error in cmELF
When attempting to load the RPATH out of a non-ELF file cmELF would
crash because the check for a valid file was done with in correct
operator precedence. See bug#7392.
Index: cmELF.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmELF.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -C 2 -d -r1.12 -r1.13
*** cmELF.cxx 13 May 2008 14:34:24 -0000 1.12
--- cmELF.cxx 4 Aug 2008 13:38:38 -0000 1.13
***************
*** 885,890 ****
{
if(this->Valid() &&
! this->Internal->GetFileType() == cmELF::FileTypeExecutable ||
! this->Internal->GetFileType() == cmELF::FileTypeSharedLibrary)
{
return this->Internal->GetRPath();
--- 885,890 ----
{
if(this->Valid() &&
! (this->Internal->GetFileType() == cmELF::FileTypeExecutable ||
! this->Internal->GetFileType() == cmELF::FileTypeSharedLibrary))
{
return this->Internal->GetRPath();
***************
*** 900,905 ****
{
if(this->Valid() &&
! this->Internal->GetFileType() == cmELF::FileTypeExecutable ||
! this->Internal->GetFileType() == cmELF::FileTypeSharedLibrary)
{
return this->Internal->GetRunPath();
--- 900,905 ----
{
if(this->Valid() &&
! (this->Internal->GetFileType() == cmELF::FileTypeExecutable ||
! this->Internal->GetFileType() == cmELF::FileTypeSharedLibrary))
{
return this->Internal->GetRunPath();
From cmake-commits at cmake.org Mon Aug 4 11:37:21 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Mon, 04 Aug 2008 15:37:21 +0000
Subject: [Cmake-commits] [cmake-commits] king committed
CMakeCInformation.cmake 1.21 1.22 CMakeCXXInformation.cmake
1.25 1.26 CMakeFortranInformation.cmake 1.20 1.21
Message-ID: <20080804153721.3DF002210@public.kitware.com>
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv19766/Modules
Modified Files:
CMakeCInformation.cmake CMakeCXXInformation.cmake
CMakeFortranInformation.cmake
Log Message:
ENH: Build large archives incrementally
Creation of archive libraries with the unix 'ar' tool should be done
incrementally when the number of object files is large. This avoids
problems with the command line getting too many arguments.
Index: CMakeCXXInformation.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeCXXInformation.cmake,v
retrieving revision 1.25
retrieving revision 1.26
diff -C 2 -d -r1.25 -r1.26
*** CMakeCXXInformation.cmake 21 Apr 2008 17:04:15 -0000 1.25
--- CMakeCXXInformation.cmake 4 Aug 2008 15:37:19 -0000 1.26
***************
*** 177,181 ****
# CMAKE_CXX_CREATE_SHARED_LIBRARY
# CMAKE_CXX_CREATE_SHARED_MODULE
- # CMAKE_CXX_CREATE_STATIC_LIBRARY
# CMAKE_CXX_COMPILE_OBJECT
# CMAKE_CXX_LINK_EXECUTABLE
--- 177,180 ----
***************
*** 213,222 ****
! # create a C++ static library
! IF(NOT CMAKE_CXX_CREATE_STATIC_LIBRARY)
! SET(CMAKE_CXX_CREATE_STATIC_LIBRARY
! " cr "
! " ")
! ENDIF(NOT CMAKE_CXX_CREATE_STATIC_LIBRARY)
# compile a C++ file into an object file
--- 212,220 ----
! # Create a static archive incrementally for large object file counts.
! # If CMAKE_CXX_CREATE_STATIC_LIBRARY is set it will override these.
! SET(CMAKE_CXX_ARCHIVE_CREATE " cr ")
! SET(CMAKE_CXX_ARCHIVE_APPEND " r ")
! SET(CMAKE_CXX_ARCHIVE_FINISH "")
# compile a C++ file into an object file
Index: CMakeFortranInformation.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeFortranInformation.cmake,v
retrieving revision 1.20
retrieving revision 1.21
diff -C 2 -d -r1.20 -r1.21
*** CMakeFortranInformation.cmake 22 Apr 2008 13:35:23 -0000 1.20
--- CMakeFortranInformation.cmake 4 Aug 2008 15:37:19 -0000 1.21
***************
*** 120,124 ****
# CMAKE_Fortran_CREATE_SHARED_LIBRARY
# CMAKE_Fortran_CREATE_SHARED_MODULE
- # CMAKE_Fortran_CREATE_STATIC_LIBRARY
# CMAKE_Fortran_COMPILE_OBJECT
# CMAKE_Fortran_LINK_EXECUTABLE
--- 120,123 ----
***************
*** 135,144 ****
ENDIF(NOT CMAKE_Fortran_CREATE_SHARED_MODULE)
! # create a Fortran static library
! IF(NOT CMAKE_Fortran_CREATE_STATIC_LIBRARY)
! SET(CMAKE_Fortran_CREATE_STATIC_LIBRARY
! " cr "
! " ")
! ENDIF(NOT CMAKE_Fortran_CREATE_STATIC_LIBRARY)
# compile a Fortran file into an object file
--- 134,142 ----
ENDIF(NOT CMAKE_Fortran_CREATE_SHARED_MODULE)
! # Create a static archive incrementally for large object file counts.
! # If CMAKE_Fortran_CREATE_STATIC_LIBRARY is set it will override these.
! SET(CMAKE_Fortran_ARCHIVE_CREATE " cr ")
! SET(CMAKE_Fortran_ARCHIVE_APPEND " r ")
! SET(CMAKE_Fortran_ARCHIVE_FINISH "")
# compile a Fortran file into an object file
Index: CMakeCInformation.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeCInformation.cmake,v
retrieving revision 1.21
retrieving revision 1.22
diff -C 2 -d -r1.21 -r1.22
*** CMakeCInformation.cmake 21 Apr 2008 17:04:15 -0000 1.21
--- CMakeCInformation.cmake 4 Aug 2008 15:37:19 -0000 1.22
***************
*** 99,103 ****
# CMAKE_C_CREATE_SHARED_LIBRARY
# CMAKE_C_CREATE_SHARED_MODULE
- # CMAKE_C_CREATE_STATIC_LIBRARY
# CMAKE_C_COMPILE_OBJECT
# CMAKE_C_LINK_EXECUTABLE
--- 99,102 ----
***************
*** 134,143 ****
ENDIF(NOT CMAKE_C_CREATE_SHARED_MODULE)
! # create a C static library
! IF(NOT CMAKE_C_CREATE_STATIC_LIBRARY)
! SET(CMAKE_C_CREATE_STATIC_LIBRARY
! " cr "
! " ")
! ENDIF(NOT CMAKE_C_CREATE_STATIC_LIBRARY)
# compile a C file into an object file
--- 133,141 ----
ENDIF(NOT CMAKE_C_CREATE_SHARED_MODULE)
! # Create a static archive incrementally for large object file counts.
! # If CMAKE_C_CREATE_STATIC_LIBRARY is set it will override these.
! SET(CMAKE_C_ARCHIVE_CREATE " cr ")
! SET(CMAKE_C_ARCHIVE_APPEND " r ")
! SET(CMAKE_C_ARCHIVE_FINISH "")
# compile a C file into an object file
From cmake-commits at cmake.org Mon Aug 4 11:37:21 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Mon, 04 Aug 2008 15:37:21 +0000
Subject: [Cmake-commits] [cmake-commits] king committed
cmMakefileLibraryTargetGenerator.cxx 1.62 1.63
Message-ID: <20080804153721.698F222E2@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv19766/Source
Modified Files:
cmMakefileLibraryTargetGenerator.cxx
Log Message:
ENH: Build large archives incrementally
Creation of archive libraries with the unix 'ar' tool should be done
incrementally when the number of object files is large. This avoids
problems with the command line getting too many arguments.
Index: cmMakefileLibraryTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileLibraryTargetGenerator.cxx,v
retrieving revision 1.62
retrieving revision 1.63
diff -C 2 -d -r1.62 -r1.63
*** cmMakefileLibraryTargetGenerator.cxx 9 Jul 2008 14:09:46 -0000 1.62
--- cmMakefileLibraryTargetGenerator.cxx 4 Aug 2008 15:37:19 -0000 1.63
***************
*** 613,616 ****
--- 613,617 ----
// For static libraries there might be archiving rules.
+ bool haveStaticLibraryRule = false;
std::vector archiveCreateCommands;
std::vector archiveAppendCommands;
***************
*** 619,622 ****
--- 620,625 ----
if(this->Target->GetType() == cmTarget::STATIC_LIBRARY)
{
+ haveStaticLibraryRule =
+ this->Makefile->GetDefinition(linkRuleVar)? true:false;
std::string arCreateVar = "CMAKE_";
arCreateVar += linkLanguage;
***************
*** 644,647 ****
--- 647,651 ----
// Decide whether to use archiving rules.
bool useArchiveRules =
+ !haveStaticLibraryRule &&
!archiveCreateCommands.empty() && !archiveAppendCommands.empty();
if(useArchiveRules)
From cmake-commits at cmake.org Tue Aug 5 09:55:04 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Tue, 05 Aug 2008 13:55:04 +0000
Subject: [Cmake-commits] [cmake-commits] king committed cmLocalGenerator.cxx
1.277 1.278
Message-ID: <20080805135505.6F5C02304@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv9714/Source
Modified Files:
cmLocalGenerator.cxx
Log Message:
BUG: Fix escaping in link scripts
When generating escape sequences for the native build tool do not put in
Makefile escapes for paths generated into link scripts. This fixes
putting "$ORIGIN" into the RPATH, and probably some other subtle
problems.
Index: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.277
retrieving revision 1.278
diff -C 2 -d -r1.277 -r1.278
*** cmLocalGenerator.cxx 30 Jul 2008 14:44:57 -0000 1.277
--- cmLocalGenerator.cxx 5 Aug 2008 13:55:02 -0000 1.278
***************
*** 2580,2584 ****
flags |= cmsysSystem_Shell_Flag_VSIDE;
}
! else
{
flags |= cmsysSystem_Shell_Flag_Make;
--- 2580,2584 ----
flags |= cmsysSystem_Shell_Flag_VSIDE;
}
! else if(!this->LinkScriptShell)
{
flags |= cmsysSystem_Shell_Flag_Make;
From cmake-commits at cmake.org Tue Aug 5 09:55:10 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Tue, 05 Aug 2008 13:55:10 +0000
Subject: [Cmake-commits] [cmake-commits] king committed cmLocalGenerator.cxx
1.278 1.279
Message-ID: <20080805135510.CE6A82304@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv9762/Source
Modified Files:
cmLocalGenerator.cxx
Log Message:
BUG: Do not convert RPATH entries to full path.
When generating RPATH entries on the link line using a repeated linker
flag (-R ... -R ... style) do not convert individual entries to a full
path. We need to preserve what the user requested.
Index: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.278
retrieving revision 1.279
diff -C 2 -d -r1.278 -r1.279
*** cmLocalGenerator.cxx 5 Aug 2008 13:55:02 -0000 1.278
--- cmLocalGenerator.cxx 5 Aug 2008 13:55:08 -0000 1.279
***************
*** 1574,1578 ****
{
rpath += cli.GetRuntimeFlag();
! rpath += this->Convert(ri->c_str(), FULL, SHELL, false);
rpath += " ";
}
--- 1574,1578 ----
{
rpath += cli.GetRuntimeFlag();
! rpath += this->Convert(ri->c_str(), NONE, SHELL, false);
rpath += " ";
}
From cmake-commits at cmake.org Tue Aug 5 13:27:03 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Tue, 05 Aug 2008 17:27:03 +0000
Subject: [Cmake-commits] [cmake-commits] king committed
cmSourceFileLocation.cxx 1.7 1.8 cmSourceFileLocation.h 1.2 1.3
Message-ID: <20080805172703.A03501C40@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv30270/Source
Modified Files:
cmSourceFileLocation.cxx cmSourceFileLocation.h
Log Message:
BUG: Fix matching of ambiguous sf extensions.
A name with an ambiguous extension may only match an unambiguous name
that is extended by one of the fixed set of extensions tried when
finding the source file on disk. This rule makes matching of source
files with ambiguous extensions much less aggressive but still
sufficient.
Index: cmSourceFileLocation.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSourceFileLocation.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -C 2 -d -r1.7 -r1.8
*** cmSourceFileLocation.cxx 30 Jul 2008 15:06:11 -0000 1.7
--- cmSourceFileLocation.cxx 5 Aug 2008 17:27:01 -0000 1.8
***************
*** 153,180 ****
//----------------------------------------------------------------------------
bool cmSourceFileLocation::Matches(cmSourceFileLocation const& loc)
{
! if(this->AmbiguousExtension || loc.AmbiguousExtension)
{
! // Need to compare without the file extension.
! std::string thisName;
! if(this->AmbiguousExtension)
! {
! thisName = this->Name;
! }
! else
! {
! thisName = cmSystemTools::GetFilenameWithoutLastExtension(this->Name);
! }
! std::string locName;
! if(loc.AmbiguousExtension)
{
! locName = loc.Name;
}
! else
{
! locName = cmSystemTools::GetFilenameWithoutLastExtension(loc.Name);
}
! if(thisName != locName)
{
return false;
--- 153,218 ----
//----------------------------------------------------------------------------
+ bool
+ cmSourceFileLocation
+ ::MatchesAmbiguousExtension(cmSourceFileLocation const& loc) const
+ {
+ // This location's extension is not ambiguous but loc's extension
+ // is. See if the names match as-is.
+ if(this->Name == loc.Name)
+ {
+ return true;
+ }
+
+ // Check if loc's name could possibly be extended to our name by
+ // adding an extension.
+ if(!(this->Name.size() > loc.Name.size() &&
+ this->Name.substr(0, loc.Name.size()) == loc.Name &&
+ this->Name[loc.Name.size()] == '.'))
+ {
+ return false;
+ }
+
+ // Only a fixed set of extensions will be tried to match a file on
+ // disk. One of these must match if loc refers to this source file.
+ std::string ext = this->Name.substr(loc.Name.size()+1);
+ cmMakefile* mf = this->Makefile;
+ const std::vector& srcExts = mf->GetSourceExtensions();
+ if(std::find(srcExts.begin(), srcExts.end(), ext) != srcExts.end())
+ {
+ return true;
+ }
+ const std::vector& hdrExts = mf->GetHeaderExtensions();
+ if(std::find(hdrExts.begin(), hdrExts.end(), ext) != hdrExts.end())
+ {
+ return true;
+ }
+ return false;
+ }
+
+ //----------------------------------------------------------------------------
bool cmSourceFileLocation::Matches(cmSourceFileLocation const& loc)
{
! if(this->AmbiguousExtension && loc.AmbiguousExtension)
{
! // Both extensions are ambiguous. Since only the old fixed set of
! // extensions will be tried, the names must match at this point to
! // be the same file.
! if(this->Name != loc.Name)
{
! return false;
}
! }
! else if(this->AmbiguousExtension)
! {
! // Only "this" extension is ambiguous.
! if(!loc.MatchesAmbiguousExtension(*this))
{
! return false;
}
! }
! else if(loc.AmbiguousExtension)
! {
! // Only "loc" extension is ambiguous.
! if(!this->MatchesAmbiguousExtension(loc))
{
return false;
***************
*** 183,187 ****
else
{
! // Compare with extension.
if(this->Name != loc.Name)
{
--- 221,225 ----
else
{
! // Neither extension is ambiguous.
if(this->Name != loc.Name)
{
Index: cmSourceFileLocation.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSourceFileLocation.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** cmSourceFileLocation.h 18 Jun 2007 15:59:23 -0000 1.2
--- cmSourceFileLocation.h 5 Aug 2008 17:27:01 -0000 1.3
***************
*** 95,98 ****
--- 95,100 ----
std::string Name;
+ bool MatchesAmbiguousExtension(cmSourceFileLocation const& loc) const;
+
// Update the location with additional knowledge.
void Update(cmSourceFileLocation const& loc);
From cmake-commits at cmake.org Tue Aug 5 13:27:08 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Tue, 05 Aug 2008 17:27:08 +0000
Subject: [Cmake-commits] [cmake-commits] king committed cmLocalGenerator.cxx
1.279 1.280
Message-ID: <20080805172708.7701C1C40@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv30345/Source
Modified Files:
cmLocalGenerator.cxx
Log Message:
BUG: Custom command depends may match sources
Custom command dependencies that are not full paths or targets may also
match source files. When one does, the full information about the
source file's location and name may be used. This fixes the case when a
custom commands depends by relative path on a source file generated by
another custom command specifying its output by relative path.
Index: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.279
retrieving revision 1.280
diff -C 2 -d -r1.279 -r1.280
*** cmLocalGenerator.cxx 5 Aug 2008 13:55:08 -0000 1.279
--- cmLocalGenerator.cxx 5 Aug 2008 17:27:06 -0000 1.280
***************
*** 1741,1744 ****
--- 1741,1753 ----
return inName;
}
+
+ // Check for a source file in this directory that matches the
+ // dependency.
+ if(cmSourceFile* sf = this->Makefile->GetSource(inName))
+ {
+ name = sf->GetFullPath();
+ return name;
+ }
+
// Treat the name as relative to the source directory in which it
// was given.
From cmake-commits at cmake.org Tue Aug 5 13:27:16 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Tue, 05 Aug 2008 17:27:16 +0000
Subject: [Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.42
1.43
Message-ID: <20080805172716.7DFFD1D07@public.kitware.com>
Update of /cvsroot/CMake/CMake/Tests/CustomCommand
In directory public:/mounts/ram/cvs-serv30401/Tests/CustomCommand
Modified Files:
CMakeLists.txt
Log Message:
ENH: Test relative path custom command output
As of CMake 2.6 a custom command output specified by relative path is
placed in the build tree. This adds a test to make sure other
references to the output are hooked up correctly, fixing a bug in CMake
2.6.1.
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CustomCommand/CMakeLists.txt,v
retrieving revision 1.42
retrieving revision 1.43
diff -C 2 -d -r1.42 -r1.43
*** CMakeLists.txt 4 Jun 2008 16:10:59 -0000 1.42
--- CMakeLists.txt 5 Aug 2008 17:27:14 -0000 1.43
***************
*** 84,87 ****
--- 84,97 ----
INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR})
+ # Test generation of a file to the build tree without full path. As
+ # of CMake 2.6 custom command outputs specified by relative path go in
+ # the build tree.
+ ADD_CUSTOM_COMMAND(
+ OUTPUT doc1.txt
+ COMMAND ${CMAKE_COMMAND} -E echo "Example Document Target" > doc1.txt
+ DEPENDS doc1.tex
+ VERBATIM
+ )
+
# Add a custom target to drive generation of doc1.h.
ADD_CUSTOM_TARGET(TDocument ALL
***************
*** 89,93 ****
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/doc1.h
${PROJECT_BINARY_DIR}/doc2.h
! DEPENDS ${PROJECT_BINARY_DIR}/doc1.h
COMMENT "Running top-level TDocument commands"
)
--- 99,103 ----
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/doc1.h
${PROJECT_BINARY_DIR}/doc2.h
! DEPENDS ${PROJECT_BINARY_DIR}/doc1.h doc1.txt
COMMENT "Running top-level TDocument commands"
)
From cmake-commits at cmake.org Tue Aug 5 16:06:16 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Tue, 05 Aug 2008 20:06:16 +0000
Subject: [Cmake-commits] [cmake-commits] alex committed FindKDE3.cmake 1.19
1.20
Message-ID: <20080805200616.707A62227@public.kitware.com>
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv15808
Modified Files:
FindKDE3.cmake
Log Message:
BUG: fix #7452, bad closing ENDIF() statement
Alex
Index: FindKDE3.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindKDE3.cmake,v
retrieving revision 1.19
retrieving revision 1.20
diff -C 2 -d -r1.19 -r1.20
*** FindKDE3.cmake 18 Jun 2008 23:02:20 -0000 1.19
--- FindKDE3.cmake 5 Aug 2008 20:06:14 -0000 1.20
***************
*** 191,195 ****
IF("${out}" MATCHES "2.9[56]")
SET(_KDE3_USE_FLAGS FALSE)
! ENDIF("${out}" out MATCHES "2.9[56]")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
--- 191,195 ----
IF("${out}" MATCHES "2.9[56]")
SET(_KDE3_USE_FLAGS FALSE)
! ENDIF("${out}" MATCHES "2.9[56]")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
From cmake-commits at cmake.org Wed Aug 6 15:35:54 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Wed, 06 Aug 2008 19:35:54 +0000
Subject: [Cmake-commits] [cmake-commits] alex committed
cmExtraEclipseCDT4Generator.cxx 1.14 1.15
Message-ID: <20080806193554.4ADCC2309@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv5205
Modified Files:
cmExtraEclipseCDT4Generator.cxx
Log Message:
BUG: don't crash in the generator is EXECUTABLE_OUTPUT_PATH or
LIBRARY_OUTPUT_PATH are empty
Alex
Index: cmExtraEclipseCDT4Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmExtraEclipseCDT4Generator.cxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -C 2 -d -r1.14 -r1.15
*** cmExtraEclipseCDT4Generator.cxx 3 Apr 2008 22:43:43 -0000 1.14
--- cmExtraEclipseCDT4Generator.cxx 6 Aug 2008 19:35:52 -0000 1.15
***************
*** 352,356 ****
}
// for EXECUTABLE_OUTPUT_PATH when not in binary dir
! std::string outputPath = mf->GetDefinition("EXECUTABLE_OUTPUT_PATH");
if (!outputPath.empty() && !cmSystemTools::IsSubDirectory(
outputPath.c_str(), this->HomeOutputDirectory.c_str()))
--- 352,356 ----
}
// for EXECUTABLE_OUTPUT_PATH when not in binary dir
! std::string outputPath = mf->GetSafeDefinition("EXECUTABLE_OUTPUT_PATH");
if (!outputPath.empty() && !cmSystemTools::IsSubDirectory(
outputPath.c_str(), this->HomeOutputDirectory.c_str()))
***************
*** 369,375 ****
}
// for LIBRARY_OUTPUT_PATH when not in binary dir
! if (outputPath != mf->GetDefinition("LIBRARY_OUTPUT_PATH"))
{
! outputPath = mf->GetDefinition("LIBRARY_OUTPUT_PATH");
if (!outputPath.empty() && !cmSystemTools::IsSubDirectory(
outputPath.c_str(), this->HomeOutputDirectory.c_str()))
--- 369,375 ----
}
// for LIBRARY_OUTPUT_PATH when not in binary dir
! if (outputPath != mf->GetSafeDefinition("LIBRARY_OUTPUT_PATH"))
{
! outputPath = mf->GetSafeDefinition("LIBRARY_OUTPUT_PATH");
if (!outputPath.empty() && !cmSystemTools::IsSubDirectory(
outputPath.c_str(), this->HomeOutputDirectory.c_str()))
From cmake-commits at cmake.org Wed Aug 6 16:05:03 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Wed, 06 Aug 2008 20:05:03 +0000
Subject: [Cmake-commits] [cmake-commits] king committed Linux-Intel-C.cmake
1.1 1.2 Linux-Intel-CXX.cmake 1.3 1.4
Message-ID: <20080806200503.7C5AB232C@public.kitware.com>
Update of /cvsroot/CMake/CMake/Modules/Platform
In directory public:/mounts/ram/cvs-serv7725/Modules/Platform
Modified Files:
Linux-Intel-C.cmake Linux-Intel-CXX.cmake
Log Message:
ENH: Add preprocessor and assembly rules for Intel
Index: Linux-Intel-C.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/Platform/Linux-Intel-C.cmake,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** Linux-Intel-C.cmake 25 Apr 2008 01:54:13 -0000 1.1
--- Linux-Intel-C.cmake 6 Aug 2008 20:05:01 -0000 1.2
***************
*** 5,8 ****
--- 5,11 ----
SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
+ SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE " -E > ")
+ SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE " -S -o ")
+
FIND_PROGRAM(XIAR xiar)
IF(XIAR)
Index: Linux-Intel-CXX.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/Platform/Linux-Intel-CXX.cmake,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** Linux-Intel-CXX.cmake 25 Apr 2008 13:49:42 -0000 1.3
--- Linux-Intel-CXX.cmake 6 Aug 2008 20:05:01 -0000 1.4
***************
*** 5,8 ****
--- 5,11 ----
SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
+ SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE " -E > ")
+ SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE " -S -o ")
+
FIND_PROGRAM(XIAR xiar)
IF(XIAR)
From cmake-commits at cmake.org Wed Aug 6 16:16:56 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Wed, 06 Aug 2008 20:16:56 +0000
Subject: [Cmake-commits] [cmake-commits] alex committed CMakeLists.txt 1.61
1.62
Message-ID: <20080806201656.0C46B2288@public.kitware.com>
Update of /cvsroot/CMake/CMake/Tests
In directory public:/mounts/ram/cvs-serv8867
Modified Files:
CMakeLists.txt
Log Message:
ENH: add simple tests to test that the extra generators don't crash
Alex
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CMakeLists.txt,v
retrieving revision 1.61
retrieving revision 1.62
diff -C 2 -d -r1.61 -r1.62
*** CMakeLists.txt 31 Jul 2008 14:54:55 -0000 1.61
--- CMakeLists.txt 6 Aug 2008 20:16:53 -0000 1.62
***************
*** 92,95 ****
--- 92,144 ----
ADD_TEST_MACRO(ExportImport ExportImport)
+
+ # If we are running right now with a UnixMakefiles based generator,
+ # build the "Simple" test with the ExtraGenerators, if available
+ # This doesn't test whether the generated project files work (unfortunately),
+ # mainly it tests that cmake doesn't crash when generating these project files.
+ IF(${CMAKE_TEST_GENERATOR} MATCHES "Unix Makefiles" OR ${CMAKE_TEST_GENERATOR} MATCHES "KDevelop")
+ # check which generators we have
+ EXEC_PROGRAM(${CMAKE_CMAKE_COMMAND} ARGS --help OUTPUT_VARIABLE cmakeOutput )
+ # check for the Eclipse generator
+ IF ("${cmakeOutput}" MATCHES Eclipse)
+ ADD_TEST(Simple_EclipseGenerator ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/Simple"
+ "${CMake_BINARY_DIR}/Tests/Simple_EclipseGenerator"
+ --build-two-config
+ --build-generator "Eclipse CDT4 - Unix Makefiles"
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
+ --build-project Simple
+ --test-command Simple)
+ ENDIF ("${cmakeOutput}" MATCHES Eclipse)
+
+ # check for the CodeBlocks generator
+ IF ("${cmakeOutput}" MATCHES CodeBlocks)
+ ADD_TEST(Simple_CodeBlocksGenerator ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/Simple"
+ "${CMake_BINARY_DIR}/Tests/Simple_CodeBlocksGenerator"
+ --build-two-config
+ --build-generator "CodeBlocks - Unix Makefiles"
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
+ --build-project Simple
+ --test-command Simple)
+ ENDIF ("${cmakeOutput}" MATCHES CodeBlocks)
+
+ # check for the KDevelop3 generator
+ IF ("${cmakeOutput}" MATCHES KDevelop3)
+ ADD_TEST(Simple_KDevelop3Generator ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/Simple"
+ "${CMake_BINARY_DIR}/Tests/Simple_KDevelop3Generator"
+ --build-two-config
+ --build-generator "KDevelop3 - Unix Makefiles"
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
+ --build-project Simple
+ --test-command Simple)
+ ENDIF ("${cmakeOutput}" MATCHES CodeBlocks)
+
+ ENDIF(${CMAKE_TEST_GENERATOR} MATCHES "Unix Makefiles" OR ${CMAKE_TEST_GENERATOR} MATCHES "KDevelop")
+
# test for correct sub-project generation
# not implemented in VS6 or Xcode
From cmake-commits at cmake.org Wed Aug 6 17:04:20 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Wed, 06 Aug 2008 21:04:20 +0000
Subject: [Cmake-commits] [cmake-commits] hoffman committed CMakeLists.txt
1.144.2.38 1.144.2.39 ChangeLog.manual 1.1.10.36 1.1.10.37
Message-ID: <20080806210420.BB312232F@public.kitware.com>
Update of /cvsroot/CMake/CMake
In directory public:/mounts/ram/cvs-serv12802
Modified Files:
Tag: CMake-2-6
CMakeLists.txt ChangeLog.manual
Log Message:
ENH: merge in fixes from main tree 2.6.2 RC 1
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/CMakeLists.txt,v
retrieving revision 1.144.2.38
retrieving revision 1.144.2.39
diff -C 2 -d -r1.144.2.38 -r1.144.2.39
*** CMakeLists.txt 1 Aug 2008 15:03:41 -0000 1.144.2.38
--- CMakeLists.txt 6 Aug 2008 21:04:16 -0000 1.144.2.39
***************
*** 354,359 ****
SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 6)
! SET(CMake_VERSION_PATCH 1)
! #SET(CMake_VERSION_RC 16)
# CVS versions are odd, if this is an odd minor version
# then set the CMake_VERSION_DATE variable
--- 354,359 ----
SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 6)
! SET(CMake_VERSION_PATCH 2)
! SET(CMake_VERSION_RC 1)
# CVS versions are odd, if this is an odd minor version
# then set the CMake_VERSION_DATE variable
Index: ChangeLog.manual
===================================================================
RCS file: /cvsroot/CMake/CMake/Attic/ChangeLog.manual,v
retrieving revision 1.1.10.36
retrieving revision 1.1.10.37
diff -C 2 -d -r1.1.10.36 -r1.1.10.37
*** ChangeLog.manual 31 Jul 2008 15:52:24 -0000 1.1.10.36
--- ChangeLog.manual 6 Aug 2008 21:04:17 -0000 1.1.10.37
***************
*** 1,2 ****
--- 1,18 ----
+ Changes in CMake 2.6.2 RC 1
+ - Fix abort in eclipse generator with empty EXECUTABLE_OUTPUT_PATH
+ - Fix FindKDE3.cmake syntax error
+ - Fix custom command output by relative path not always working
+ - Fix bug, Do not convert RPATH entries to full path.
+ - Allow for "$ORIGIN" into the RPATH
+ - Allow for static libraries with lots of objects using archive append
+ - Fix documentation for FindImageMagick.cmake
+ - Fix link error with MS compiler and comdef
+ - Fix crash when attempting to load the RPATH out of a non-ELF file
+ - Add --trace option to cmake allowing for the tracing of a cmake run
+ - Fix for issue #4971 where the case of the drive letter component of
+ the filenames might be different when analyzing gcov output.
+ - Add warning level W0 to visual studio
+ - Add support for OSX library version flags
+
Changes in CMake 2.6.1 RC 16
- Fix for bug 7427, preinstall target name hard coded
From cmake-commits at cmake.org Wed Aug 6 17:04:21 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Wed, 06 Aug 2008 21:04:21 +0000
Subject: [Cmake-commits] [cmake-commits] hoffman committed
CMakeCInformation.cmake 1.20.2.1 1.20.2.2
CMakeCXXInformation.cmake 1.24.2.1 1.24.2.2
CMakeFortranInformation.cmake 1.18.2.2 1.18.2.3
FindImageMagick.cmake 1.4.14.1 1.4.14.2 FindKDE3.cmake
1.10.2.2 1.10.2.3
Message-ID: <20080806210421.15E52232F@public.kitware.com>
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv12802/Modules
Modified Files:
Tag: CMake-2-6
CMakeCInformation.cmake CMakeCXXInformation.cmake
CMakeFortranInformation.cmake FindImageMagick.cmake
FindKDE3.cmake
Log Message:
ENH: merge in fixes from main tree 2.6.2 RC 1
Index: CMakeCXXInformation.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeCXXInformation.cmake,v
retrieving revision 1.24.2.1
retrieving revision 1.24.2.2
diff -C 2 -d -r1.24.2.1 -r1.24.2.2
*** CMakeCXXInformation.cmake 21 Apr 2008 19:21:56 -0000 1.24.2.1
--- CMakeCXXInformation.cmake 6 Aug 2008 21:04:18 -0000 1.24.2.2
***************
*** 177,181 ****
# CMAKE_CXX_CREATE_SHARED_LIBRARY
# CMAKE_CXX_CREATE_SHARED_MODULE
- # CMAKE_CXX_CREATE_STATIC_LIBRARY
# CMAKE_CXX_COMPILE_OBJECT
# CMAKE_CXX_LINK_EXECUTABLE
--- 177,180 ----
***************
*** 213,222 ****
! # create a C++ static library
! IF(NOT CMAKE_CXX_CREATE_STATIC_LIBRARY)
! SET(CMAKE_CXX_CREATE_STATIC_LIBRARY
! " cr "
! " ")
! ENDIF(NOT CMAKE_CXX_CREATE_STATIC_LIBRARY)
# compile a C++ file into an object file
--- 212,220 ----
! # Create a static archive incrementally for large object file counts.
! # If CMAKE_CXX_CREATE_STATIC_LIBRARY is set it will override these.
! SET(CMAKE_CXX_ARCHIVE_CREATE " cr ")
! SET(CMAKE_CXX_ARCHIVE_APPEND " r ")
! SET(CMAKE_CXX_ARCHIVE_FINISH "")
# compile a C++ file into an object file
Index: CMakeCInformation.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeCInformation.cmake,v
retrieving revision 1.20.2.1
retrieving revision 1.20.2.2
diff -C 2 -d -r1.20.2.1 -r1.20.2.2
*** CMakeCInformation.cmake 21 Apr 2008 19:21:56 -0000 1.20.2.1
--- CMakeCInformation.cmake 6 Aug 2008 21:04:18 -0000 1.20.2.2
***************
*** 99,103 ****
# CMAKE_C_CREATE_SHARED_LIBRARY
# CMAKE_C_CREATE_SHARED_MODULE
- # CMAKE_C_CREATE_STATIC_LIBRARY
# CMAKE_C_COMPILE_OBJECT
# CMAKE_C_LINK_EXECUTABLE
--- 99,102 ----
***************
*** 134,143 ****
ENDIF(NOT CMAKE_C_CREATE_SHARED_MODULE)
! # create a C static library
! IF(NOT CMAKE_C_CREATE_STATIC_LIBRARY)
! SET(CMAKE_C_CREATE_STATIC_LIBRARY
! " cr "
! " ")
! ENDIF(NOT CMAKE_C_CREATE_STATIC_LIBRARY)
# compile a C file into an object file
--- 133,141 ----
ENDIF(NOT CMAKE_C_CREATE_SHARED_MODULE)
! # Create a static archive incrementally for large object file counts.
! # If CMAKE_C_CREATE_STATIC_LIBRARY is set it will override these.
! SET(CMAKE_C_ARCHIVE_CREATE " cr ")
! SET(CMAKE_C_ARCHIVE_APPEND " r ")
! SET(CMAKE_C_ARCHIVE_FINISH "")
# compile a C file into an object file
Index: CMakeFortranInformation.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeFortranInformation.cmake,v
retrieving revision 1.18.2.2
retrieving revision 1.18.2.3
diff -C 2 -d -r1.18.2.2 -r1.18.2.3
*** CMakeFortranInformation.cmake 23 Apr 2008 02:05:39 -0000 1.18.2.2
--- CMakeFortranInformation.cmake 6 Aug 2008 21:04:18 -0000 1.18.2.3
***************
*** 120,124 ****
# CMAKE_Fortran_CREATE_SHARED_LIBRARY
# CMAKE_Fortran_CREATE_SHARED_MODULE
- # CMAKE_Fortran_CREATE_STATIC_LIBRARY
# CMAKE_Fortran_COMPILE_OBJECT
# CMAKE_Fortran_LINK_EXECUTABLE
--- 120,123 ----
***************
*** 135,144 ****
ENDIF(NOT CMAKE_Fortran_CREATE_SHARED_MODULE)
! # create a Fortran static library
! IF(NOT CMAKE_Fortran_CREATE_STATIC_LIBRARY)
! SET(CMAKE_Fortran_CREATE_STATIC_LIBRARY
! " cr "
! " ")
! ENDIF(NOT CMAKE_Fortran_CREATE_STATIC_LIBRARY)
# compile a Fortran file into an object file
--- 134,142 ----
ENDIF(NOT CMAKE_Fortran_CREATE_SHARED_MODULE)
! # Create a static archive incrementally for large object file counts.
! # If CMAKE_Fortran_CREATE_STATIC_LIBRARY is set it will override these.
! SET(CMAKE_Fortran_ARCHIVE_CREATE " cr ")
! SET(CMAKE_Fortran_ARCHIVE_APPEND " r ")
! SET(CMAKE_Fortran_ARCHIVE_FINISH "")
# compile a Fortran file into an object file
Index: FindKDE3.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindKDE3.cmake,v
retrieving revision 1.10.2.2
retrieving revision 1.10.2.3
diff -C 2 -d -r1.10.2.2 -r1.10.2.3
*** FindKDE3.cmake 25 Jun 2008 13:51:31 -0000 1.10.2.2
--- FindKDE3.cmake 6 Aug 2008 21:04:18 -0000 1.10.2.3
***************
*** 191,195 ****
IF("${out}" MATCHES "2.9[56]")
SET(_KDE3_USE_FLAGS FALSE)
! ENDIF("${out}" out MATCHES "2.9[56]")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
--- 191,195 ----
IF("${out}" MATCHES "2.9[56]")
SET(_KDE3_USE_FLAGS FALSE)
! ENDIF("${out}" MATCHES "2.9[56]")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
Index: FindImageMagick.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindImageMagick.cmake,v
retrieving revision 1.4.14.1
retrieving revision 1.4.14.2
diff -C 2 -d -r1.4.14.1 -r1.4.14.2
*** FindImageMagick.cmake 30 Jul 2008 18:54:49 -0000 1.4.14.1
--- FindImageMagick.cmake 6 Aug 2008 21:04:18 -0000 1.4.14.2
***************
*** 30,34 ****
# Magick++
# MagickWand
! # Magick
#
# For these components the following variables are set:
--- 30,34 ----
# Magick++
# MagickWand
! # MagickCore
#
# For these components the following variables are set:
From cmake-commits at cmake.org Wed Aug 6 17:04:21 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Wed, 06 Aug 2008 21:04:21 +0000
Subject: [Cmake-commits] [cmake-commits] hoffman committed Darwin.cmake
1.45.2.1 1.45.2.2 Linux-Intel-C.cmake 1.1.2.2 1.1.2.3
Linux-Intel-CXX.cmake 1.3.2.2 1.3.2.3
Message-ID: <20080806210421.57997232F@public.kitware.com>
Update of /cvsroot/CMake/CMake/Modules/Platform
In directory public:/mounts/ram/cvs-serv12802/Modules/Platform
Modified Files:
Tag: CMake-2-6
Darwin.cmake Linux-Intel-C.cmake Linux-Intel-CXX.cmake
Log Message:
ENH: merge in fixes from main tree 2.6.2 RC 1
Index: Linux-Intel-C.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/Platform/Linux-Intel-C.cmake,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C 2 -d -r1.1.2.2 -r1.1.2.3
*** Linux-Intel-C.cmake 1 May 2008 16:35:39 -0000 1.1.2.2
--- Linux-Intel-C.cmake 6 Aug 2008 21:04:19 -0000 1.1.2.3
***************
*** 5,8 ****
--- 5,11 ----
SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
+ SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE " -E > ")
+ SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE " -S -o ")
+
FIND_PROGRAM(XIAR xiar)
IF(XIAR)
Index: Darwin.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/Platform/Darwin.cmake,v
retrieving revision 1.45.2.1
retrieving revision 1.45.2.2
diff -C 2 -d -r1.45.2.1 -r1.45.2.2
*** Darwin.cmake 1 May 2008 16:35:38 -0000 1.45.2.1
--- Darwin.cmake 6 Aug 2008 21:04:18 -0000 1.45.2.2
***************
*** 28,31 ****
--- 28,36 ----
SET(CMAKE_DL_LIBS "")
+ SET(CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG -Wl,-compatibility_version,)
+ SET(CMAKE_C_OSX_CURRENT_VERSION_FLAG -Wl,-current_version,)
+ SET(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}")
+ SET(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}")
+
SET(CMAKE_C_LINK_FLAGS "-headerpad_max_install_names")
SET(CMAKE_CXX_LINK_FLAGS "-headerpad_max_install_names")
Index: Linux-Intel-CXX.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/Platform/Linux-Intel-CXX.cmake,v
retrieving revision 1.3.2.2
retrieving revision 1.3.2.3
diff -C 2 -d -r1.3.2.2 -r1.3.2.3
*** Linux-Intel-CXX.cmake 1 May 2008 16:35:39 -0000 1.3.2.2
--- Linux-Intel-CXX.cmake 6 Aug 2008 21:04:19 -0000 1.3.2.3
***************
*** 5,8 ****
--- 5,11 ----
SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
+ SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE " -E > ")
+ SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE " -S -o ")
+
FIND_PROGRAM(XIAR xiar)
IF(XIAR)
From cmake-commits at cmake.org Wed Aug 6 17:04:23 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Wed, 06 Aug 2008 21:04:23 +0000
Subject: [Cmake-commits] [cmake-commits] hoffman committed CMakeLists.txt
1.36.2.4 1.36.2.5
Message-ID: <20080806210423.14C932347@public.kitware.com>
Update of /cvsroot/CMake/CMake/Tests/CustomCommand
In directory public:/mounts/ram/cvs-serv12802/Tests/CustomCommand
Modified Files:
Tag: CMake-2-6
CMakeLists.txt
Log Message:
ENH: merge in fixes from main tree 2.6.2 RC 1
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CustomCommand/CMakeLists.txt,v
retrieving revision 1.36.2.4
retrieving revision 1.36.2.5
diff -C 2 -d -r1.36.2.4 -r1.36.2.5
*** CMakeLists.txt 13 Jun 2008 12:55:18 -0000 1.36.2.4
--- CMakeLists.txt 6 Aug 2008 21:04:20 -0000 1.36.2.5
***************
*** 84,87 ****
--- 84,97 ----
INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR})
+ # Test generation of a file to the build tree without full path. As
+ # of CMake 2.6 custom command outputs specified by relative path go in
+ # the build tree.
+ ADD_CUSTOM_COMMAND(
+ OUTPUT doc1.txt
+ COMMAND ${CMAKE_COMMAND} -E echo "Example Document Target" > doc1.txt
+ DEPENDS doc1.tex
+ VERBATIM
+ )
+
# Add a custom target to drive generation of doc1.h.
ADD_CUSTOM_TARGET(TDocument ALL
From cmake-commits at cmake.org Wed Aug 6 17:04:22 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Wed, 06 Aug 2008 21:04:22 +0000
Subject: [Cmake-commits] [cmake-commits] hoffman committed
cmCTestCoverageHandler.cxx 1.51.2.1 1.51.2.2
Message-ID: <20080806210422.B5D14232F@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source/CTest
In directory public:/mounts/ram/cvs-serv12802/Source/CTest
Modified Files:
Tag: CMake-2-6
cmCTestCoverageHandler.cxx
Log Message:
ENH: merge in fixes from main tree 2.6.2 RC 1
Index: cmCTestCoverageHandler.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestCoverageHandler.cxx,v
retrieving revision 1.51.2.1
retrieving revision 1.51.2.2
diff -C 2 -d -r1.51.2.1 -r1.51.2.2
*** cmCTestCoverageHandler.cxx 15 May 2008 19:39:58 -0000 1.51.2.1
--- cmCTestCoverageHandler.cxx 6 Aug 2008 21:04:20 -0000 1.51.2.2
***************
*** 641,644 ****
--- 641,656 ----
//----------------------------------------------------------------------
+ // Fix for issue #4971 where the case of the drive letter component of
+ // the filenames might be different when analyzing gcov output.
+ //
+ // Compare file names: fnc(fn1) == fnc(fn2) // fnc == file name compare
+ //
+ #ifdef _WIN32
+ #define fnc(s) cmSystemTools::LowerCase(s)
+ #else
+ #define fnc(s) s
+ #endif
+
+ //----------------------------------------------------------------------
int cmCTestCoverageHandler::HandleGCovCoverage(
cmCTestCoverageHandlerContainer* cont)
***************
*** 970,976 ****
{
gcovFile = "";
// Is it in the source dir?
if ( sourceFile.size() > cont->SourceDir.size() &&
! sourceFile.substr(0, cont->SourceDir.size()) == cont->SourceDir &&
sourceFile[cont->SourceDir.size()] == '/' )
{
--- 982,990 ----
{
gcovFile = "";
+
// Is it in the source dir?
if ( sourceFile.size() > cont->SourceDir.size() &&
! (fnc(sourceFile.substr(0, cont->SourceDir.size())) ==
! fnc(cont->SourceDir)) &&
sourceFile[cont->SourceDir.size()] == '/' )
{
***************
*** 982,988 ****
= cmSystemTools::CollapseFullPath(sourceFile.c_str());
}
// Binary dir?
if ( sourceFile.size() > cont->BinaryDir.size() &&
! sourceFile.substr(0, cont->BinaryDir.size()) == cont->BinaryDir &&
sourceFile[cont->BinaryDir.size()] == '/' )
{
--- 996,1004 ----
= cmSystemTools::CollapseFullPath(sourceFile.c_str());
}
+
// Binary dir?
if ( sourceFile.size() > cont->BinaryDir.size() &&
! (fnc(sourceFile.substr(0, cont->BinaryDir.size())) ==
! fnc(cont->BinaryDir)) &&
sourceFile[cont->BinaryDir.size()] == '/' )
{
***************
*** 994,997 ****
--- 1010,1014 ----
= cmSystemTools::CollapseFullPath(sourceFile.c_str());
}
+
if ( actualSourceFile.empty() )
{
***************
*** 1000,1012 ****
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
"Something went wrong" << std::endl);
! cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "File: ["
<< sourceFile.c_str() << "]" << std::endl);
! cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "s: ["
! << sourceFile.substr(0, cont->SourceDir.size()) << "]"
<< std::endl);
! cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "b: ["
! << sourceFile.substr(0, cont->BinaryDir.size()) << "]"
<< std::endl);
! *cont->OFS << " Something went wrong. Cannot find: "
<< sourceFile.c_str()
<< " in source dir: " << cont->SourceDir.c_str()
--- 1017,1032 ----
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
"Something went wrong" << std::endl);
! cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
! "Cannot find file: ["
<< sourceFile.c_str() << "]" << std::endl);
! cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
! " in source dir: ["
! << cont->SourceDir.c_str() << "]"
<< std::endl);
! cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
! " or binary dir: ["
! << cont->BinaryDir.size() << "]"
<< std::endl);
! *cont->OFS << " Something went wrong. Cannot find file: "
<< sourceFile.c_str()
<< " in source dir: " << cont->SourceDir.c_str()
From cmake-commits at cmake.org Wed Aug 6 17:04:22 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Wed, 06 Aug 2008 21:04:22 +0000
Subject: [Cmake-commits] [cmake-commits] hoffman committed CMakeLists.txt
1.397.2.3 1.397.2.4 cmELF.cxx 1.8.2.2 1.8.2.3
cmExtraEclipseCDT4Generator.cxx 1.13.2.1 1.13.2.2
cmGlobalUnixMakefileGenerator3.cxx 1.126.2.3 1.126.2.4
cmGlobalXCodeGenerator.cxx 1.186.2.5 1.186.2.6
cmLocalGenerator.cxx 1.269.2.5 1.269.2.6
cmLocalVisualStudio7Generator.cxx 1.217.2.8 1.217.2.9
cmMakefile.cxx 1.463.2.6 1.463.2.7
cmMakefileLibraryTargetGenerator.cxx 1.58.2.2 1.58.2.3
cmMakefileLibraryTargetGenerator.h 1.6.2.1 1.6.2.2
cmSourceFileLocation.cxx 1.3.2.3 1.3.2.4
cmSourceFileLocation.h 1.2 1.2.2.1 cmTarget.cxx 1.207.2.8
1.207.2.9 cmTarget.h 1.109.2.5 1.109.2.6 cmake.cxx 1.375.2.10
1.375.2.11 cmake.h 1.109.2.5 1.109.2.6 cmakemain.cxx 1.80.2.1
1.80.2.2
Message-ID: <20080806210424.3A5292334@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv12802/Source
Modified Files:
Tag: CMake-2-6
CMakeLists.txt cmELF.cxx cmExtraEclipseCDT4Generator.cxx
cmGlobalUnixMakefileGenerator3.cxx cmGlobalXCodeGenerator.cxx
cmLocalGenerator.cxx cmLocalVisualStudio7Generator.cxx
cmMakefile.cxx cmMakefileLibraryTargetGenerator.cxx
cmMakefileLibraryTargetGenerator.h cmSourceFileLocation.cxx
cmSourceFileLocation.h cmTarget.cxx cmTarget.h cmake.cxx
cmake.h cmakemain.cxx
Log Message:
ENH: merge in fixes from main tree 2.6.2 RC 1
Index: cmSourceFileLocation.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSourceFileLocation.cxx,v
retrieving revision 1.3.2.3
retrieving revision 1.3.2.4
diff -C 2 -d -r1.3.2.3 -r1.3.2.4
*** cmSourceFileLocation.cxx 30 Jul 2008 18:54:49 -0000 1.3.2.3
--- cmSourceFileLocation.cxx 6 Aug 2008 21:04:19 -0000 1.3.2.4
***************
*** 153,180 ****
//----------------------------------------------------------------------------
bool cmSourceFileLocation::Matches(cmSourceFileLocation const& loc)
{
! if(this->AmbiguousExtension || loc.AmbiguousExtension)
{
! // Need to compare without the file extension.
! std::string thisName;
! if(this->AmbiguousExtension)
! {
! thisName = this->Name;
! }
! else
! {
! thisName = cmSystemTools::GetFilenameWithoutLastExtension(this->Name);
! }
! std::string locName;
! if(loc.AmbiguousExtension)
{
! locName = loc.Name;
}
! else
{
! locName = cmSystemTools::GetFilenameWithoutLastExtension(loc.Name);
}
! if(thisName != locName)
{
return false;
--- 153,218 ----
//----------------------------------------------------------------------------
+ bool
+ cmSourceFileLocation
+ ::MatchesAmbiguousExtension(cmSourceFileLocation const& loc) const
+ {
+ // This location's extension is not ambiguous but loc's extension
+ // is. See if the names match as-is.
+ if(this->Name == loc.Name)
+ {
+ return true;
+ }
+
+ // Check if loc's name could possibly be extended to our name by
+ // adding an extension.
+ if(!(this->Name.size() > loc.Name.size() &&
+ this->Name.substr(0, loc.Name.size()) == loc.Name &&
+ this->Name[loc.Name.size()] == '.'))
+ {
+ return false;
+ }
+
+ // Only a fixed set of extensions will be tried to match a file on
+ // disk. One of these must match if loc refers to this source file.
+ std::string ext = this->Name.substr(loc.Name.size()+1);
+ cmMakefile* mf = this->Makefile;
+ const std::vector& srcExts = mf->GetSourceExtensions();
+ if(std::find(srcExts.begin(), srcExts.end(), ext) != srcExts.end())
+ {
+ return true;
+ }
+ const std::vector& hdrExts = mf->GetHeaderExtensions();
+ if(std::find(hdrExts.begin(), hdrExts.end(), ext) != hdrExts.end())
+ {
+ return true;
+ }
+ return false;
+ }
+
+ //----------------------------------------------------------------------------
bool cmSourceFileLocation::Matches(cmSourceFileLocation const& loc)
{
! if(this->AmbiguousExtension && loc.AmbiguousExtension)
{
! // Both extensions are ambiguous. Since only the old fixed set of
! // extensions will be tried, the names must match at this point to
! // be the same file.
! if(this->Name != loc.Name)
{
! return false;
}
! }
! else if(this->AmbiguousExtension)
! {
! // Only "this" extension is ambiguous.
! if(!loc.MatchesAmbiguousExtension(*this))
{
! return false;
}
! }
! else if(loc.AmbiguousExtension)
! {
! // Only "loc" extension is ambiguous.
! if(!this->MatchesAmbiguousExtension(loc))
{
return false;
***************
*** 183,187 ****
else
{
! // Compare with extension.
if(this->Name != loc.Name)
{
--- 221,225 ----
else
{
! // Neither extension is ambiguous.
if(this->Name != loc.Name)
{
Index: cmLocalVisualStudio7Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio7Generator.cxx,v
retrieving revision 1.217.2.8
retrieving revision 1.217.2.9
diff -C 2 -d -r1.217.2.8 -r1.217.2.9
*** cmLocalVisualStudio7Generator.cxx 30 Jun 2008 20:10:32 -0000 1.217.2.8
--- cmLocalVisualStudio7Generator.cxx 6 Aug 2008 21:04:19 -0000 1.217.2.9
***************
*** 400,403 ****
--- 400,404 ----
{"StructMemberAlignment", "Zp4", "struct align 4 byte ", "3", 0},
{"StructMemberAlignment", "Zp8", "struct align 8 byte ", "4", 0},
+ {"WarningLevel", "W0", "Warning level", "0", 0},
{"WarningLevel", "W1", "Warning level", "1", 0},
{"WarningLevel", "W2", "Warning level", "2", 0},
Index: cmake.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.h,v
retrieving revision 1.109.2.5
retrieving revision 1.109.2.6
diff -C 2 -d -r1.109.2.5 -r1.109.2.6
*** cmake.h 25 Jun 2008 13:51:32 -0000 1.109.2.5
--- cmake.h 6 Aug 2008 21:04:20 -0000 1.109.2.6
***************
*** 315,318 ****
--- 315,321 ----
void SetDebugOutputOn(bool b) { this->DebugOutput = b;}
+ // Do we want trace output during the cmake run.
+ bool GetTrace() { return this->Trace;}
+ void SetTrace(bool b) { this->Trace = b;}
// Define a property
void DefineProperty(const char *name, cmProperty::ScopeType scope,
***************
*** 439,442 ****
--- 442,446 ----
bool ScriptMode;
bool DebugOutput;
+ bool Trace;
std::string CMakeEditCommand;
std::string CMakeCommand;
Index: cmGlobalUnixMakefileGenerator3.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalUnixMakefileGenerator3.cxx,v
retrieving revision 1.126.2.3
retrieving revision 1.126.2.4
diff -C 2 -d -r1.126.2.3 -r1.126.2.4
*** cmGlobalUnixMakefileGenerator3.cxx 13 Jun 2008 12:55:17 -0000 1.126.2.3
--- cmGlobalUnixMakefileGenerator3.cxx 6 Aug 2008 21:04:19 -0000 1.126.2.4
***************
*** 60,65 ****
if(!mf->GetDefinition(langComp.c_str()))
{
! cmSystemTools::Error(langComp.c_str(),
! " not set, after EnableLanguage");
continue;
}
--- 60,68 ----
if(!mf->GetDefinition(langComp.c_str()))
{
! if(!optional)
! {
! cmSystemTools::Error(langComp.c_str(),
! " not set, after EnableLanguage");
! }
continue;
}
Index: cmSourceFileLocation.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSourceFileLocation.h,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C 2 -d -r1.2 -r1.2.2.1
*** cmSourceFileLocation.h 18 Jun 2007 15:59:23 -0000 1.2
--- cmSourceFileLocation.h 6 Aug 2008 21:04:19 -0000 1.2.2.1
***************
*** 95,98 ****
--- 95,100 ----
std::string Name;
+ bool MatchesAmbiguousExtension(cmSourceFileLocation const& loc) const;
+
// Update the location with additional knowledge.
void Update(cmSourceFileLocation const& loc);
Index: cmake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.cxx,v
retrieving revision 1.375.2.10
retrieving revision 1.375.2.11
diff -C 2 -d -r1.375.2.10 -r1.375.2.11
*** cmake.cxx 31 Jul 2008 15:52:24 -0000 1.375.2.10
--- cmake.cxx 6 Aug 2008 21:04:20 -0000 1.375.2.11
***************
*** 141,144 ****
--- 141,145 ----
cmake::cmake()
{
+ this->Trace = false;
this->SuppressDevWarnings = false;
this->DoSuppressDevWarnings = false;
***************
*** 619,622 ****
--- 620,628 ----
this->SetDebugOutputOn(true);
}
+ else if(arg.find("--trace",0) == 0)
+ {
+ std::cout << "Running with trace output on.\n";
+ this->SetTrace(true);
+ }
else if(arg.find("-G",0) == 0)
{
***************
*** 852,856 ****
std::string cpackCommand = cmSystemTools::GetFilenamePath(cMakeSelf) +
"/cpack" + cmSystemTools::GetFilenameExtension(cMakeSelf);
! if(cmSystemTools::FileExists(ctestCommand.c_str()))
{
this->CacheManager->AddCacheEntry
--- 858,862 ----
std::string cpackCommand = cmSystemTools::GetFilenamePath(cMakeSelf) +
"/cpack" + cmSystemTools::GetFilenameExtension(cMakeSelf);
! if(cmSystemTools::FileExists(cpackCommand.c_str()))
{
this->CacheManager->AddCacheEntry
***************
*** 1182,1186 ****
<< "\n";
return 0;
! }
// Command to calculate the md5sum of a file
--- 1188,1192 ----
<< "\n";
return 0;
! }
// Command to calculate the md5sum of a file
Index: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.269.2.5
retrieving revision 1.269.2.6
diff -C 2 -d -r1.269.2.5 -r1.269.2.6
*** cmLocalGenerator.cxx 30 Jul 2008 18:54:49 -0000 1.269.2.5
--- cmLocalGenerator.cxx 6 Aug 2008 21:04:19 -0000 1.269.2.6
***************
*** 1574,1578 ****
{
rpath += cli.GetRuntimeFlag();
! rpath += this->Convert(ri->c_str(), FULL, SHELL, false);
rpath += " ";
}
--- 1574,1578 ----
{
rpath += cli.GetRuntimeFlag();
! rpath += this->Convert(ri->c_str(), NONE, SHELL, false);
rpath += " ";
}
***************
*** 1741,1744 ****
--- 1741,1753 ----
return inName;
}
+
+ // Check for a source file in this directory that matches the
+ // dependency.
+ if(cmSourceFile* sf = this->Makefile->GetSource(inName))
+ {
+ name = sf->GetFullPath();
+ return name;
+ }
+
// Treat the name as relative to the source directory in which it
// was given.
***************
*** 2580,2584 ****
flags |= cmsysSystem_Shell_Flag_VSIDE;
}
! else
{
flags |= cmsysSystem_Shell_Flag_Make;
--- 2589,2593 ----
flags |= cmsysSystem_Shell_Flag_VSIDE;
}
! else if(!this->LinkScriptShell)
{
flags |= cmsysSystem_Shell_Flag_Make;
Index: cmExtraEclipseCDT4Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmExtraEclipseCDT4Generator.cxx,v
retrieving revision 1.13.2.1
retrieving revision 1.13.2.2
diff -C 2 -d -r1.13.2.1 -r1.13.2.2
*** cmExtraEclipseCDT4Generator.cxx 8 Apr 2008 16:22:48 -0000 1.13.2.1
--- cmExtraEclipseCDT4Generator.cxx 6 Aug 2008 21:04:19 -0000 1.13.2.2
***************
*** 352,356 ****
}
// for EXECUTABLE_OUTPUT_PATH when not in binary dir
! std::string outputPath = mf->GetDefinition("EXECUTABLE_OUTPUT_PATH");
if (!outputPath.empty() && !cmSystemTools::IsSubDirectory(
outputPath.c_str(), this->HomeOutputDirectory.c_str()))
--- 352,356 ----
}
// for EXECUTABLE_OUTPUT_PATH when not in binary dir
! std::string outputPath = mf->GetSafeDefinition("EXECUTABLE_OUTPUT_PATH");
if (!outputPath.empty() && !cmSystemTools::IsSubDirectory(
outputPath.c_str(), this->HomeOutputDirectory.c_str()))
***************
*** 369,375 ****
}
// for LIBRARY_OUTPUT_PATH when not in binary dir
! if (outputPath != mf->GetDefinition("LIBRARY_OUTPUT_PATH"))
{
! outputPath = mf->GetDefinition("LIBRARY_OUTPUT_PATH");
if (!outputPath.empty() && !cmSystemTools::IsSubDirectory(
outputPath.c_str(), this->HomeOutputDirectory.c_str()))
--- 369,375 ----
}
// for LIBRARY_OUTPUT_PATH when not in binary dir
! if (outputPath != mf->GetSafeDefinition("LIBRARY_OUTPUT_PATH"))
{
! outputPath = mf->GetSafeDefinition("LIBRARY_OUTPUT_PATH");
if (!outputPath.empty() && !cmSystemTools::IsSubDirectory(
outputPath.c_str(), this->HomeOutputDirectory.c_str()))
Index: cmMakefileLibraryTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileLibraryTargetGenerator.cxx,v
retrieving revision 1.58.2.2
retrieving revision 1.58.2.3
diff -C 2 -d -r1.58.2.2 -r1.58.2.3
*** cmMakefileLibraryTargetGenerator.cxx 21 Apr 2008 00:44:52 -0000 1.58.2.2
--- cmMakefileLibraryTargetGenerator.cxx 6 Aug 2008 21:04:19 -0000 1.58.2.3
***************
*** 365,368 ****
--- 365,376 ----
this->LocalGenerator->AppendFlags(linkFlags, extraFlags);
+ // Add OSX version flags, if any.
+ if(this->Target->GetType() == cmTarget::SHARED_LIBRARY ||
+ this->Target->GetType() == cmTarget::MODULE_LIBRARY)
+ {
+ this->AppendOSXVerFlag(linkFlags, linkLanguage, "COMPATIBILITY", true);
+ this->AppendOSXVerFlag(linkFlags, linkLanguage, "CURRENT", false);
+ }
+
// Construct the name of the library.
std::string targetName;
***************
*** 605,608 ****
--- 613,617 ----
// For static libraries there might be archiving rules.
+ bool haveStaticLibraryRule = false;
std::vector archiveCreateCommands;
std::vector archiveAppendCommands;
***************
*** 611,614 ****
--- 620,625 ----
if(this->Target->GetType() == cmTarget::STATIC_LIBRARY)
{
+ haveStaticLibraryRule =
+ this->Makefile->GetDefinition(linkRuleVar)? true:false;
std::string arCreateVar = "CMAKE_";
arCreateVar += linkLanguage;
***************
*** 636,639 ****
--- 647,651 ----
// Decide whether to use archiving rules.
bool useArchiveRules =
+ !haveStaticLibraryRule &&
!archiveCreateCommands.empty() && !archiveAppendCommands.empty();
if(useArchiveRules)
***************
*** 906,907 ****
--- 918,953 ----
libCleanFiles.begin(),libCleanFiles.end());
}
+
+ //----------------------------------------------------------------------------
+ void
+ cmMakefileLibraryTargetGenerator
+ ::AppendOSXVerFlag(std::string& flags, const char* lang,
+ const char* name, bool so)
+ {
+ // Lookup the flag to specify the version.
+ std::string fvar = "CMAKE_";
+ fvar += lang;
+ fvar += "_OSX_";
+ fvar += name;
+ fvar += "_VERSION_FLAG";
+ const char* flag = this->Makefile->GetDefinition(fvar.c_str());
+
+ // Skip if no such flag.
+ if(!flag)
+ {
+ return;
+ }
+
+ // Lookup the target version information.
+ int major;
+ int minor;
+ int patch;
+ this->Target->GetTargetVersion(so, major, minor, patch);
+ if(major > 0 || minor > 0 || patch > 0)
+ {
+ // Append the flag since a non-zero version is specified.
+ cmOStringStream vflag;
+ vflag << flag << major << "." << minor << "." << patch;
+ this->LocalGenerator->AppendFlags(flags, vflag.str().c_str());
+ }
+ }
Index: cmGlobalXCodeGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalXCodeGenerator.cxx,v
retrieving revision 1.186.2.5
retrieving revision 1.186.2.6
diff -C 2 -d -r1.186.2.5 -r1.186.2.6
*** cmGlobalXCodeGenerator.cxx 15 Jul 2008 15:35:46 -0000 1.186.2.5
--- cmGlobalXCodeGenerator.cxx 6 Aug 2008 21:04:19 -0000 1.186.2.6
***************
*** 1456,1463 ****
buildSettings->AddAttribute("LIBRARY_STYLE",
this->CreateString("DYNAMIC"));
- buildSettings->AddAttribute("DYLIB_COMPATIBILITY_VERSION",
- this->CreateString("1"));
- buildSettings->AddAttribute("DYLIB_CURRENT_VERSION",
- this->CreateString("1"));
break;
}
--- 1456,1459 ----
***************
*** 1677,1680 ****
--- 1673,1708 ----
"-Wmost -Wno-four-char-constants"
" -Wno-unknown-pragmas"));
+
+ // Runtime version information.
+ if(target.GetType() == cmTarget::SHARED_LIBRARY)
+ {
+ int major;
+ int minor;
+ int patch;
+
+ // VERSION -> current_version
+ target.GetTargetVersion(false, major, minor, patch);
+ if(major == 0 && minor == 0 && patch == 0)
+ {
+ // Xcode always wants at least 1.0.0
+ major = 1;
+ }
+ cmOStringStream v;
+ v << major << "." << minor << "." << patch;
+ buildSettings->AddAttribute("DYLIB_CURRENT_VERSION",
+ this->CreateString(v.str().c_str()));
+
+ // SOVERSION -> compatibility_version
+ target.GetTargetVersion(true, major, minor, patch);
+ if(major == 0 && minor == 0 && patch == 0)
+ {
+ // Xcode always wants at least 1.0.0
+ major = 1;
+ }
+ cmOStringStream vso;
+ vso << major << "." << minor << "." << patch;
+ buildSettings->AddAttribute("DYLIB_COMPATIBILITY_VERSION",
+ this->CreateString(vso.str().c_str()));
+ }
}
Index: cmakemain.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmakemain.cxx,v
retrieving revision 1.80.2.1
retrieving revision 1.80.2.2
diff -C 2 -d -r1.80.2.1 -r1.80.2.2
*** cmakemain.cxx 15 May 2008 19:39:57 -0000 1.80.2.1
--- cmakemain.cxx 6 Aug 2008 21:04:20 -0000 1.80.2.2
***************
*** 102,105 ****
--- 102,108 ----
"Print extra stuff during the cmake run like stack traces with "
"message(send_error ) calls."},
+ {"--trace", "Put cmake in trace mode.",
+ "Print a trace of all calls made and from where with "
+ "message(send_error ) calls."},
{"--help-command cmd [file]", "Print help for a single command and exit.",
"Full documentation specific to the given command is displayed. "
Index: cmTarget.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.h,v
retrieving revision 1.109.2.5
retrieving revision 1.109.2.6
diff -C 2 -d -r1.109.2.5 -r1.109.2.6
*** cmTarget.h 28 Jul 2008 15:31:35 -0000 1.109.2.5
--- cmTarget.h 6 Aug 2008 21:04:20 -0000 1.109.2.6
***************
*** 270,273 ****
--- 270,278 ----
void GetTargetVersion(int& major, int& minor);
+ /** Get the target major, minor, and patch version numbers
+ interpreted from the VERSION or SOVERSION property. Version 0
+ is returned if the property is not set or cannot be parsed. */
+ void GetTargetVersion(bool soversion, int& major, int& minor, int& patch);
+
/**
* Trace through the source files in this target and add al source files
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CMakeLists.txt,v
retrieving revision 1.397.2.3
retrieving revision 1.397.2.4
diff -C 2 -d -r1.397.2.3 -r1.397.2.4
*** CMakeLists.txt 14 Jul 2008 16:24:34 -0000 1.397.2.3
--- CMakeLists.txt 6 Aug 2008 21:04:19 -0000 1.397.2.4
***************
*** 303,306 ****
--- 303,319 ----
ENDIF(CMAKE_BUILD_ON_VISUAL_STUDIO OR MINGW)
+ # With the Microsoft compiler (for _bstr_t support used from
+ # cmCallVisualStudioMacro) we need the comsupp lib. Needed when
+ # _MSC_VER and HAVE_COMDEF_H are defined...
+ #
+ IF(MSVC)
+ IF(MSVC60)
+ # comsuppd did not yet exist in VS6
+ TARGET_LINK_LIBRARIES(CMakeLib comsupp)
+ ELSE(MSVC60)
+ TARGET_LINK_LIBRARIES(CMakeLib optimized comsupp debug comsuppd)
+ ENDIF(MSVC60)
+ ENDIF(MSVC)
+
#
# CTestLib
Index: cmELF.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmELF.cxx,v
retrieving revision 1.8.2.2
retrieving revision 1.8.2.3
diff -C 2 -d -r1.8.2.2 -r1.8.2.3
*** cmELF.cxx 15 May 2008 19:39:54 -0000 1.8.2.2
--- cmELF.cxx 6 Aug 2008 21:04:19 -0000 1.8.2.3
***************
*** 885,890 ****
{
if(this->Valid() &&
! this->Internal->GetFileType() == cmELF::FileTypeExecutable ||
! this->Internal->GetFileType() == cmELF::FileTypeSharedLibrary)
{
return this->Internal->GetRPath();
--- 885,890 ----
{
if(this->Valid() &&
! (this->Internal->GetFileType() == cmELF::FileTypeExecutable ||
! this->Internal->GetFileType() == cmELF::FileTypeSharedLibrary))
{
return this->Internal->GetRPath();
***************
*** 900,905 ****
{
if(this->Valid() &&
! this->Internal->GetFileType() == cmELF::FileTypeExecutable ||
! this->Internal->GetFileType() == cmELF::FileTypeSharedLibrary)
{
return this->Internal->GetRunPath();
--- 900,905 ----
{
if(this->Valid() &&
! (this->Internal->GetFileType() == cmELF::FileTypeExecutable ||
! this->Internal->GetFileType() == cmELF::FileTypeSharedLibrary))
{
return this->Internal->GetRunPath();
Index: cmMakefileLibraryTargetGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileLibraryTargetGenerator.h,v
retrieving revision 1.6.2.1
retrieving revision 1.6.2.2
diff -C 2 -d -r1.6.2.1 -r1.6.2.2
*** cmMakefileLibraryTargetGenerator.h 8 Apr 2008 16:22:50 -0000 1.6.2.1
--- cmMakefileLibraryTargetGenerator.h 6 Aug 2008 21:04:19 -0000 1.6.2.2
***************
*** 42,45 ****
--- 42,48 ----
// Store the computd framework version for OS X Frameworks.
std::string FrameworkVersion;
+
+ void AppendOSXVerFlag(std::string& flags, const char* lang,
+ const char* name, bool so);
};
Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.207.2.8
retrieving revision 1.207.2.9
diff -C 2 -d -r1.207.2.8 -r1.207.2.9
*** cmTarget.cxx 28 Jul 2008 15:31:35 -0000 1.207.2.8
--- cmTarget.cxx 6 Aug 2008 21:04:19 -0000 1.207.2.9
***************
*** 1760,1769 ****
void cmTarget::GetTargetVersion(int& major, int& minor)
{
// Set the default values.
major = 0;
minor = 0;
! // Look for a VERSION property.
! if(const char* version = this->GetProperty("VERSION"))
{
// Try to parse the version number and store the results that were
--- 1760,1779 ----
void cmTarget::GetTargetVersion(int& major, int& minor)
{
+ int patch;
+ this->GetTargetVersion(false, major, minor, patch);
+ }
+
+ //----------------------------------------------------------------------------
+ void cmTarget::GetTargetVersion(bool soversion,
+ int& major, int& minor, int& patch)
+ {
// Set the default values.
major = 0;
minor = 0;
+ patch = 0;
! // Look for a VERSION or SOVERSION property.
! const char* prop = soversion? "SOVERSION" : "VERSION";
! if(const char* version = this->GetProperty(prop))
{
// Try to parse the version number and store the results that were
***************
*** 1771,1776 ****
int parsed_major;
int parsed_minor;
! switch(sscanf(version, "%d.%d", &parsed_major, &parsed_minor))
{
case 2: minor = parsed_minor; // no break!
case 1: major = parsed_major; // no break!
--- 1781,1789 ----
int parsed_major;
int parsed_minor;
! int parsed_patch;
! switch(sscanf(version, "%d.%d.%d",
! &parsed_major, &parsed_minor, &parsed_patch))
{
+ case 3: patch = parsed_patch; // no break!
case 2: minor = parsed_minor; // no break!
case 1: major = parsed_major; // no break!
Index: cmMakefile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.cxx,v
retrieving revision 1.463.2.6
retrieving revision 1.463.2.7
diff -C 2 -d -r1.463.2.6 -r1.463.2.7
*** cmMakefile.cxx 30 Jun 2008 20:10:35 -0000 1.463.2.6
--- cmMakefile.cxx 6 Aug 2008 21:04:19 -0000 1.463.2.7
***************
*** 396,399 ****
--- 396,414 ----
(!this->GetCMakeInstance()->GetScriptMode() || pcmd->IsScriptable()))
{
+ // if trace is one, print out invoke information
+ if(this->GetCMakeInstance()->GetTrace())
+ {
+ cmOStringStream msg;
+ msg << lff.FilePath << "(" << lff.Line << "): ";
+ msg << lff.Name << "(";
+ for(std::vector::const_iterator i =
+ lff.Arguments.begin(); i != lff.Arguments.end(); ++i)
+ {
+ msg << i->Value;
+ msg << " ";
+ }
+ msg << ")";
+ cmSystemTools::Message(msg.str().c_str());
+ }
// Try invoking the command.
if(!pcmd->InvokeInitialPass(lff.Arguments,status) ||
From cmake-commits at cmake.org Wed Aug 6 17:43:39 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Wed, 06 Aug 2008 21:43:39 +0000
Subject: [Cmake-commits] [cmake-commits] alex committed CMakeLists.txt 1.62
1.63
Message-ID: <20080806214339.6EBBC222A@public.kitware.com>
Update of /cvsroot/CMake/CMake/Tests
In directory public:/mounts/ram/cvs-serv16643
Modified Files:
CMakeLists.txt
Log Message:
BUG: fix endif()
Alex
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CMakeLists.txt,v
retrieving revision 1.62
retrieving revision 1.63
diff -C 2 -d -r1.62 -r1.63
*** CMakeLists.txt 6 Aug 2008 20:16:53 -0000 1.62
--- CMakeLists.txt 6 Aug 2008 21:43:34 -0000 1.63
***************
*** 137,141 ****
--build-project Simple
--test-command Simple)
! ENDIF ("${cmakeOutput}" MATCHES CodeBlocks)
ENDIF(${CMAKE_TEST_GENERATOR} MATCHES "Unix Makefiles" OR ${CMAKE_TEST_GENERATOR} MATCHES "KDevelop")
--- 137,141 ----
--build-project Simple
--test-command Simple)
! ENDIF ("${cmakeOutput}" MATCHES KDevelop3)
ENDIF(${CMAKE_TEST_GENERATOR} MATCHES "Unix Makefiles" OR ${CMAKE_TEST_GENERATOR} MATCHES "KDevelop")
From cmake-commits at cmake.org Wed Aug 6 17:48:46 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Wed, 06 Aug 2008 21:48:46 +0000
Subject: [Cmake-commits] [cmake-commits] king committed
cmGlobalGenerator.cxx 1.238 1.239
Message-ID: <20080806214846.508702226@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv16835/Source
Modified Files:
cmGlobalGenerator.cxx
Log Message:
BUG: Fix crash on circular target dependencies
After reporting an error about circular target dependencies do not try
to continue generation because the dependency computation object is not
in a useful state.
Index: cmGlobalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.cxx,v
retrieving revision 1.238
retrieving revision 1.239
diff -C 2 -d -r1.238 -r1.239
*** cmGlobalGenerator.cxx 30 Jul 2008 19:18:19 -0000 1.238
--- cmGlobalGenerator.cxx 6 Aug 2008 21:48:44 -0000 1.239
***************
*** 861,865 ****
{
cmComputeTargetDepends ctd(this);
! ctd.Compute();
std::vector const& targets = ctd.GetTargets();
for(std::vector::const_iterator ti = targets.begin();
--- 861,868 ----
{
cmComputeTargetDepends ctd(this);
! if(!ctd.Compute())
! {
! return;
! }
std::vector const& targets = ctd.GetTargets();
for(std::vector::const_iterator ti = targets.begin();
From cmake-commits at cmake.org Wed Aug 6 17:48:51 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Wed, 06 Aug 2008 21:48:51 +0000
Subject: [Cmake-commits] [cmake-commits] king committed
cmComputeTargetDepends.cxx 1.2 1.3
Message-ID: <20080806214851.2FDB72226@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv16886/Source
Modified Files:
cmComputeTargetDepends.cxx
Log Message:
ENH: Improve readability of circular depends error
When reporting the dependencies in a strongly connected component quote
the target names to make the message more readable no matter the target
name.
Index: cmComputeTargetDepends.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmComputeTargetDepends.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** cmComputeTargetDepends.cxx 7 Feb 2008 21:14:05 -0000 1.2
--- cmComputeTargetDepends.cxx 6 Aug 2008 21:48:49 -0000 1.3
***************
*** 366,370 ****
// Describe the depender.
! e << " " << depender->GetName() << " of type "
<< cmTarget::TargetTypeNames[depender->GetType()] << "\n";
--- 366,370 ----
// Describe the depender.
! e << " \"" << depender->GetName() << "\" of type "
<< cmTarget::TargetTypeNames[depender->GetType()] << "\n";
***************
*** 377,381 ****
{
cmTarget* dependee = this->Targets[j];
! e << " depends on " << dependee->GetName() << "\n";
}
}
--- 377,381 ----
{
cmTarget* dependee = this->Targets[j];
! e << " depends on \"" << dependee->GetName() << "\"\n";
}
}
From cmake-commits at cmake.org Wed Aug 6 17:48:56 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Wed, 06 Aug 2008 21:48:56 +0000
Subject: [Cmake-commits] [cmake-commits] king committed
cmComputeLinkDepends.cxx 1.19 1.20 cmComputeLinkDepends.h
1.10 1.11 cmComputeTargetDepends.cxx 1.3 1.4
cmComputeTargetDepends.h 1.2 1.3
Message-ID: <20080806214856.9A69A2226@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv16932/Source
Modified Files:
cmComputeLinkDepends.cxx cmComputeLinkDepends.h
cmComputeTargetDepends.cxx cmComputeTargetDepends.h
Log Message:
BUG: Avoid bogus dependency on executable targets
When an executable target within the project is named in
target_link_libraries for another target, but the executable does not
have the ENABLE_EXPORTS property set, then the executable cannot really
be linked. This is probably a case where the user intends to link to a
third-party library that happens to have the same name as an executable
target in the project (or else will get an error at build time). We
need to avoid making the other target depend on the executable target
incorrectly, since the executable may actually want to link to that
target and this is not a circular depenency.
Index: cmComputeLinkDepends.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmComputeLinkDepends.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C 2 -d -r1.10 -r1.11
*** cmComputeLinkDepends.h 30 Jul 2008 14:23:41 -0000 1.10
--- cmComputeLinkDepends.h 6 Aug 2008 21:48:53 -0000 1.11
***************
*** 86,89 ****
--- 86,90 ----
std::vector const& libs);
std::string CleanItemName(std::string const& item);
+ cmTarget* FindTargetToLink(const char* name);
// One entry for each unique item.
Index: cmComputeTargetDepends.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmComputeTargetDepends.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** cmComputeTargetDepends.cxx 6 Aug 2008 21:48:49 -0000 1.3
--- cmComputeTargetDepends.cxx 6 Aug 2008 21:48:53 -0000 1.4
***************
*** 215,219 ****
if(emitted.insert(lib->first).second)
{
! this->AddTargetDepend(depender_index, lib->first.c_str());
}
}
--- 215,219 ----
if(emitted.insert(lib->first).second)
{
! this->AddTargetDepend(depender_index, lib->first.c_str(), true);
}
}
***************
*** 227,231 ****
if(emitted.insert(*util).second)
{
! this->AddTargetDepend(depender_index, util->c_str());
}
}
--- 227,231 ----
if(emitted.insert(*util).second)
{
! this->AddTargetDepend(depender_index, util->c_str(), false);
}
}
***************
*** 234,238 ****
//----------------------------------------------------------------------------
void cmComputeTargetDepends::AddTargetDepend(int depender_index,
! const char* dependee_name)
{
// Get the depender.
--- 234,239 ----
//----------------------------------------------------------------------------
void cmComputeTargetDepends::AddTargetDepend(int depender_index,
! const char* dependee_name,
! bool linking)
{
// Get the depender.
***************
*** 249,252 ****
--- 250,263 ----
}
+ // Skip targets that will not really be linked. This is probably a
+ // name conflict between an external library and an executable
+ // within the project.
+ if(linking && dependee &&
+ dependee->GetType() == cmTarget::EXECUTABLE &&
+ !dependee->IsExecutableWithExports())
+ {
+ dependee = 0;
+ }
+
// If not found then skip then the dependee.
if(!dependee)
Index: cmComputeTargetDepends.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmComputeTargetDepends.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** cmComputeTargetDepends.h 7 Feb 2008 21:14:05 -0000 1.2
--- cmComputeTargetDepends.h 6 Aug 2008 21:48:53 -0000 1.3
***************
*** 49,53 ****
void CollectDepends();
void CollectTargetDepends(int depender_index);
! void AddTargetDepend(int depender_index, const char* dependee_name);
void ComputeFinalDepends(cmComputeComponentGraph const& ccg);
--- 49,54 ----
void CollectDepends();
void CollectTargetDepends(int depender_index);
! void AddTargetDepend(int depender_index, const char* dependee_name,
! bool linking);
void ComputeFinalDepends(cmComputeComponentGraph const& ccg);
Index: cmComputeLinkDepends.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmComputeLinkDepends.cxx,v
retrieving revision 1.19
retrieving revision 1.20
diff -C 2 -d -r1.19 -r1.20
*** cmComputeLinkDepends.cxx 30 Jul 2008 14:23:41 -0000 1.19
--- cmComputeLinkDepends.cxx 6 Aug 2008 21:48:53 -0000 1.20
***************
*** 293,297 ****
LinkEntry& entry = this->EntryList[index];
entry.Item = item;
! entry.Target = this->Makefile->FindTargetToUse(entry.Item.c_str());
// If the item has dependencies queue it to follow them.
--- 293,297 ----
LinkEntry& entry = this->EntryList[index];
entry.Item = item;
! entry.Target = this->FindTargetToLink(entry.Item.c_str());
// If the item has dependencies queue it to follow them.
***************
*** 388,392 ****
LinkEntry& entry = this->EntryList[lei->second];
entry.Item = dep.Item;
! entry.Target = this->Makefile->FindTargetToUse(dep.Item.c_str());
// This item was added specifically because it is a dependent
--- 388,392 ----
LinkEntry& entry = this->EntryList[lei->second];
entry.Item = dep.Item;
! entry.Target = this->FindTargetToLink(dep.Item.c_str());
// This item was added specifically because it is a dependent
***************
*** 656,659 ****
--- 656,678 ----
//----------------------------------------------------------------------------
+ cmTarget* cmComputeLinkDepends::FindTargetToLink(const char* name)
+ {
+ // Look for a target.
+ cmTarget* tgt = this->Makefile->FindTargetToUse(name);
+
+ // Skip targets that will not really be linked. This is probably a
+ // name conflict between an external library and an executable
+ // within the project.
+ if(tgt && tgt->GetType() == cmTarget::EXECUTABLE &&
+ !tgt->IsExecutableWithExports())
+ {
+ tgt = 0;
+ }
+
+ // Return the target found, if any.
+ return tgt;
+ }
+
+ //----------------------------------------------------------------------------
void cmComputeLinkDepends::InferDependencies()
{
***************
*** 863,867 ****
// directories of targets linked in another configuration as link
// directories.
! if(cmTarget* tgt = this->Makefile->FindTargetToUse(item.c_str()))
{
if(!tgt->IsImported())
--- 882,886 ----
// directories of targets linked in another configuration as link
// directories.
! if(cmTarget* tgt = this->FindTargetToLink(item.c_str()))
{
if(!tgt->IsImported())
From cmake-commits at cmake.org Thu Aug 7 09:09:48 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Thu, 07 Aug 2008 13:09:48 +0000
Subject: [Cmake-commits] [cmake-commits] king committed CMakeCCompilerABI.c
1.1 1.2 CMakeCCompilerId.c.in 1.3 1.4 CMakeCXXCompilerABI.cpp
1.1 1.2 CMakeCXXCompilerId.cpp.in 1.2 1.3 CheckTypeSizeC.c.in
1.3 1.4 TestEndianess.c.in 1.1 1.2
Message-ID: <20080807130948.148641B4E@public.kitware.com>
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv3460/Modules
Modified Files:
CMakeCCompilerABI.c CMakeCCompilerId.c.in
CMakeCXXCompilerABI.cpp CMakeCXXCompilerId.cpp.in
CheckTypeSizeC.c.in TestEndianess.c.in
Log Message:
ENH: Improve robustness of compiler INFO strings
Compiler INFO strings built at preprocessing time encode information
that must appear as a string literal in the resulting binary. We must
make sure the strings appear in the final binary no matter what compiler
and flags are used. The previous implementation worked in most places
but failed with the GNU linker's --gc-sections option which managed to
discard the string. Instead we make the program return value depend on
an element of the string indexed by a runtime program parameter, which
absolutely requires the string to be present.
Index: CMakeCXXCompilerABI.cpp
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeCXXCompilerABI.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** CMakeCXXCompilerABI.cpp 21 Jan 2008 23:30:17 -0000 1.1
--- CMakeCXXCompilerABI.cpp 7 Aug 2008 13:09:45 -0000 1.2
***************
*** 9,24 ****
/*--------------------------------------------------------------------------*/
! /* Make sure the information strings are referenced. */
! #define REQUIRE(x) (&x[0] != &require)
!
! int main()
{
! const char require = 0;
! return
! (
! REQUIRE(info_sizeof_dptr)
#if defined(ABI_ID)
! && REQUIRE(info_abi)
#endif
! );
}
--- 9,20 ----
/*--------------------------------------------------------------------------*/
! int main(int argc, char* argv[])
{
! int require = 0;
! require += info_sizeof_dptr[argc];
#if defined(ABI_ID)
! require += info_abi[argc];
#endif
! (void)argv;
! return require;
}
Index: CMakeCCompilerABI.c
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeCCompilerABI.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** CMakeCCompilerABI.c 21 Jan 2008 23:30:17 -0000 1.1
--- CMakeCCompilerABI.c 7 Aug 2008 13:09:45 -0000 1.2
***************
*** 13,28 ****
/*--------------------------------------------------------------------------*/
! /* Make sure the information strings are referenced. */
! #define REQUIRE(x) (&x[0] != &require)
!
! int main()
{
! const char require = 0;
! return
! (
! REQUIRE(info_sizeof_dptr)
#if defined(ABI_ID)
! && REQUIRE(info_abi)
#endif
! );
}
--- 13,28 ----
/*--------------------------------------------------------------------------*/
! #ifdef __CLASSIC_C__
! int main(argc, argv) int argc; char *argv[];
! #else
! int main(int argc, char *argv[])
! #endif
{
! int require = 0;
! require += info_sizeof_dptr[argc];
#if defined(ABI_ID)
! require += info_abi[argc];
#endif
! (void)argv;
! return require;
}
Index: TestEndianess.c.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/TestEndianess.c.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** TestEndianess.c.in 10 Aug 2007 17:14:00 -0000 1.1
--- TestEndianess.c.in 7 Aug 2008 13:09:45 -0000 1.2
***************
*** 11,20 ****
#ifdef __CLASSIC_C__
! int main(){
! int ac;
! char*av[];
#else
! int main(int ac, char*av[]){
#endif
! return (&info_little[0] != &info_big[0]);
}
--- 11,23 ----
#ifdef __CLASSIC_C__
! int main(argc, argv) int argc; char *argv[];
#else
! int main(int argc, char *argv[])
#endif
! {
! int require = 0;
! require += info_little[argc];
! require += info_big[argc];
! (void)argv;
! return require;
}
Index: CheckTypeSizeC.c.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CheckTypeSizeC.c.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** CheckTypeSizeC.c.in 5 Jun 2007 14:20:21 -0000 1.3
--- CheckTypeSizeC.c.in 7 Aug 2008 13:09:45 -0000 1.4
***************
*** 30,42 ****
']','\0'};
-
#ifdef __CLASSIC_C__
! int main(){
! int ac;
! char*av[];
#else
! int main(int ac, char*av[]){
#endif
! return (&info_sizeof[0] != &info_sizeof[0]);
}
--- 30,43 ----
']','\0'};
#ifdef __CLASSIC_C__
! int main(argc, argv) int argc; char *argv[];
#else
! int main(int argc, char *argv[])
#endif
! {
! int require = 0;
! require += info_sizeof[argc];
! (void)argv;
! return require;
}
Index: CMakeCCompilerId.c.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeCCompilerId.c.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** CMakeCCompilerId.c.in 10 Mar 2008 13:32:25 -0000 1.3
--- CMakeCCompilerId.c.in 7 Aug 2008 13:09:45 -0000 1.4
***************
*** 3,15 ****
#endif
- /* Provide main() so the program can link. */
#if defined(__18CXX)
# define ID_VOID_MAIN
#endif
- #ifdef ID_VOID_MAIN
- void main() {}
- #else
- int main() { return 0; }
- #endif
#if defined(__INTEL_COMPILER) || defined(__ICC)
--- 3,9 ----
***************
*** 83,84 ****
--- 77,93 ----
@CMAKE_C_COMPILER_ID_PLATFORM_CONTENT@
+
+ /*--------------------------------------------------------------------------*/
+
+ #ifdef ID_VOID_MAIN
+ void main() {}
+ #else
+ int main(int argc, char* argv[])
+ {
+ int require = 0;
+ require += info_compiler[argc];
+ require += info_platform[argc];
+ (void)argv;
+ return require;
+ }
+ #endif
Index: CMakeCXXCompilerId.cpp.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeCXXCompilerId.cpp.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** CMakeCXXCompilerId.cpp.in 10 Mar 2008 13:32:25 -0000 1.2
--- CMakeCXXCompilerId.cpp.in 7 Aug 2008 13:09:45 -0000 1.3
***************
*** 6,12 ****
#endif
- /* Provide main() so the program can link. */
- int main() { return 0; }
-
#if defined(__COMO__)
# define COMPILER_ID "Comeau"
--- 6,9 ----
***************
*** 71,72 ****
--- 68,80 ----
@CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT@
+
+ /*--------------------------------------------------------------------------*/
+
+ int main(int argc, char* argv[])
+ {
+ int require = 0;
+ require += info_compiler[argc];
+ require += info_platform[argc];
+ (void)argv;
+ return require;
+ }
From cmake-commits at cmake.org Thu Aug 7 10:13:17 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Thu, 07 Aug 2008 14:13:17 +0000
Subject: [Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.11
1.12
Message-ID: <20080807141317.3F4AC2051@public.kitware.com>
Update of /cvsroot/CMake/CMake/Tests/Dependency
In directory public:/mounts/ram/cvs-serv9025/Tests/Dependency
Modified Files:
CMakeLists.txt
Log Message:
ENH: Test fake circular dependency case
A recent change fixed a case in which CMake incorrectly diagnosed a
circular dependency involving a non-linkable executable target. This
adds a test for that case.
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/Dependency/CMakeLists.txt,v
retrieving revision 1.11
retrieving revision 1.12
diff -C 2 -d -r1.11 -r1.12
*** CMakeLists.txt 23 Apr 2008 04:40:32 -0000 1.11
--- CMakeLists.txt 7 Aug 2008 14:13:15 -0000 1.12
***************
*** 53,54 ****
--- 53,55 ----
ADD_SUBDIRECTORY(Case2)
ADD_SUBDIRECTORY(Case3)
+ ADD_SUBDIRECTORY(Case4)
From cmake-commits at cmake.org Thu Aug 7 10:13:17 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Thu, 07 Aug 2008 14:13:17 +0000
Subject: [Cmake-commits] [cmake-commits] king committed CMakeLists.txt NONE
1.1 bar.c NONE 1.1 foo.c NONE 1.1
Message-ID: <20080807141317.7E9B121DA@public.kitware.com>
Update of /cvsroot/CMake/CMake/Tests/Dependency/Case4
In directory public:/mounts/ram/cvs-serv9025/Tests/Dependency/Case4
Added Files:
CMakeLists.txt bar.c foo.c
Log Message:
ENH: Test fake circular dependency case
A recent change fixed a case in which CMake incorrectly diagnosed a
circular dependency involving a non-linkable executable target. This
adds a test for that case.
--- NEW FILE: CMakeLists.txt ---
project(CASE4 C)
IF(CMAKE_ANSI_CFLAGS)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}")
ENDIF(CMAKE_ANSI_CFLAGS)
# This is not really a circular dependency. "case4Bar" refers to a
# third-party library that happens to match the executable name, which
# is okay when the executable is not a linkable target (ENABLE_EXPORTS
# is not set). This tests whether CMake avoids incorrectly reporting
# a circular dependency. In practice case4Foo may be a shared
# library, but we skip that here because we do not want it to actually
# have to find the third-party library.
add_library(case4Foo STATIC foo.c)
target_link_libraries(case4Foo case4Bar)
# The executable avoids linking to a library with its own name, which
# has been a CMake-ism for a long time, so we will not get a link
# failure. An imported target or executable with an OUTPUT_NAME set
# may be used if the user really wants to link a third-party library
# into an executable of the same name.
add_executable(case4Bar bar.c)
target_link_libraries(case4Bar case4Foo)
--- NEW FILE: foo.c ---
int foo() { return 0; }
--- NEW FILE: bar.c ---
extern int foo();
int main() { return foo(); }
From cmake-commits at cmake.org Thu Aug 7 17:12:18 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Thu, 07 Aug 2008 21:12:18 +0000
Subject: [Cmake-commits] [cmake-commits] king committed
cmAddSubDirectoryCommand.h 1.7 1.8
Message-ID: <20080807211218.ABB2B1BF0@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv9057/Source
Modified Files:
cmAddSubDirectoryCommand.h
Log Message:
ENH: Clarify documentation of EXCLUDE_FROM_ALL
The add_subdirectory() command's EXCLUDE_FROM_ALL option does not
override inter-target dependencies. This change clarifies the
documentation accordingly.
Index: cmAddSubDirectoryCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmAddSubDirectoryCommand.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C 2 -d -r1.7 -r1.8
*** cmAddSubDirectoryCommand.h 23 Jan 2008 15:27:59 -0000 1.7
--- cmAddSubDirectoryCommand.h 7 Aug 2008 21:12:16 -0000 1.8
***************
*** 80,90 ****
"input file continues beyond this command.\n"
! "If the EXCLUDE_FROM_ALL argument is provided then this subdirectory "
! "will not be included in build by default. Users will have to "
! "explicitly start a build in the generated output directory. "
! "This is useful for having cmake create a build system for a "
! "set of examples in a project. One would want cmake to generate "
! "a single build system for all the examples, but one may not want "
! "the targets to show up in the main build system.";
}
--- 80,98 ----
"input file continues beyond this command.\n"
! "If the EXCLUDE_FROM_ALL argument is provided then targets in the "
! "subdirectory will not be included in the ALL target of the parent "
! "directory by default, and will be excluded from IDE project files. "
! "Users must explicitly build targets in the subdirectory. "
! "This is meant for use when the subdirectory contains a separate part "
! "of the project that is useful but not necessary, such as a set of "
! "examples. "
! "Typically the subdirectory should contain its own project() command "
! "invocation so that a full build system will be generated in the "
! "subdirectory (such as a VS IDE solution file). "
! "Note that inter-target dependencies supercede this exclusion. "
! "If a target built by the parent project depends on a target in the "
! "subdirectory, the dependee target will be included in the parent "
! "project build system to satisfy the dependency."
! ;
}
From cmake-commits at cmake.org Thu Aug 7 17:51:31 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Thu, 07 Aug 2008 21:51:31 +0000
Subject: [Cmake-commits] [cmake-commits] king committed
cmTargetLinkLibrariesCommand.cxx 1.25 1.26
cmTargetLinkLibrariesCommand.h 1.15 1.16
Message-ID: <20080807215131.731F222B9@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv12085/Source
Modified Files:
cmTargetLinkLibrariesCommand.cxx
cmTargetLinkLibrariesCommand.h
Log Message:
ENH: Tolerate repeated link library types
The "debug", "optimized", and "general" link library type specifier
arguments to the target_link_library commands are sometimes repeated in
user code due to variable expansion and other complications. Instead of
silently accepting the duplicates and trying to link to a bogus library
like "optimized.lib", warn and ignore the earlier specifiers.
Index: cmTargetLinkLibrariesCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTargetLinkLibrariesCommand.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -C 2 -d -r1.15 -r1.16
*** cmTargetLinkLibrariesCommand.h 6 Feb 2008 20:23:36 -0000 1.15
--- cmTargetLinkLibrariesCommand.h 7 Aug 2008 21:51:29 -0000 1.16
***************
*** 80,83 ****
--- 80,85 ----
cmTypeMacro(cmTargetLinkLibrariesCommand, cmCommand);
private:
+ void LinkLibraryTypeSpecifierWarning(int left, int right);
+ static const char* LinkLibraryTypeNames[3];
};
Index: cmTargetLinkLibrariesCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTargetLinkLibrariesCommand.cxx,v
retrieving revision 1.25
retrieving revision 1.26
diff -C 2 -d -r1.25 -r1.26
*** cmTargetLinkLibrariesCommand.cxx 23 Jan 2008 15:27:59 -0000 1.25
--- cmTargetLinkLibrariesCommand.cxx 7 Aug 2008 21:51:29 -0000 1.26
***************
*** 17,20 ****
--- 17,27 ----
#include "cmTargetLinkLibrariesCommand.h"
+ const char* cmTargetLinkLibrariesCommand::LinkLibraryTypeNames[3] =
+ {
+ "general",
+ "debug",
+ "optimized"
+ };
+
// cmTargetLinkLibrariesCommand
bool cmTargetLinkLibrariesCommand
***************
*** 33,36 ****
--- 40,48 ----
return true;
}
+
+ // Keep track of link configuration specifiers.
+ cmTarget::LinkLibraryType llt = cmTarget::GENERAL;
+ bool haveLLT = false;
+
// add libraries, nothe that there is an optional prefix
// of debug and optimized than can be used
***************
*** 39,81 ****
for(++i; i != args.end(); ++i)
{
! if (*i == "debug")
{
! ++i;
! if(i == args.end())
{
! this->SetError
! ("The \"debug\" argument must be followed by a library");
! return false;
}
! this->Makefile->AddLinkLibraryForTarget(args[0].c_str(),i->c_str(),
! cmTarget::DEBUG);
}
! else if (*i == "optimized")
{
! ++i;
! if(i == args.end())
{
! this->SetError(
! "The \"optimized\" argument must be followed by a library");
! return false;
}
! this->Makefile->AddLinkLibraryForTarget(args[0].c_str(),i->c_str(),
! cmTarget::OPTIMIZED);
}
! else if (*i == "general")
{
! ++i;
! if(i == args.end())
{
! this->SetError(
! "The \"general\" argument must be followed by a library");
! return false;
}
! this->Makefile->AddLinkLibraryForTarget(args[0].c_str(),i->c_str(),
! cmTarget::GENERAL);
}
else
{
! // make sure the type is correct if it is currently general. So if you
// do a target_link_libraries(foo optimized bar) it will stay optimized
// and not use the lookup. As there maybe the case where someone has
--- 51,91 ----
for(++i; i != args.end(); ++i)
{
! if(*i == "debug")
{
! if(haveLLT)
{
! this->LinkLibraryTypeSpecifierWarning(llt, cmTarget::DEBUG);
}
! llt = cmTarget::DEBUG;
! haveLLT = true;
}
! else if(*i == "optimized")
{
! if(haveLLT)
{
! this->LinkLibraryTypeSpecifierWarning(llt, cmTarget::OPTIMIZED);
}
! llt = cmTarget::OPTIMIZED;
! haveLLT = true;
}
! else if(*i == "general")
{
! if(haveLLT)
{
! this->LinkLibraryTypeSpecifierWarning(llt, cmTarget::GENERAL);
}
! llt = cmTarget::GENERAL;
! haveLLT = true;
! }
! else if(haveLLT)
! {
! // The link type was specified by the previous argument.
! haveLLT = false;
! this->Makefile->AddLinkLibraryForTarget(args[0].c_str(),
! i->c_str(), llt);
}
else
{
! // Lookup old-style cache entry if type is unspecified. So if you
// do a target_link_libraries(foo optimized bar) it will stay optimized
// and not use the lookup. As there maybe the case where someone has
***************
*** 83,87 ****
// only there for backwards compatibility when mixing projects built
// with old versions of CMake and new)
! cmTarget::LinkLibraryType llt = cmTarget::GENERAL;
std::string linkType = args[0];
linkType += "_LINK_TYPE";
--- 93,97 ----
// only there for backwards compatibility when mixing projects built
// with old versions of CMake and new)
! llt = cmTarget::GENERAL;
std::string linkType = args[0];
linkType += "_LINK_TYPE";
***************
*** 102,105 ****
--- 112,139 ----
}
}
+
+ // Make sure the last argument was not a library type specifier.
+ if(haveLLT)
+ {
+ cmOStringStream e;
+ e << "The \"" << this->LinkLibraryTypeNames[llt]
+ << "\" argument must be followed by a library.";
+ this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
+ cmSystemTools::SetFatalErrorOccured();
+ }
+
return true;
}
+
+ //----------------------------------------------------------------------------
+ void
+ cmTargetLinkLibrariesCommand
+ ::LinkLibraryTypeSpecifierWarning(int left, int right)
+ {
+ cmOStringStream w;
+ w << "Link library type specifier \""
+ << this->LinkLibraryTypeNames[left] << "\" is followed by specifier \""
+ << this->LinkLibraryTypeNames[right] << "\" instead of a library name. "
+ << "The first specifier will be ignored.";
+ this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str());
+ }
From cmake-commits at cmake.org Mon Aug 11 16:23:04 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Mon, 11 Aug 2008 20:23:04 +0000
Subject: [Cmake-commits] [cmake-commits] king committed
cmTargetLinkLibrariesCommand.cxx 1.26 1.27
cmTargetLinkLibrariesCommand.h 1.16 1.17
Message-ID: <20080811202304.B786A1F99@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv2917/Source
Modified Files:
cmTargetLinkLibrariesCommand.cxx
cmTargetLinkLibrariesCommand.h
Log Message:
ENH: Simple specification of link interfaces
Create an INTERFACE option to the target_link_libraries command to help
set the LINK_INTERFACE_LIBRARIES and LINK_INTERFACE_LIBRARIES_DEBUG
properties. This will help users specify link interfaces using
variables from Find*.cmake modules that include the 'debug' and
'optimized' keywords.
Index: cmTargetLinkLibrariesCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTargetLinkLibrariesCommand.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -C 2 -d -r1.16 -r1.17
*** cmTargetLinkLibrariesCommand.h 7 Aug 2008 21:51:29 -0000 1.16
--- cmTargetLinkLibrariesCommand.h 11 Aug 2008 20:23:02 -0000 1.17
***************
*** 65,79 ****
{
return
! " target_link_libraries(target library1\n"
! " library2\n"
! " ...)\n"
"Specify a list of libraries to be linked into the specified target. "
- "The debug and optimized strings may be used to indicate that "
- "the next library listed is to be used only for that specific "
- "type of build. general indicates it is used for all build types "
- "and is assumed if not specified.\n"
"If any library name matches that of a target in the current project "
"a dependency will automatically be added in the build system to make "
! "sure the library being linked is up-to-date before the target links.";
}
--- 65,104 ----
{
return
! " target_link_libraries( [INTERFACE]\n"
! " [[debug|optimized|general] ] ...)\n"
"Specify a list of libraries to be linked into the specified target. "
"If any library name matches that of a target in the current project "
"a dependency will automatically be added in the build system to make "
! "sure the library being linked is up-to-date before the target links."
! "\n"
! "A \"debug\", \"optimized\", or \"general\" keyword indicates that "
! "the library immediately following it is to be used only for the "
! "corresponding build configuration. "
! "The \"debug\" keyword corresponds to the Debug configuration. "
! "The \"optimized\" keyword corresponds to all other configurations. "
! "The \"general\" keyword corresponds to all configurations, and is "
! "purely optional (assumed if omitted). "
! "Higher granularity may be achieved for per-configuration rules "
! "by creating and linking to IMPORTED library targets. "
! "See the IMPORTED mode of the add_library command for more "
! "information. "
! "\n"
! "Library dependencies are transitive by default. "
! "When this target is linked into another target then the libraries "
! "linked to this target will appear on the link line for the other "
! "target too. "
! "See the LINK_INTERFACE_LIBRARIES target property to override the "
! "set of transitive link dependencies for a target."
! "\n"
! "The INTERFACE option tells the command to append the libraries "
! "to the LINK_INTERFACE_LIBRARIES and LINK_INTERFACE_LIBRARIES_DEBUG "
! "target properties instead of using them for linking. "
! "Libraries specified as \"debug\" are appended to the "
! "the LINK_INTERFACE_LIBRARIES_DEBUG property. "
! "Libraries specified as \"optimized\" are appended to the "
! "the LINK_INTERFACE_LIBRARIES property. "
! "Libraries specified as \"general\" (or without any keyword) are "
! "appended to both properties."
! ;
}
***************
*** 82,85 ****
--- 107,115 ----
void LinkLibraryTypeSpecifierWarning(int left, int right);
static const char* LinkLibraryTypeNames[3];
+
+ cmTarget* Target;
+ bool DoingInterface;
+
+ void HandleLibrary(const char* lib, cmTarget::LinkLibraryType llt);
};
Index: cmTargetLinkLibrariesCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTargetLinkLibrariesCommand.cxx,v
retrieving revision 1.26
retrieving revision 1.27
diff -C 2 -d -r1.26 -r1.27
*** cmTargetLinkLibrariesCommand.cxx 7 Aug 2008 21:51:29 -0000 1.26
--- cmTargetLinkLibrariesCommand.cxx 11 Aug 2008 20:23:02 -0000 1.27
***************
*** 41,48 ****
--- 41,66 ----
}
+ // Lookup the target for which libraries are specified.
+ this->Target =
+ this->Makefile->GetCMakeInstance()
+ ->GetGlobalGenerator()->FindTarget(0, args[0].c_str());
+ if(!this->Target)
+ {
+ cmOStringStream e;
+ e << "Cannot specify link libraries for target \"" << args[0] << "\" "
+ << "which is not built by this project.";
+ this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
+ cmSystemTools::SetFatalErrorOccured();
+ return true;
+ }
+
// Keep track of link configuration specifiers.
cmTarget::LinkLibraryType llt = cmTarget::GENERAL;
bool haveLLT = false;
+ // Start with primary linking and switch to link interface
+ // specification when the keyword is encountered.
+ this->DoingInterface = false;
+
// add libraries, nothe that there is an optional prefix
// of debug and optimized than can be used
***************
*** 51,55 ****
for(++i; i != args.end(); ++i)
{
! if(*i == "debug")
{
if(haveLLT)
--- 69,77 ----
for(++i; i != args.end(); ++i)
{
! if(*i == "INTERFACE")
! {
! this->DoingInterface = true;
! }
! else if(*i == "debug")
{
if(haveLLT)
***************
*** 82,87 ****
// The link type was specified by the previous argument.
haveLLT = false;
! this->Makefile->AddLinkLibraryForTarget(args[0].c_str(),
! i->c_str(), llt);
}
else
--- 104,108 ----
// The link type was specified by the previous argument.
haveLLT = false;
! this->HandleLibrary(i->c_str(), llt);
}
else
***************
*** 109,113 ****
}
}
! this->Makefile->AddLinkLibraryForTarget(args[0].c_str(),i->c_str(),llt);
}
}
--- 130,134 ----
}
}
! this->HandleLibrary(i->c_str(), llt);
}
}
***************
*** 123,126 ****
--- 144,156 ----
}
+ // If the INTERFACE option was given, make sure the
+ // LINK_INTERFACE_LIBRARIES property exists. This allows the
+ // command to be used to specify an empty link interface.
+ if(this->DoingInterface &&
+ !this->Target->GetProperty("LINK_INTERFACE_LIBRARIES"))
+ {
+ this->Target->SetProperty("LINK_INTERFACE_LIBRARIES", "");
+ }
+
return true;
}
***************
*** 138,139 ****
--- 168,208 ----
this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str());
}
+
+ //----------------------------------------------------------------------------
+ void
+ cmTargetLinkLibrariesCommand::HandleLibrary(const char* lib,
+ cmTarget::LinkLibraryType llt)
+ {
+ // Handle normal case first.
+ if(!this->DoingInterface)
+ {
+ this->Makefile
+ ->AddLinkLibraryForTarget(this->Target->GetName(), lib, llt);
+ return;
+ }
+
+ // Include this library in the link interface for the target.
+ if(llt == cmTarget::DEBUG)
+ {
+ // Put in only the DEBUG configuration interface.
+ this->Target->AppendProperty("LINK_INTERFACE_LIBRARIES_DEBUG", lib);
+ }
+ else if(llt == cmTarget::OPTIMIZED)
+ {
+ // Put in only the non-DEBUG configuration interface.
+ this->Target->AppendProperty("LINK_INTERFACE_LIBRARIES", lib);
+
+ // Make sure the DEBUG configuration interface exists so that this
+ // one will not be used as a fall-back.
+ if(!this->Target->GetProperty("LINK_INTERFACE_LIBRARIES_DEBUG"))
+ {
+ this->Target->SetProperty("LINK_INTERFACE_LIBRARIES_DEBUG", "");
+ }
+ }
+ else
+ {
+ // Put in both the DEBUG and non-DEBUG configuration interfaces.
+ this->Target->AppendProperty("LINK_INTERFACE_LIBRARIES", lib);
+ this->Target->AppendProperty("LINK_INTERFACE_LIBRARIES_DEBUG", lib);
+ }
+ }
From cmake-commits at cmake.org Mon Aug 11 16:23:12 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Mon, 11 Aug 2008 20:23:12 +0000
Subject: [Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.11
1.12 testLib4lib.c NONE 1.1 testLib4libdbg.c NONE 1.1
testLib4libopt.c NONE 1.1
Message-ID: <20080811202312.74FCB1F99@public.kitware.com>
Update of /cvsroot/CMake/CMake/Tests/ExportImport/Export
In directory public:/mounts/ram/cvs-serv3016/Tests/ExportImport/Export
Modified Files:
CMakeLists.txt
Added Files:
testLib4lib.c testLib4libdbg.c testLib4libopt.c
Log Message:
ENH: Test target_link_libraries INTERFACE option
--- NEW FILE: testLib4lib.c ---
int testLib4lib(void)
{
return 0;
}
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/ExportImport/Export/CMakeLists.txt,v
retrieving revision 1.11
retrieving revision 1.12
diff -C 2 -d -r1.11 -r1.12
*** CMakeLists.txt 25 Mar 2008 15:26:51 -0000 1.11
--- CMakeLists.txt 11 Aug 2008 20:23:10 -0000 1.12
***************
*** 36,39 ****
--- 36,55 ----
set_property(TARGET testLib4 PROPERTY FRAMEWORK 1)
+ # Test using the target_link_libraries command to set the
+ # LINK_INTERFACE_LIBRARIES* properties. We construct two libraries
+ # providing the same two symbols. In each library one of the symbols
+ # will work and the other one will fail to link. The import part of
+ # this test will try to use the symbol corresponding to the
+ # configuration in which it is built. If the proper library is not
+ # used via the link interface the import test will fail to link.
+ add_library(testLib4lib STATIC testLib4lib.c)
+ add_library(testLib4libdbg STATIC testLib4libopt.c testLib4libdbg.c)
+ add_library(testLib4libopt STATIC testLib4libdbg.c testLib4libopt.c)
+ set_property(TARGET testLib4libdbg PROPERTY COMPILE_DEFINITIONS LIB_DBG)
+ set_property(TARGET testLib4libopt PROPERTY COMPILE_DEFINITIONS LIB_OPT)
+ target_link_libraries(testLib4
+ INTERFACE testLib4lib debug testLib4libdbg optimized testLib4libopt
+ )
+
add_executable(testExe3 testExe3.c)
set_property(TARGET testExe3 PROPERTY MACOSX_BUNDLE 1)
***************
*** 43,47 ****
TARGETS
testExe1 testLib1 testLib2 testExe2 testLib3 testLib4 testExe3
! testExe2lib
EXPORT exp
RUNTIME DESTINATION bin
--- 59,63 ----
TARGETS
testExe1 testLib1 testLib2 testExe2 testLib3 testLib4 testExe3
! testExe2lib testLib4lib testLib4libdbg testLib4libopt
EXPORT exp
RUNTIME DESTINATION bin
***************
*** 68,71 ****
--- 84,88 ----
)
export(TARGETS testExe2 testLib4 testExe3 testExe2lib
+ testLib4lib testLib4libdbg testLib4libopt
NAMESPACE bld_
APPEND FILE ExportBuildTree.cmake
--- NEW FILE: testLib4libopt.c ---
#ifdef LIB_OPT
/* We are building in testLib4libopt. Provide the correct symbol. */
int testLib4libopt(void)
{
return 0;
}
#else
/* We are not building in testLib4libopt. Poison the symbol. */
extern int testLib4libopt_noexist(void);
int testLib4libopt(void)
{
return testLib4libopt_noexist();
}
#endif
--- NEW FILE: testLib4libdbg.c ---
#ifdef LIB_DBG
/* We are building in testLib4libdbg. Provide the correct symbol. */
int testLib4libdbg(void)
{
return 0;
}
#else
/* We are not building in testLib4libdbg. Poison the symbol. */
extern int testLib4libdbg_noexist(void);
int testLib4libdbg(void)
{
return testLib4libdbg_noexist();
}
#endif
From cmake-commits at cmake.org Mon Aug 11 16:23:12 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Mon, 11 Aug 2008 20:23:12 +0000
Subject: [Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.4
1.5 imp_testExe1.c 1.3 1.4
Message-ID: <20080811202312.B74D21F99@public.kitware.com>
Update of /cvsroot/CMake/CMake/Tests/ExportImport/Import
In directory public:/mounts/ram/cvs-serv3016/Tests/ExportImport/Import
Modified Files:
CMakeLists.txt imp_testExe1.c
Log Message:
ENH: Test target_link_libraries INTERFACE option
Index: imp_testExe1.c
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/ExportImport/Import/imp_testExe1.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** imp_testExe1.c 28 Jan 2008 19:46:16 -0000 1.3
--- imp_testExe1.c 11 Aug 2008 20:23:10 -0000 1.4
***************
*** 4,11 ****
extern int testLib3();
extern int testLib4();
int main()
{
return (testLib2() + generated_by_testExe1() + testLib3() + testLib4()
! + generated_by_testExe3());
}
--- 4,21 ----
extern int testLib3();
extern int testLib4();
+ extern int testLib4lib();
+
+ /* Switch a symbol between debug and optimized builds to make sure the
+ proper library is found from the testLib4 link interface. */
+ #ifdef EXE_DBG
+ # define testLib4libcfg testLib4libdbg
+ #else
+ # define testLib4libcfg testLib4libopt
+ #endif
+ extern testLib4libcfg(void);
int main()
{
return (testLib2() + generated_by_testExe1() + testLib3() + testLib4()
! + generated_by_testExe3() + testLib4lib() + testLib4libcfg());
}
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/ExportImport/Import/CMakeLists.txt,v
retrieving revision 1.4
retrieving revision 1.5
diff -C 2 -d -r1.4 -r1.5
*** CMakeLists.txt 25 Mar 2008 15:26:51 -0000 1.4
--- CMakeLists.txt 11 Aug 2008 20:23:10 -0000 1.5
***************
*** 33,36 ****
--- 33,37 ----
# Try linking to a library imported from the install tree.
target_link_libraries(imp_testExe1 exp_testLib2 exp_testLib3 exp_testLib4)
+ set_property(TARGET imp_testExe1 PROPERTY COMPILE_DEFINITIONS_DEBUG EXE_DBG)
# Try building a plugin to an executable imported from the install tree.
***************
*** 58,61 ****
--- 59,63 ----
# Try linking to a library imported from the build tree.
target_link_libraries(imp_testExe1b bld_testLib2 bld_testLib3 bld_testLib4)
+ set_property(TARGET imp_testExe1b PROPERTY COMPILE_DEFINITIONS_DEBUG EXE_DBG)
# Try building a plugin to an executable imported from the build tree.
From cmake-commits at cmake.org Tue Aug 12 07:01:46 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Tue, 12 Aug 2008 11:01:46 +0000
Subject: [Cmake-commits] [cmake-commits] alex committed cmakemain.cxx 1.82
1.83
Message-ID: <20080812110147.07E691A42@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv16671
Modified Files:
cmakemain.cxx
Log Message:
STYLE: one ifdef block less, the documentation object can be created a bit later
Alex
Index: cmakemain.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmakemain.cxx,v
retrieving revision 1.82
retrieving revision 1.83
diff -C 2 -d -r1.82 -r1.83
*** cmakemain.cxx 31 Jul 2008 14:33:25 -0000 1.82
--- cmakemain.cxx 12 Aug 2008 11:01:44 -0000 1.83
***************
*** 304,310 ****
int do_cmake(int ac, char** av)
{
- #ifdef CMAKE_BUILD_WITH_CMAKE
- cmDocumentation doc;
- #endif
int nocwd = 0;
--- 304,307 ----
***************
*** 317,320 ****
--- 314,318 ----
#ifdef CMAKE_BUILD_WITH_CMAKE
+ cmDocumentation doc;
if(doc.CheckOptions(ac, av) || nocwd)
{
From cmake-commits at cmake.org Tue Aug 12 17:27:50 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Tue, 12 Aug 2008 21:27:50 +0000
Subject: [Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.12
1.13 testLib4libdbg1.c NONE 1.1 testLib4libopt1.c NONE 1.1
Message-ID: <20080812212750.EC31A256C@public.kitware.com>
Update of /cvsroot/CMake/CMake/Tests/ExportImport/Export
In directory public:/mounts/ram/cvs-serv31764/Tests/ExportImport/Export
Modified Files:
CMakeLists.txt
Added Files:
testLib4libdbg1.c testLib4libopt1.c
Log Message:
BUG: Fix ExportImport test on VS6
Visual Studio 6 does not support per-target object files, so just use two
separate source file names in this case.
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/ExportImport/Export/CMakeLists.txt,v
retrieving revision 1.12
retrieving revision 1.13
diff -C 2 -d -r1.12 -r1.13
*** CMakeLists.txt 11 Aug 2008 20:23:10 -0000 1.12
--- CMakeLists.txt 12 Aug 2008 21:27:48 -0000 1.13
***************
*** 36,39 ****
--- 36,45 ----
set_property(TARGET testLib4 PROPERTY FRAMEWORK 1)
+ # Work-around: Visual Studio 6 does not support per-target object files.
+ set(VS6)
+ if("${CMAKE_GENERATOR}" MATCHES "Visual Studio 6")
+ set(VS6 1)
+ endif("${CMAKE_GENERATOR}" MATCHES "Visual Studio 6")
+
# Test using the target_link_libraries command to set the
# LINK_INTERFACE_LIBRARIES* properties. We construct two libraries
***************
*** 44,49 ****
# used via the link interface the import test will fail to link.
add_library(testLib4lib STATIC testLib4lib.c)
! add_library(testLib4libdbg STATIC testLib4libopt.c testLib4libdbg.c)
! add_library(testLib4libopt STATIC testLib4libdbg.c testLib4libopt.c)
set_property(TARGET testLib4libdbg PROPERTY COMPILE_DEFINITIONS LIB_DBG)
set_property(TARGET testLib4libopt PROPERTY COMPILE_DEFINITIONS LIB_OPT)
--- 50,55 ----
# used via the link interface the import test will fail to link.
add_library(testLib4lib STATIC testLib4lib.c)
! add_library(testLib4libdbg STATIC testLib4libopt.c testLib4libdbg${VS6}.c)
! add_library(testLib4libopt STATIC testLib4libdbg.c testLib4libopt${VS6}.c)
set_property(TARGET testLib4libdbg PROPERTY COMPILE_DEFINITIONS LIB_DBG)
set_property(TARGET testLib4libopt PROPERTY COMPILE_DEFINITIONS LIB_OPT)
--- NEW FILE: testLib4libdbg1.c ---
#include "testLib4libdbg.c"
--- NEW FILE: testLib4libopt1.c ---
#include "testLib4libopt.c"
From cmake-commits at cmake.org Tue Aug 12 19:01:06 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Tue, 12 Aug 2008 23:01:06 +0000
Subject: [Cmake-commits] [cmake-commits] king committed
cmFindPackageCommand.cxx 1.40 1.41 cmFindPackageCommand.h 1.21 1.22
Message-ID: <20080812230107.53AB22718@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv4759/Source
Modified Files:
cmFindPackageCommand.cxx cmFindPackageCommand.h
Log Message:
ENH: Teach find_package about lib64 paths
When find_package is about to look in /lib, search first in
/lib64 in cases that find_library would use lib64 paths.
Index: cmFindPackageCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindPackageCommand.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -C 2 -d -r1.21 -r1.22
*** cmFindPackageCommand.h 9 Jun 2008 19:08:59 -0000 1.21
--- cmFindPackageCommand.h 12 Aug 2008 23:01:04 -0000 1.22
***************
*** 125,128 ****
--- 125,129 ----
bool NoBuilds;
bool DebugMode;
+ bool UseLib64Paths;
std::vector Names;
std::vector Configs;
Index: cmFindPackageCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindPackageCommand.cxx,v
retrieving revision 1.40
retrieving revision 1.41
diff -C 2 -d -r1.40 -r1.41
*** cmFindPackageCommand.cxx 9 Jun 2008 19:22:09 -0000 1.40
--- cmFindPackageCommand.cxx 12 Aug 2008 23:01:04 -0000 1.41
***************
*** 64,67 ****
--- 64,68 ----
this->NoModule = false;
this->DebugMode = false;
+ this->UseLib64Paths = false;
this->VersionMajor = 0;
this->VersionMinor = 0;
***************
*** 299,302 ****
--- 300,315 ----
this->DebugMode = this->Makefile->IsOn("CMAKE_FIND_DEBUG_MODE");
+ // Lookup whether lib64 paths should be used.
+ if(const char* sizeof_dptr =
+ this->Makefile->GetDefinition("CMAKE_SIZEOF_VOID_P"))
+ {
+ if(atoi(sizeof_dptr) == 8 &&
+ this->Makefile->GetCMakeInstance()
+ ->GetPropertyAsBool("FIND_LIBRARY_USE_LIB64_PATHS"))
+ {
+ this->UseLib64Paths = true;
+ }
+ }
+
// Find the current root path mode.
this->SelectDefaultRootPathMode();
***************
*** 1458,1471 ****
{
public:
! cmFileListGeneratorEnumerate(const char* p1, const char* p2):
! cmFileListGeneratorBase()
! {
! this->Vector.push_back(p1);
! this->Vector.push_back(p2);
! }
cmFileListGeneratorEnumerate(cmFileListGeneratorEnumerate const& r):
cmFileListGeneratorBase(), Vector(r.Vector) {}
private:
! std::vector Vector;
virtual bool Search(std::string const& parent, cmFileList& lister)
{
--- 1471,1480 ----
{
public:
! cmFileListGeneratorEnumerate(std::vector const& v):
! cmFileListGeneratorBase(), Vector(v) {}
cmFileListGeneratorEnumerate(cmFileListGeneratorEnumerate const& r):
cmFileListGeneratorBase(), Vector(r.Vector) {}
private:
! std::vector const& Vector;
virtual bool Search(std::string const& parent, cmFileList& lister)
{
***************
*** 1717,1720 ****
--- 1726,1738 ----
}
+ // Construct list of common install locations (lib and share).
+ std::vector common;
+ if(this->UseLib64Paths)
+ {
+ common.push_back("lib64");
+ }
+ common.push_back("lib");
+ common.push_back("share");
+
// PREFIX/(share|lib)/(Foo|foo|FOO).*/
{
***************
*** 1722,1726 ****
lister
/ cmFileListGeneratorFixed(prefix)
! / cmFileListGeneratorEnumerate("lib", "share")
/ cmFileListGeneratorProject(this->Names);
if(lister.Search())
--- 1740,1744 ----
lister
/ cmFileListGeneratorFixed(prefix)
! / cmFileListGeneratorEnumerate(common)
/ cmFileListGeneratorProject(this->Names);
if(lister.Search())
***************
*** 1735,1739 ****
lister
/ cmFileListGeneratorFixed(prefix)
! / cmFileListGeneratorEnumerate("lib", "share")
/ cmFileListGeneratorProject(this->Names)
/ cmFileListGeneratorCaseInsensitive("cmake");
--- 1753,1757 ----
lister
/ cmFileListGeneratorFixed(prefix)
! / cmFileListGeneratorEnumerate(common)
/ cmFileListGeneratorProject(this->Names)
/ cmFileListGeneratorCaseInsensitive("cmake");
From cmake-commits at cmake.org Thu Aug 14 09:53:19 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Thu, 14 Aug 2008 13:53:19 +0000
Subject: [Cmake-commits] [cmake-commits] king committed cmSystemTools.cxx
1.379 1.380
Message-ID: <20080814135319.43CE429A4@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv32643/Source
Modified Files:
cmSystemTools.cxx
Log Message:
BUG: Remove both RPATH and RUNPATH entries
Removal of the RPATH and RUNPATH from ELF binaries must work when both
entries are present. Both entries should be removed. Previously only
one would be removed and the other would be blanked because it pointed
at the same string which was zeroed. This fixes gentoo bug number
224901.
Index: cmSystemTools.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSystemTools.cxx,v
retrieving revision 1.379
retrieving revision 1.380
diff -C 2 -d -r1.379 -r1.380
*** cmSystemTools.cxx 27 May 2008 18:46:59 -0000 1.379
--- cmSystemTools.cxx 14 Aug 2008 13:53:17 -0000 1.380
***************
*** 27,30 ****
--- 27,31 ----
# include
#endif
+ #include
#if defined(_WIN32)
***************
*** 2479,2485 ****
{
#if defined(CMAKE_USE_ELF_PARSER)
! unsigned long rpathPosition = 0;
! unsigned long rpathSize = 0;
! unsigned long rpathEntryPosition = 0;
std::vector bytes;
{
--- 2480,2487 ----
{
#if defined(CMAKE_USE_ELF_PARSER)
! int zeroCount = 0;
! unsigned long zeroPosition[2] = {0,0};
! unsigned long zeroSize[2] = {0,0};
! unsigned long bytesBegin = 0;
std::vector bytes;
{
***************
*** 2487,2530 ****
cmELF elf(file.c_str());
! // Get the RPATH or RUNPATH entry from it.
! cmELF::StringEntry const* se = elf.GetRPath();
! if(!se)
{
! se = elf.GetRunPath();
}
!
! if(se)
{
! // Store information about the entry.
! rpathPosition = se->Position;
! rpathSize = se->Size;
! rpathEntryPosition = elf.GetDynamicEntryPosition(se->IndexInSection);
! // Get the file range containing the rest of the DYNAMIC table
! // after the RPATH entry.
! unsigned long nextEntryPosition =
! elf.GetDynamicEntryPosition(se->IndexInSection+1);
! unsigned int count = elf.GetDynamicEntryCount();
! if(count == 0)
{
! // This should happen only for invalid ELF files where a DT_NULL
! // appears before the end of the table.
! if(emsg)
! {
! *emsg = "DYNAMIC section contains a DT_NULL before the end.";
! }
! return false;
}
! unsigned long nullEntryPosition = elf.GetDynamicEntryPosition(count);
! // Allocate and fill a buffer with zeros.
! bytes.resize(nullEntryPosition - rpathEntryPosition, 0);
! // Read the part of the DYNAMIC section header that will move.
! // The remainder of the buffer will be left with zeros which
! // represent a DT_NULL entry.
! if(!elf.ReadBytes(nextEntryPosition,
! nullEntryPosition - nextEntryPosition,
! &bytes[0]))
{
if(emsg)
--- 2489,2564 ----
cmELF elf(file.c_str());
! // Get the RPATH and RUNPATH entries from it and sort them by index
! // in the dynamic section header.
! int se_count = 0;
! cmELF::StringEntry const* se[2] = {0, 0};
! if(cmELF::StringEntry const* se_rpath = elf.GetRPath())
{
! se[se_count++] = se_rpath;
}
! if(cmELF::StringEntry const* se_runpath = elf.GetRunPath())
{
! se[se_count++] = se_runpath;
! }
! if(se_count == 0)
! {
! // There is no RPATH or RUNPATH anyway.
! return true;
! }
! if(se_count == 2 && se[1]->IndexInSection < se[0]->IndexInSection)
! {
! cmsys_stl::swap(se[0], se[1]);
! }
! // Get the size of the dynamic section header.
! unsigned int count = elf.GetDynamicEntryCount();
! if(count == 0)
! {
! // This should happen only for invalid ELF files where a DT_NULL
! // appears before the end of the table.
! if(emsg)
{
! *emsg = "DYNAMIC section contains a DT_NULL before the end.";
}
! return false;
! }
! // Save information about the string entries to be zeroed.
! zeroCount = se_count;
! for(int i=0; i < se_count; ++i)
! {
! zeroPosition[i] = se[i]->Position;
! zeroSize[i] = se[i]->Size;
! }
! // Get the range of file positions corresponding to each entry and
! // the rest of the table after them.
! unsigned long entryBegin[3] = {0,0,0};
! unsigned long entryEnd[2] = {0,0};
! for(int i=0; i < se_count; ++i)
! {
! entryBegin[i] = elf.GetDynamicEntryPosition(se[i]->IndexInSection);
! entryEnd[i] = elf.GetDynamicEntryPosition(se[i]->IndexInSection+1);
! }
! entryBegin[se_count] = elf.GetDynamicEntryPosition(count);
!
! // The data are to be written over the old table entries starting at
! // the first one being removed.
! bytesBegin = entryBegin[0];
! unsigned long bytesEnd = entryBegin[se_count];
!
! // Allocate a buffer to hold the part of the file to be written.
! // Initialize it with zeros.
! bytes.resize(bytesEnd - bytesBegin, 0);
!
! // Read the part of the DYNAMIC section header that will move.
! // The remainder of the buffer will be left with zeros which
! // represent a DT_NULL entry.
! char* data = &bytes[0];
! for(int i=0; i < se_count; ++i)
! {
! // Read data between the entries being removed.
! unsigned long sz = entryBegin[i+1] - entryEnd[i];
! if(sz > 0 && !elf.ReadBytes(entryEnd[i], sz, data))
{
if(emsg)
***************
*** 2534,2542 ****
return false;
}
! }
! else
! {
! // There is no RPATH or RUNPATH anyway.
! return true;
}
}
--- 2568,2572 ----
return false;
}
! data += sz;
}
}
***************
*** 2555,2559 ****
// Write the new DYNAMIC table header.
! if(!f.seekp(rpathEntryPosition))
{
if(emsg)
--- 2585,2589 ----
// Write the new DYNAMIC table header.
! if(!f.seekp(bytesBegin))
{
if(emsg)
***************
*** 2572,2602 ****
}
! // Fill the RPATH string with zero bytes.
! if(!f.seekp(rpathPosition))
{
! if(emsg)
{
! *emsg = "Error seeking to RPATH position.";
}
! return false;
! }
! for(unsigned long i=0; i < rpathSize; ++i)
! {
! f << '\0';
! }
!
! // Make sure everything was okay.
! if(f)
! {
! return true;
! }
! else
! {
! if(emsg)
{
! *emsg = "Error writing the empty rpath to the file.";
}
- return false;
}
#else
(void)file;
--- 2602,2632 ----
}
! // Fill the RPATH and RUNPATH strings with zero bytes.
! for(int i=0; i < zeroCount; ++i)
{
! if(!f.seekp(zeroPosition[i]))
{
! if(emsg)
! {
! *emsg = "Error seeking to RPATH position.";
! }
! return false;
}
! for(unsigned long j=0; j < zeroSize[i]; ++j)
{
! f << '\0';
! }
! if(!f)
! {
! if(emsg)
! {
! *emsg = "Error writing the empty rpath string to the file.";
! }
! return false;
}
}
+
+ // Everything was updated successfully.
+ return true;
#else
(void)file;
From cmake-commits at cmake.org Thu Aug 14 09:53:23 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Thu, 14 Aug 2008 13:53:23 +0000
Subject: [Cmake-commits] [cmake-commits] king committed cmSystemTools.cxx
1.380 1.381
Message-ID: <20080814135323.A2D9629A4@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv32693/Source
Modified Files:
cmSystemTools.cxx
Log Message:
BUG: Update both RPATH and RUNPATH entries
During installation the RPATH and RUNPATH entries of ELF binaries are
edited to match the user specification. Usually either one entry is
present or both entries refer to the same string literal. In the case
that they are both present and refer to separate string literals we need
to update both. I have never seen this case in practice, but we should
do this just in case.
Index: cmSystemTools.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSystemTools.cxx,v
retrieving revision 1.380
retrieving revision 1.381
diff -C 2 -d -r1.380 -r1.381
*** cmSystemTools.cxx 14 Aug 2008 13:53:17 -0000 1.380
--- cmSystemTools.cxx 14 Aug 2008 13:53:21 -0000 1.381
***************
*** 2330,2333 ****
--- 2330,2343 ----
#endif
+ #if defined(CMAKE_USE_ELF_PARSER)
+ struct cmSystemToolsRPathInfo
+ {
+ unsigned long Position;
+ unsigned long Size;
+ std::string Name;
+ std::string Value;
+ };
+ #endif
+
//----------------------------------------------------------------------------
bool cmSystemTools::ChangeRPath(std::string const& file,
***************
*** 2342,2376 ****
*changed = false;
}
! unsigned long rpathPosition = 0;
! unsigned long rpathSize = 0;
! std::string rpathPrefix;
! std::string rpathSuffix;
{
// Parse the ELF binary.
cmELF elf(file.c_str());
! // Get the RPATH or RUNPATH entry from it.
! cmELF::StringEntry const* se = elf.GetRPath();
! if(!se)
{
! se = elf.GetRunPath();
}
! if(se)
{
// Make sure the current rpath contains the old rpath.
! std::string::size_type pos = cmSystemToolsFindRPath(se->Value, oldRPath);
if(pos == std::string::npos)
{
// If it contains the new rpath instead then it is okay.
! if(cmSystemToolsFindRPath(se->Value, newRPath) != std::string::npos)
{
! return true;
}
if(emsg)
{
cmOStringStream e;
! e << "The current RPATH is:\n"
! << " " << se->Value << "\n"
<< "which does not contain:\n"
<< " " << oldRPath << "\n"
--- 2352,2420 ----
*changed = false;
}
! int rp_count = 0;
! cmSystemToolsRPathInfo rp[2];
{
// Parse the ELF binary.
cmELF elf(file.c_str());
! // Get the RPATH and RUNPATH entries from it.
! int se_count = 0;
! cmELF::StringEntry const* se[2] = {0, 0};
! const char* se_name[2] = {0, 0};
! if(cmELF::StringEntry const* se_rpath = elf.GetRPath())
{
! se[se_count] = se_rpath;
! se_name[se_count] = "RPATH";
! ++se_count;
! }
! if(cmELF::StringEntry const* se_runpath = elf.GetRunPath())
! {
! se[se_count] = se_runpath;
! se_name[se_count] = "RUNPATH";
! ++se_count;
! }
! if(se_count == 0)
! {
! if(newRPath.empty())
! {
! // The new rpath is empty and there is no rpath anyway so it is
! // okay.
! return true;
! }
! else
! {
! if(emsg)
! {
! *emsg = "No valid ELF RPATH or RUNPATH entry exists in the file; ";
! *emsg += elf.GetErrorMessage();
! }
! return false;
! }
}
! for(int i=0; i < se_count; ++i)
{
+ // If both RPATH and RUNPATH refer to the same string literal it
+ // needs to be changed only once.
+ if(rp_count && rp[0].Position == se[i]->Position)
+ {
+ continue;
+ }
+
// Make sure the current rpath contains the old rpath.
! std::string::size_type pos =
! cmSystemToolsFindRPath(se[i]->Value, oldRPath);
if(pos == std::string::npos)
{
// If it contains the new rpath instead then it is okay.
! if(cmSystemToolsFindRPath(se[i]->Value, newRPath) != std::string::npos)
{
! continue;
}
if(emsg)
{
cmOStringStream e;
! e << "The current " << se_name[i] << " is:\n"
! << " " << se[i]->Value << "\n"
<< "which does not contain:\n"
<< " " << oldRPath << "\n"
***************
*** 2381,2425 ****
}
! // Store information about the entry.
! rpathPosition = se->Position;
! rpathSize = se->Size;
! // Store the part of the path we must preserve.
! rpathPrefix = se->Value.substr(0, pos);
! rpathSuffix = se->Value.substr(pos+oldRPath.length(), oldRPath.npos);
! }
! else if(newRPath.empty())
! {
! // The new rpath is empty and there is no rpath anyway so it is
! // okay.
! return true;
! }
! else
! {
! if(emsg)
{
! *emsg = "No valid ELF RPATH entry exists in the file; ";
! *emsg += elf.GetErrorMessage();
}
! return false;
}
}
- // Compute the full new rpath.
- std::string rpath = rpathPrefix;
- rpath += newRPath;
- rpath += rpathSuffix;
! // Make sure there is enough room to store the new rpath and at
! // least one null terminator.
! if(rpathSize < rpath.length()+1)
{
! if(emsg)
! {
! *emsg = "The replacement RPATH is too long.";
! }
! return false;
}
! // Open the file for update and seek to the RPATH position.
std::ofstream f(file.c_str(),
std::ios::in | std::ios::out | std::ios::binary);
--- 2425,2465 ----
}
! // Store information about the entry in the file.
! rp[rp_count].Position = se[i]->Position;
! rp[rp_count].Size = se[i]->Size;
! rp[rp_count].Name = se_name[i];
! // Construct the new value which preserves the part of the path
! // not being changed.
! rp[rp_count].Value = se[i]->Value.substr(0, pos);
! rp[rp_count].Value += newRPath;
! rp[rp_count].Value += se[i]->Value.substr(pos+oldRPath.length(),
! oldRPath.npos);
!
! // Make sure there is enough room to store the new rpath and at
! // least one null terminator.
! if(rp[rp_count].Size < rp[rp_count].Value.length()+1)
{
! if(emsg)
! {
! *emsg = "The replacement path is too long for the ";
! *emsg += se_name[i];
! *emsg += " entry.";
! }
! return false;
}
!
! // This entry is ready for update.
! ++rp_count;
}
}
! // If no runtime path needs to be changed, we are done.
! if(rp_count == 0)
{
! return true;
}
! // Open the file for update.
std::ofstream f(file.c_str(),
std::ios::in | std::ios::out | std::ios::binary);
***************
*** 2432,2469 ****
return false;
}
! if(!f.seekp(rpathPosition))
{
! if(emsg)
{
! *emsg = "Error seeking to RPATH position.";
}
- return false;
- }
! // Write the new rpath. Follow it with enough null terminators to
! // fill the string table entry.
! f << rpath;
! for(unsigned long i=rpath.length(); i < rpathSize; ++i)
! {
! f << '\0';
! }
! // Make sure everything was okay.
! if(f)
! {
! if(changed)
{
! *changed = true;
}
- return true;
}
! else
{
! if(emsg)
! {
! *emsg = "Error writing the new rpath to the file.";
! }
! return false;
}
#else
(void)file;
--- 2472,2518 ----
return false;
}
!
! // Store the new RPATH and RUNPATH strings.
! for(int i=0; i < rp_count; ++i)
{
! // Seek to the RPATH position.
! if(!f.seekp(rp[i].Position))
{
! if(emsg)
! {
! *emsg = "Error seeking to ";
! *emsg += rp[i].Name;
! *emsg += " position.";
! }
! return false;
}
! // Write the new rpath. Follow it with enough null terminators to
! // fill the string table entry.
! f << rp[i].Value;
! for(unsigned long j=rp[i].Value.length(); j < rp[i].Size; ++j)
! {
! f << '\0';
! }
! // Make sure it wrote correctly.
! if(!f)
{
! if(emsg)
! {
! *emsg = "Error writing the new ";
! *emsg += rp[i].Name;
! *emsg += " string to the file.";
! }
! return false;
}
}
!
! // Everything was updated successfully.
! if(changed)
{
! *changed = true;
}
+ return true;
#else
(void)file;
From cmake-commits at cmake.org Thu Aug 14 09:53:28 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Thu, 14 Aug 2008 13:53:28 +0000
Subject: [Cmake-commits] [cmake-commits] king committed cmFileCommand.cxx
1.110 1.111 cmSystemTools.cxx 1.381 1.382 cmSystemTools.h
1.154 1.155
Message-ID: <20080814135328.4D5A229A4@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv32742/Source
Modified Files:
cmFileCommand.cxx cmSystemTools.cxx cmSystemTools.h
Log Message:
ENH: Inform user when RPATH or RUNPATH is removed
Index: cmSystemTools.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSystemTools.h,v
retrieving revision 1.154
retrieving revision 1.155
diff -C 2 -d -r1.154 -r1.155
*** cmSystemTools.h 27 May 2008 18:47:00 -0000 1.154
--- cmSystemTools.h 14 Aug 2008 13:53:26 -0000 1.155
***************
*** 397,401 ****
/** Try to remove the RPATH from an ELF binary. */
! static bool RemoveRPath(std::string const& file, std::string* emsg = 0);
/** Check whether the RPATH in an ELF binary contains the path
--- 397,402 ----
/** Try to remove the RPATH from an ELF binary. */
! static bool RemoveRPath(std::string const& file, std::string* emsg = 0,
! bool* removed = 0);
/** Check whether the RPATH in an ELF binary contains the path
Index: cmSystemTools.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSystemTools.cxx,v
retrieving revision 1.381
retrieving revision 1.382
diff -C 2 -d -r1.381 -r1.382
*** cmSystemTools.cxx 14 Aug 2008 13:53:21 -0000 1.381
--- cmSystemTools.cxx 14 Aug 2008 13:53:26 -0000 1.382
***************
*** 2526,2532 ****
//----------------------------------------------------------------------------
! bool cmSystemTools::RemoveRPath(std::string const& file, std::string* emsg)
{
#if defined(CMAKE_USE_ELF_PARSER)
int zeroCount = 0;
unsigned long zeroPosition[2] = {0,0};
--- 2526,2537 ----
//----------------------------------------------------------------------------
! bool cmSystemTools::RemoveRPath(std::string const& file, std::string* emsg,
! bool* removed)
{
#if defined(CMAKE_USE_ELF_PARSER)
+ if(removed)
+ {
+ *removed = false;
+ }
int zeroCount = 0;
unsigned long zeroPosition[2] = {0,0};
***************
*** 2677,2684 ****
--- 2682,2694 ----
// Everything was updated successfully.
+ if(removed)
+ {
+ *removed = true;
+ }
return true;
#else
(void)file;
(void)emsg;
+ (void)removed;
return false;
#endif
Index: cmFileCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFileCommand.cxx,v
retrieving revision 1.110
retrieving revision 1.111
diff -C 2 -d -r1.110 -r1.111
*** cmFileCommand.cxx 27 May 2008 14:22:02 -0000 1.110
--- cmFileCommand.cxx 14 Aug 2008 13:53:26 -0000 1.111
***************
*** 1487,1491 ****
bool have_ft = cmSystemTools::FileTimeGet(file, ft);
std::string emsg;
! if(!cmSystemTools::RemoveRPath(file, &emsg))
{
cmOStringStream e;
--- 1487,1492 ----
bool have_ft = cmSystemTools::FileTimeGet(file, ft);
std::string emsg;
! bool removed;
! if(!cmSystemTools::RemoveRPath(file, &emsg, &removed))
{
cmOStringStream e;
***************
*** 1496,1502 ****
success = false;
}
! if(success && have_ft)
{
! cmSystemTools::FileTimeSet(file, ft);
}
cmSystemTools::FileTimeDelete(ft);
--- 1497,1513 ----
success = false;
}
! if(success)
{
! if(removed)
! {
! std::string message = "Removed runtime path from \"";
! message += file;
! message += "\"";
! this->Makefile->DisplayStatus(message.c_str(), -1);
! }
! if(have_ft)
! {
! cmSystemTools::FileTimeSet(file, ft);
! }
}
cmSystemTools::FileTimeDelete(ft);
From cmake-commits at cmake.org Thu Aug 14 15:35:01 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Thu, 14 Aug 2008 19:35:01 +0000
Subject: [Cmake-commits] [cmake-commits] alex committed FindLua50.cmake 1.4
1.5 FindLua51.cmake 1.5 1.6
Message-ID: <20080814193501.C9DBA2C63@public.kitware.com>
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv23329
Modified Files:
FindLua50.cmake FindLua51.cmake
Log Message:
BUG: fix documentation, the variables are named LUA50_FOUND and LUA51_FOUND
(in all released versions)
Alex
Index: FindLua50.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindLua50.cmake,v
retrieving revision 1.4
retrieving revision 1.5
diff -C 2 -d -r1.4 -r1.5
*** FindLua50.cmake 9 Jun 2008 20:04:05 -0000 1.4
--- FindLua50.cmake 14 Aug 2008 19:34:59 -0000 1.5
***************
*** 1,6 ****
# Locate Lua library
# This module defines
# LUA_LIBRARIES, both lua and lualib
- # LUA_FOUND, if false, do not try to link to Lua
# LUA_INCLUDE_DIR, where to find lua.h and lualib.h (and probably lauxlib.h)
#
--- 1,6 ----
# Locate Lua library
# This module defines
+ # LUA50_FOUND, if false, do not try to link to Lua
# LUA_LIBRARIES, both lua and lualib
# LUA_INCLUDE_DIR, where to find lua.h and lualib.h (and probably lauxlib.h)
#
Index: FindLua51.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindLua51.cmake,v
retrieving revision 1.5
retrieving revision 1.6
diff -C 2 -d -r1.5 -r1.6
*** FindLua51.cmake 9 Jun 2008 20:04:05 -0000 1.5
--- FindLua51.cmake 14 Aug 2008 19:34:59 -0000 1.6
***************
*** 1,6 ****
# Locate Lua library
# This module defines
# LUA_LIBRARIES
- # LUA_FOUND, if false, do not try to link to Lua
# LUA_INCLUDE_DIR, where to find lua.h
#
--- 1,6 ----
# Locate Lua library
# This module defines
+ # LUA51_FOUND, if false, do not try to link to Lua
# LUA_LIBRARIES
# LUA_INCLUDE_DIR, where to find lua.h
#
From cmake-commits at cmake.org Fri Aug 15 09:47:23 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Fri, 15 Aug 2008 13:47:23 +0000
Subject: [Cmake-commits] [cmake-commits] king committed cmSystemTools.cxx
1.382 1.383
Message-ID: <20080815134723.CA5BF22E5@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv24597
Modified Files:
cmSystemTools.cxx
Log Message:
COMP: Work-around bogus compiler warning.
Index: cmSystemTools.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSystemTools.cxx,v
retrieving revision 1.382
retrieving revision 1.383
diff -C 2 -d -r1.382 -r1.383
*** cmSystemTools.cxx 14 Aug 2008 13:53:26 -0000 1.382
--- cmSystemTools.cxx 15 Aug 2008 13:47:21 -0000 1.383
***************
*** 2461,2464 ****
--- 2461,2465 ----
}
+ {
// Open the file for update.
std::ofstream f(file.c_str(),
***************
*** 2508,2511 ****
--- 2509,2513 ----
}
}
+ }
// Everything was updated successfully.
From cmake-commits at cmake.org Fri Aug 15 15:07:59 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Fri, 15 Aug 2008 19:07:59 +0000
Subject: [Cmake-commits] [cmake-commits] hoffman committed
Windows-NMcl.cmake NONE 1.1
Message-ID: <20080815190759.CF00A2BB1@public.kitware.com>
Update of /cvsroot/CMake/CMake/Modules/Platform
In directory public:/mounts/ram/cvs-serv15788
Added Files:
Windows-NMcl.cmake
Log Message:
ENH: add platform file for bounds checker
--- NEW FILE: Windows-NMcl.cmake ---
# this is for the numega compiler which is really a front
# end for visual studio, but adds memory checking code.
include(Platform/Windows-cl)
From cmake-commits at cmake.org Sat Aug 16 07:01:56 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Sat, 16 Aug 2008 11:01:56 +0000
Subject: [Cmake-commits] [cmake-commits] alex committed UsePkgConfig.cmake
1.6 1.7
Message-ID: <20080816110156.C61591FBB@public.kitware.com>
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv20144
Modified Files:
UsePkgConfig.cmake
Log Message:
STYLE: /usr/local/bin is in the path anyway
STYLE: this file is mostly uppercase commands, so make all commands
uppercase
ENH: add a status message in case pkgconfig didn't find the package (sync
with the one from KDE)
Alex
Index: UsePkgConfig.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/UsePkgConfig.cmake,v
retrieving revision 1.6
retrieving revision 1.7
diff -C 2 -d -r1.6 -r1.7
*** UsePkgConfig.cmake 7 Mar 2007 20:36:09 -0000 1.6
--- UsePkgConfig.cmake 16 Aug 2008 11:01:49 -0000 1.7
***************
*** 13,20 ****
! FIND_PROGRAM(PKGCONFIG_EXECUTABLE NAMES pkg-config PATHS /usr/local/bin )
MACRO(PKGCONFIG _package _include_DIR _link_DIR _link_FLAGS _cflags)
! message(STATUS
"WARNING: you are using the obsolete 'PKGCONFIG' macro use FindPkgConfig")
# reset the variables at the beginning
--- 13,20 ----
! FIND_PROGRAM(PKGCONFIG_EXECUTABLE NAMES pkg-config )
MACRO(PKGCONFIG _package _include_DIR _link_DIR _link_FLAGS _cflags)
! MESSAGE(STATUS
"WARNING: you are using the obsolete 'PKGCONFIG' macro use FindPkgConfig")
# reset the variables at the beginning
***************
*** 34,51 ****
EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=includedir
OUTPUT_VARIABLE ${_include_DIR} )
! string(REGEX REPLACE "[\r\n]" " " ${_include_DIR} "${${_include_DIR}}")
EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=libdir
OUTPUT_VARIABLE ${_link_DIR} )
! string(REGEX REPLACE "[\r\n]" " " ${_link_DIR} "${${_link_DIR}}")
EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --libs
OUTPUT_VARIABLE ${_link_FLAGS} )
! string(REGEX REPLACE "[\r\n]" " " ${_link_FLAGS} "${${_link_FLAGS}}")
EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --cflags
OUTPUT_VARIABLE ${_cflags} )
! string(REGEX REPLACE "[\r\n]" " " ${_cflags} "${${_cflags}}")
ENDIF(NOT _return_VALUE)
--- 34,55 ----
EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=includedir
OUTPUT_VARIABLE ${_include_DIR} )
! STRING(REGEX REPLACE "[\r\n]" " " ${_include_DIR} "${${_include_DIR}}")
EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=libdir
OUTPUT_VARIABLE ${_link_DIR} )
! STRING(REGEX REPLACE "[\r\n]" " " ${_link_DIR} "${${_link_DIR}}")
EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --libs
OUTPUT_VARIABLE ${_link_FLAGS} )
! STRING(REGEX REPLACE "[\r\n]" " " ${_link_FLAGS} "${${_link_FLAGS}}")
EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --cflags
OUTPUT_VARIABLE ${_cflags} )
! STRING(REGEX REPLACE "[\r\n]" " " ${_cflags} "${${_cflags}}")
!
! ELSE( NOT _return_VALUE)
!
! MESSAGE(STATUS "PKGCONFIG() indicates that ${_package} is not installed (install the package which contains ${_package}.pc if you want to support this feature)")
ENDIF(NOT _return_VALUE)
From cmake-commits at cmake.org Sat Aug 16 07:10:11 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Sat, 16 Aug 2008 11:10:11 +0000
Subject: [Cmake-commits] [cmake-commits] alex committed FindPNG.cmake 1.17
1.18
Message-ID: <20080816111011.230611C99@public.kitware.com>
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv20720
Modified Files:
FindPNG.cmake
Log Message:
ENH: add more names of linpng (sync with the KDE version)
Alex
Index: FindPNG.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindPNG.cmake,v
retrieving revision 1.17
retrieving revision 1.18
diff -C 2 -d -r1.17 -r1.18
*** FindPNG.cmake 23 Jul 2007 13:49:52 -0000 1.17
--- FindPNG.cmake 16 Aug 2008 11:10:09 -0000 1.18
***************
*** 17,21 ****
)
! SET(PNG_NAMES ${PNG_NAMES} png libpng)
FIND_LIBRARY(PNG_LIBRARY NAMES ${PNG_NAMES} )
--- 17,21 ----
)
! SET(PNG_NAMES ${PNG_NAMES} png libpng png12 libpng12)
FIND_LIBRARY(PNG_LIBRARY NAMES ${PNG_NAMES} )
From cmake-commits at cmake.org Sat Aug 16 07:23:01 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Sat, 16 Aug 2008 11:23:01 +0000
Subject: [Cmake-commits] [cmake-commits] alex committed FindLibXml2.cmake
1.4 1.5
Message-ID: <20080816112301.786782288@public.kitware.com>
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv21329
Modified Files:
FindLibXml2.cmake
Log Message:
ENH: also search for xmllint, which comes with libxml2 (sync with FindLibXml2.cmake from KDE)
Alex
Index: FindLibXml2.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindLibXml2.cmake,v
retrieving revision 1.4
retrieving revision 1.5
diff -C 2 -d -r1.4 -r1.5
*** FindLibXml2.cmake 23 Jul 2007 13:49:52 -0000 1.4
--- FindLibXml2.cmake 16 Aug 2008 11:22:59 -0000 1.5
***************
*** 2,9 ****
# Once done this will define
#
! # LIBXML2_FOUND - system has LibXml2
! # LIBXML2_INCLUDE_DIR - the LibXml2 include directory
! # LIBXML2_LIBRARIES - the libraries needed to use LibXml2
# LIBXML2_DEFINITIONS - Compiler switches required for using LibXml2
# Copyright (c) 2006, Alexander Neundorf,
--- 2,10 ----
# Once done this will define
#
! # LIBXML2_FOUND - System has LibXml2
! # LIBXML2_INCLUDE_DIR - The LibXml2 include directory
! # LIBXML2_LIBRARIES - The libraries needed to use LibXml2
# LIBXML2_DEFINITIONS - Compiler switches required for using LibXml2
+ # LIBXML2_XMLLINT_EXECUTABLE - The XML checking tool xmllint coming with LibXml2
# Copyright (c) 2006, Alexander Neundorf,
***************
*** 37,40 ****
--- 38,45 ----
)
+ FIND_PROGRAM(LIBXML2_XMLLINT_EXECUTABLE xmllint)
+ # for backwards compat. with KDE 4.0.x:
+ SET(XMLLINT_EXECUTABLE "${LIBXML2_XMLLINT_EXECUTABLE}")
+
INCLUDE(FindPackageHandleStandardArgs)
***************
*** 43,46 ****
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
! MARK_AS_ADVANCED(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES)
--- 48,51 ----
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
! MARK_AS_ADVANCED(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES LIBXML2_XMLLINT_EXECUTABLE)
From cmake-commits at cmake.org Sat Aug 16 07:29:55 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Sat, 16 Aug 2008 11:29:55 +0000
Subject: [Cmake-commits] [cmake-commits] alex committed FindTIFF.cmake 1.11
1.12
Message-ID: <20080816112955.50D4122C9@public.kitware.com>
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv21510
Modified Files:
FindTIFF.cmake
Log Message:
ENH: add more names for libtiff, mark TIFF_INCLUDE_DIR and TIFF_LIBRARY as
advanced (sync with KDE)
Alex
Index: FindTIFF.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindTIFF.cmake,v
retrieving revision 1.11
retrieving revision 1.12
diff -C 2 -d -r1.11 -r1.12
*** FindTIFF.cmake 23 Jul 2007 13:49:52 -0000 1.11
--- FindTIFF.cmake 16 Aug 2008 11:29:53 -0000 1.12
***************
*** 10,14 ****
FIND_PATH(TIFF_INCLUDE_DIR tiff.h)
! SET(TIFF_NAMES ${TIFF_NAMES} tiff)
FIND_LIBRARY(TIFF_LIBRARY NAMES ${TIFF_NAMES} )
--- 10,14 ----
FIND_PATH(TIFF_INCLUDE_DIR tiff.h)
! SET(TIFF_NAMES ${TIFF_NAMES} tiff libtiff libtiff3)
FIND_LIBRARY(TIFF_LIBRARY NAMES ${TIFF_NAMES} )
***************
*** 16,22 ****
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
! FIND_PACKAGE_HANDLE_STANDARD_ARGS(TIFF DEFAULT_MSG TIFF_LIBRARY TIFF_INCLUDE_DIR)
IF(TIFF_FOUND)
SET( TIFF_LIBRARIES ${TIFF_LIBRARY} )
ENDIF(TIFF_FOUND)
--- 16,24 ----
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
! FIND_PACKAGE_HANDLE_STANDARD_ARGS(TIFF DEFAULT_MSG TIFF_LIBRARY TIFF_INCLUDE_DIR)
IF(TIFF_FOUND)
SET( TIFF_LIBRARIES ${TIFF_LIBRARY} )
ENDIF(TIFF_FOUND)
+
+ MARK_AS_ADVANCED(TIFF_INCLUDE_DIR TIFF_LIBRARY)
From cmake-commits at cmake.org Sat Aug 16 07:38:14 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Sat, 16 Aug 2008 11:38:14 +0000
Subject: [Cmake-commits] [cmake-commits] alex committed FindX11.cmake 1.33
1.34
Message-ID: <20080816113815.3891F234A@public.kitware.com>
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv22138
Modified Files:
FindX11.cmake
Log Message:
ENH: also search in /usr/X11R7, remove /usr/lib and /usr/local/lib, they are
part of the standard search paths (partly sync wih KDE)
Alex
Index: FindX11.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindX11.cmake,v
retrieving revision 1.33
retrieving revision 1.34
diff -C 2 -d -r1.33 -r1.34
*** FindX11.cmake 3 May 2008 19:27:40 -0000 1.33
--- FindX11.cmake 16 Aug 2008 11:38:12 -0000 1.34
***************
*** 47,56 ****
/usr/pkg/xorg/include
/usr/X11R6/include
! /usr/local/include
/usr/include/X11
/usr/openwin/include
/usr/openwin/share/include
/opt/graphics/OpenGL/include
- /usr/include
)
--- 47,55 ----
/usr/pkg/xorg/include
/usr/X11R6/include
! /usr/X11R7/include
/usr/include/X11
/usr/openwin/include
/usr/openwin/share/include
/opt/graphics/OpenGL/include
)
***************
*** 58,64 ****
/usr/pkg/xorg/lib
/usr/X11R6/lib
! /usr/local/lib
/usr/openwin/lib
- /usr/lib
)
--- 57,62 ----
/usr/pkg/xorg/lib
/usr/X11R6/lib
! /usr/X11R7/lib
/usr/openwin/lib
)
From cmake-commits at cmake.org Sat Aug 16 16:33:49 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Sat, 16 Aug 2008 20:33:49 +0000
Subject: [Cmake-commits] [cmake-commits] alex committed
cmGlobalKdevelopGenerator.cxx 1.31 1.32
Message-ID: <20080816203349.A45F02376@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv17514
Modified Files:
cmGlobalKdevelopGenerator.cxx
Log Message:
BUG: fix #7471, only put build directories and CMakeFiles/ in the blacklist
Alex
Index: cmGlobalKdevelopGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalKdevelopGenerator.cxx,v
retrieving revision 1.31
retrieving revision 1.32
diff -C 2 -d -r1.31 -r1.32
*** cmGlobalKdevelopGenerator.cxx 27 Mar 2008 21:40:43 -0000 1.31
--- cmGlobalKdevelopGenerator.cxx 16 Aug 2008 20:33:47 -0000 1.32
***************
*** 281,287 ****
else
{
! // add all subdirectories to the kdevelop blacklist
! // so they are not monitored for added or removed files
! // since this is basically handled by adding files to the cmake files
cmsys::Directory d;
if (d.Load(projectDir.c_str()))
--- 281,287 ----
else
{
! // add all subdirectories which are cmake build directories to the
! // kdevelop blacklist so they are not monitored for added or removed files
! // since this is handled by adding files to the cmake files
cmsys::Directory d;
if (d.Load(projectDir.c_str()))
***************
*** 298,302 ****
if (cmSystemTools::FileIsDirectory(tmp.c_str()))
{
! this->Blacklist.push_back(nextFile);
}
}
--- 298,307 ----
if (cmSystemTools::FileIsDirectory(tmp.c_str()))
{
! tmp += "/CMakeCache.txt";
! if ((nextFile == "CMakeFiles")
! || (cmSystemTools::FileExists(tmp.c_str())))
! {
! this->Blacklist.push_back(nextFile);
! }
}
}
From cmake-commits at cmake.org Sat Aug 16 16:48:44 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Sat, 16 Aug 2008 20:48:44 +0000
Subject: [Cmake-commits] [cmake-commits] alex committed
cmExtraCodeBlocksGenerator.cxx 1.18 1.19
Message-ID: <20080816204844.B4E582203@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv18013
Modified Files:
cmExtraCodeBlocksGenerator.cxx
Log Message:
STYLE: remove some commented code
Alex
Index: cmExtraCodeBlocksGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmExtraCodeBlocksGenerator.cxx,v
retrieving revision 1.18
retrieving revision 1.19
diff -C 2 -d -r1.18 -r1.19
*** cmExtraCodeBlocksGenerator.cxx 25 Nov 2007 12:45:18 -0000 1.18
--- cmExtraCodeBlocksGenerator.cxx 16 Aug 2008 20:48:42 -0000 1.19
***************
*** 94,99 ****
! /* create the project file, if it already exists, merge it with the
! existing one, otherwise create a new one */
void cmExtraCodeBlocksGenerator::CreateProjectFile(
const std::vector& lgs)
--- 94,98 ----
! /* create the project file */
void cmExtraCodeBlocksGenerator::CreateProjectFile(
const std::vector& lgs)
***************
*** 101,105 ****
const cmMakefile* mf=lgs[0]->GetMakefile();
std::string outputDir=mf->GetStartOutputDirectory();
- std::string projectDir=mf->GetHomeDirectory();
std::string projectName=mf->GetProjectName();
--- 100,103 ----
***************
*** 109,122 ****
sessionFilename+=projectName+".layout";
! /* if (cmSystemTools::FileExists(filename.c_str()))
! {
! this->MergeProjectFiles(outputDir, projectDir, filename,
! cmakeFilePattern, sessionFilename);
! }
! else */
! {
! this->CreateNewProjectFile(lgs, filename);
! }
!
}
--- 107,111 ----
sessionFilename+=projectName+".layout";
! this->CreateNewProjectFile(lgs, filename);
}
From cmake-commits at cmake.org Sat Aug 16 16:58:22 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Sat, 16 Aug 2008 20:58:22 +0000
Subject: [Cmake-commits] [cmake-commits] alex committed
cmGlobalKdevelopGenerator.cxx 1.32 1.33
Message-ID: <20080816205822.CF15C2288@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv18684
Modified Files:
cmGlobalKdevelopGenerator.cxx
Log Message:
BUG: fix #7477, set VERBOSE=1 in the kdevelop setting for the environment,
not together with the make executable
Alex
Index: cmGlobalKdevelopGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalKdevelopGenerator.cxx,v
retrieving revision 1.32
retrieving revision 1.33
diff -C 2 -d -r1.32 -r1.33
*** cmGlobalKdevelopGenerator.cxx 16 Aug 2008 20:33:47 -0000 1.32
--- cmGlobalKdevelopGenerator.cxx 16 Aug 2008 20:58:20 -0000 1.33
***************
*** 477,484 ****
" " << this->GlobalGenerator->GetLocalGenerators()[0]->
GetMakefile()->GetRequiredDefinition("CMAKE_BUILD_TOOL")
! << " VERBOSE=1 \n"
" default\n"
" \n"
! " \n"
" \n"
" \n";
--- 477,486 ----
" " << this->GlobalGenerator->GetLocalGenerators()[0]->
GetMakefile()->GetRequiredDefinition("CMAKE_BUILD_TOOL")
! << " \n"
" default\n"
" \n"
! " \n"
! " \n"
! " \n"
" \n"
" \n";
From cmake-commits at cmake.org Sat Aug 16 17:14:03 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Sat, 16 Aug 2008 21:14:03 +0000
Subject: [Cmake-commits] [cmake-commits] alex committed FindQt3.cmake 1.18
1.19
Message-ID: <20080816211403.ACED721DA@public.kitware.com>
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv19624
Modified Files:
FindQt3.cmake
Log Message:
STYLE: remove some unnecessary lines
STYLE: everything uppercase in this file
Alex
Index: FindQt3.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindQt3.cmake,v
retrieving revision 1.18
retrieving revision 1.19
diff -C 2 -d -r1.18 -r1.19
*** FindQt3.cmake 18 Jun 2008 12:37:32 -0000 1.18
--- FindQt3.cmake 16 Aug 2008 21:14:01 -0000 1.19
***************
*** 35,39 ****
C:/Progra~1/qt/include
/usr/include/qt3
- /usr/X11R6/include
)
--- 35,38 ----
***************
*** 74,78 ****
/usr/share/qt3/lib
C:/Progra~1/qt/lib
- /usr/X11R6/lib
)
--- 73,76 ----
***************
*** 95,106 ****
/usr/share/qt3/lib
C:/Progra~1/qt/lib
- /usr/X11R6/lib
)
ENDIF (QT_MT_REQUIRED)
- IF(QT_QT_LIBRARY)
- ELSE(QT_QT_LIBRARY)
- ENDIF(QT_QT_LIBRARY)
-
FIND_LIBRARY(QT_QASSISTANTCLIENT_LIBRARY
--- 93,99 ----
***************
*** 117,121 ****
/usr/share/qt3/lib
C:/Progra~1/qt/lib
- /usr/X11R6/lib
)
--- 110,113 ----
***************
*** 141,145 ****
IF(QT_MOC_EXECUTABLE)
SET ( QT_WRAP_CPP "YES")
- ELSE(QT_MOC_EXECUTABLE)
ENDIF(QT_MOC_EXECUTABLE)
--- 133,136 ----
***************
*** 163,167 ****
IF(QT_UIC_EXECUTABLE)
SET ( QT_WRAP_UI "YES")
- ELSE(QT_UIC_EXECUTABLE)
ENDIF(QT_UIC_EXECUTABLE)
--- 154,157 ----
***************
*** 195,199 ****
# req = "6.5.4", qt = "3.2.1"
! macro(error_message msg)
IF(QT3_REQUIRED)
MESSAGE( FATAL_ERROR ${msg})
--- 185,189 ----
# req = "6.5.4", qt = "3.2.1"
! MACRO(error_message msg)
IF(QT3_REQUIRED)
MESSAGE( FATAL_ERROR ${msg})
***************
*** 201,208 ****
MESSAGE( STATUS ${msg})
ENDIF(QT3_REQUIRED)
! endmacro(error_message)
IF (req_qt_major_vers GREATER qt_major_vers) # (6 > 3) ?
! error_message( "Qt major version not matched (required: ${QT_MIN_VERSION}, found: ${qt_version_str})") # yes
ELSE (req_qt_major_vers GREATER qt_major_vers) # no
IF (req_qt_major_vers LESS qt_major_vers) # (6 < 3) ?
--- 191,198 ----
MESSAGE( STATUS ${msg})
ENDIF(QT3_REQUIRED)
! ENDMACRO(error_message)
IF (req_qt_major_vers GREATER qt_major_vers) # (6 > 3) ?
! ERROR_MESSAGE( "Qt major version not matched (required: ${QT_MIN_VERSION}, found: ${qt_version_str})") # yes
ELSE (req_qt_major_vers GREATER qt_major_vers) # no
IF (req_qt_major_vers LESS qt_major_vers) # (6 < 3) ?
***************
*** 210,214 ****
ELSE (req_qt_major_vers LESS qt_major_vers) # ( 6==3) ?
IF (req_qt_minor_vers GREATER qt_minor_vers) # (5>2) ?
! error_message( "Qt minor version not matched (required: ${QT_MIN_VERSION}, found: ${qt_version_str})") # yes
ELSE (req_qt_minor_vers GREATER qt_minor_vers) # no
IF (req_qt_minor_vers LESS qt_minor_vers) # (5<2) ?
--- 200,204 ----
ELSE (req_qt_major_vers LESS qt_major_vers) # ( 6==3) ?
IF (req_qt_minor_vers GREATER qt_minor_vers) # (5>2) ?
! ERROR_MESSAGE( "Qt minor version not matched (required: ${QT_MIN_VERSION}, found: ${qt_version_str})") # yes
ELSE (req_qt_minor_vers GREATER qt_minor_vers) # no
IF (req_qt_minor_vers LESS qt_minor_vers) # (5<2) ?
***************
*** 216,220 ****
ELSE (req_qt_minor_vers LESS qt_minor_vers) # (5==2)
IF (req_qt_patch_vers GREATER qt_patch_vers) # (4>1) ?
! error_message( "Qt patch level not matched (required: ${QT_MIN_VERSION}, found: ${qt_version_str})") # yes
ELSE (req_qt_patch_vers GREATER qt_patch_vers) # (4>1) ?
SET( QT_VERSION_BIG_ENOUGH "YES" ) # yes
--- 206,210 ----
ELSE (req_qt_minor_vers LESS qt_minor_vers) # (5==2)
IF (req_qt_patch_vers GREATER qt_patch_vers) # (4>1) ?
! ERROR_MESSAGE( "Qt patch level not matched (required: ${QT_MIN_VERSION}, found: ${qt_version_str})") # yes
ELSE (req_qt_patch_vers GREATER qt_patch_vers) # (4>1) ?
SET( QT_VERSION_BIG_ENOUGH "YES" ) # yes
***************
*** 227,235 ****
# if the include a library are found then we have it
! IF(QT_INCLUDE_DIR)
! IF(QT_QT_LIBRARY)
! SET( QT_FOUND "YES" )
! ENDIF(QT_QT_LIBRARY)
! ENDIF(QT_INCLUDE_DIR)
IF(QT_FOUND)
--- 217,223 ----
# if the include a library are found then we have it
! IF(QT_INCLUDE_DIR AND QT_QT_LIBRARY)
! SET( QT_FOUND "YES" )
! ENDIF(QT_INCLUDE_DIR AND QT_QT_LIBRARY)
IF(QT_FOUND)
***************
*** 294,309 ****
SET(QT_WRAP_CPP FALSE)
! IF (QT_MOC_EXECUTABLE)
! IF(_QT_MOC_VERSION_3)
! SET ( QT_WRAP_CPP TRUE)
! ENDIF(_QT_MOC_VERSION_3)
! ENDIF (QT_MOC_EXECUTABLE)
SET(QT_WRAP_UI FALSE)
! IF (QT_UIC_EXECUTABLE)
! IF(_QT_UIC_VERSION_3)
! SET ( QT_WRAP_UI TRUE)
! ENDIF(_QT_UIC_VERSION_3)
! ENDIF (QT_UIC_EXECUTABLE)
MARK_AS_ADVANCED(
--- 282,293 ----
SET(QT_WRAP_CPP FALSE)
! IF (QT_MOC_EXECUTABLE AND _QT_MOC_VERSION_3)
! SET ( QT_WRAP_CPP TRUE)
! ENDIF (QT_MOC_EXECUTABLE AND _QT_MOC_VERSION_3)
SET(QT_WRAP_UI FALSE)
! IF (QT_UIC_EXECUTABLE AND _QT_UIC_VERSION_3)
! SET ( QT_WRAP_UI TRUE)
! ENDIF (QT_UIC_EXECUTABLE AND _QT_UIC_VERSION_3)
MARK_AS_ADVANCED(
From cmake-commits at cmake.org Sat Aug 16 18:06:19 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Sat, 16 Aug 2008 22:06:19 +0000
Subject: [Cmake-commits] [cmake-commits] alex committed cmReturnCommand.h
1.2 1.3
Message-ID: <20080816220619.3698C22E1@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv22097/Source
Modified Files:
cmReturnCommand.h
Log Message:
STYLE: extend documentation for RETURN() a bit
ENH: add a test for calling RETURN() in an included file
Alex
Index: cmReturnCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmReturnCommand.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** cmReturnCommand.h 23 Jan 2008 23:34:19 -0000 1.2
--- cmReturnCommand.h 16 Aug 2008 22:06:17 -0000 1.3
***************
*** 58,62 ****
virtual const char* GetTerseDocumentation()
{
! return "Return from a directory or function.";
}
--- 58,62 ----
virtual const char* GetTerseDocumentation()
{
! return "Return from a file, directory or function.";
}
***************
*** 68,75 ****
return
" return()\n"
! "Returns from a directory or function. When this command is "
! "encountered, it caused process of the current function or "
! "directory to stop and control is return to the caller of the "
! "function, or the parent directory if any. Note that a macro "
"is not a function and does not handle return like a function does.";
}
--- 68,79 ----
return
" return()\n"
! "Returns from a file, directory or function. When this command is "
! "encountered in an included file (via include() or find_package()), "
! "it causes processing of the current file to stop and control is "
! "returned to the including file. If it is encountered in a file which "
! "is not included by another file, e.g. a CMakeLists.txt, control is "
! "returned to the parent directory if there is one. "
! "If return is called in a function, control is returned to the caller "
! "of the function. Note that a macro "
"is not a function and does not handle return like a function does.";
}
From cmake-commits at cmake.org Sat Aug 16 18:06:19 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Sat, 16 Aug 2008 22:06:19 +0000
Subject: [Cmake-commits] [cmake-commits] alex committed CMakeLists.txt 1.2
1.3 include_return.cmake NONE 1.1
Message-ID: <20080816220619.6A82E22E5@public.kitware.com>
Update of /cvsroot/CMake/CMake/Tests/ReturnTest
In directory public:/mounts/ram/cvs-serv22097/Tests/ReturnTest
Modified Files:
CMakeLists.txt
Added Files:
include_return.cmake
Log Message:
STYLE: extend documentation for RETURN() a bit
ENH: add a test for calling RETURN() in an included file
Alex
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/ReturnTest/CMakeLists.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** CMakeLists.txt 25 Mar 2008 15:27:04 -0000 1.2
--- CMakeLists.txt 16 Aug 2008 22:06:17 -0000 1.3
***************
*** 85,88 ****
--- 85,96 ----
endif ("${subdirResult}" EQUAL 1)
+ # check return from a file
+ include(include_return.cmake)
+ if ("${include_returnResult}" EQUAL 1)
+ pass ("include_return")
+ else ("${include_returnResult}" EQUAL 1)
+ failed ("include_return got: ${include_returnResult}")
+ endif ("${include_returnResult}" EQUAL 1)
+
# check return from within a macro
macro (mymacro)
--- NEW FILE: include_return.cmake ---
set(include_returnResult 1)
return()
set(include_returnResult 0)
From cmake-commits at cmake.org Sat Aug 16 19:11:55 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Sat, 16 Aug 2008 23:11:55 +0000
Subject: [Cmake-commits] [cmake-commits] alex committed FindQt3.cmake 1.19
1.20 FindQt4.cmake 1.124 1.125 FindKDE3.cmake 1.20 1.21
FindKDE4.cmake 1.13 1.14
Message-ID: <20080816231156.16EF51B7E@public.kitware.com>
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv25002
Modified Files:
FindQt3.cmake FindQt4.cmake FindKDE3.cmake FindKDE4.cmake
Log Message:
BUG: fix #7447, FindModulesExecuteAll test fails if both Qt3 and KDE4 can be
found in the system
Qt3 and Qt4 cannot be used together in one project.
Now Qt3/KDE3 and Qt4/KDE4 handle the case that this is done nevertheless
properly, i.e. they fail with FATAL_ERROR if it was REQUIRED and they fail
with just MESSAGE(STATUS ...) and RETURN() if it was not REQUIRED
BUG: make FindQt4 error out with FATAL_ERROR also if it was searched QUIET
Alex
Index: FindKDE4.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindKDE4.cmake,v
retrieving revision 1.13
retrieving revision 1.14
diff -C 2 -d -r1.13 -r1.14
*** FindKDE4.cmake 26 Jun 2008 17:14:28 -0000 1.13
--- FindKDE4.cmake 16 Aug 2008 23:11:53 -0000 1.14
***************
*** 10,13 ****
--- 10,25 ----
# Author: Alexander Neundorf
+ # If Qt3 has already been found, fail.
+ IF(QT_QT_LIBRARY)
+ IF(KDE4_FIND_REQUIRED)
+ MESSAGE( FATAL_ERROR "KDE4/Qt4 and Qt3 cannot be used together in one project.")
+ ELSE(KDE4_FIND_REQUIRED)
+ IF(NOT KDE4_FIND_QUIETLY)
+ MESSAGE( STATUS "KDE4/Qt4 and Qt3 cannot be used together in one project.")
+ ENDIF(NOT KDE_FIND_QUIETLY)
+ RETURN()
+ ENDIF(KDE4_FIND_REQUIRED)
+ ENDIF(QT_QTCORE_LIBRARY)
+
FILE(TO_CMAKE_PATH "$ENV{KDEDIRS}" _KDEDIRS)
Index: FindQt3.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindQt3.cmake,v
retrieving revision 1.19
retrieving revision 1.20
diff -C 2 -d -r1.19 -r1.20
*** FindQt3.cmake 16 Aug 2008 21:14:01 -0000 1.19
--- FindQt3.cmake 16 Aug 2008 23:11:53 -0000 1.20
***************
*** 21,24 ****
--- 21,37 ----
# QT_WRAP_UI set true if QT_UIC_EXECUTABLE is found
+ # If Qt4 has already been found, fail.
+ IF(QT4_FOUND)
+ IF(Qt3_FIND_REQUIRED)
+ MESSAGE( FATAL_ERROR "Qt3 and Qt4 cannot be used together in one project.")
+ ELSE(Qt3_FIND_REQUIRED)
+ IF(NOT Qt3_FIND_QUIETLY)
+ MESSAGE( STATUS "Qt3 and Qt4 cannot be used together in one project.")
+ ENDIF(NOT Qt3_FIND_QUIETLY)
+ RETURN()
+ ENDIF(Qt3_FIND_REQUIRED)
+ ENDIF(QT4_FOUND)
+
+
FILE(GLOB GLOB_PATHS_BIN /usr/lib/qt-3*/bin/)
FIND_PATH(QT_INCLUDE_DIR qt.h
***************
*** 40,44 ****
# QT_INCLUDE_DIR to NOTFOUND
IF(NOT EXISTS ${QT_INCLUDE_DIR}/qglobal.h)
! SET(QT_INCLUDE_DIR QT_INCLUDE_DIR-NOTFOUND CACHE PATH "path to qt3 include directory" FORCE)
ENDIF(NOT EXISTS ${QT_INCLUDE_DIR}/qglobal.h)
--- 53,57 ----
# QT_INCLUDE_DIR to NOTFOUND
IF(NOT EXISTS ${QT_INCLUDE_DIR}/qglobal.h)
! SET(QT_INCLUDE_DIR QT_INCLUDE_DIR-NOTFOUND CACHE PATH "path to Qt3 include directory" FORCE)
ENDIF(NOT EXISTS ${QT_INCLUDE_DIR}/qglobal.h)
***************
*** 52,56 ****
# version X.Y.Z, so we need to remove the dots from version
STRING(REGEX REPLACE "\\." "" qt_version_str_lib "${qt_version_str}")
- ELSE(QT_INCLUDE_DIR)
ENDIF(QT_INCLUDE_DIR)
--- 65,68 ----
Index: FindQt4.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindQt4.cmake,v
retrieving revision 1.124
retrieving revision 1.125
diff -C 2 -d -r1.124 -r1.125
*** FindQt4.cmake 5 Jul 2008 15:57:57 -0000 1.124
--- FindQt4.cmake 16 Aug 2008 23:11:53 -0000 1.125
***************
*** 257,260 ****
--- 257,273 ----
# QT_QT_LIBRARY Qt-Library is now split
+ # If Qt3 has already been found, fail.
+ IF(QT_QT_LIBRARY)
+ IF(Qt4_FIND_REQUIRED)
+ MESSAGE( FATAL_ERROR "Qt3 and Qt4 cannot be used together in one project.")
+ ELSE(Qt4_FIND_REQUIRED)
+ IF(NOT Qt4_FIND_QUIETLY)
+ MESSAGE( STATUS "Qt3 and Qt4 cannot be used together in one project.")
+ ENDIF(NOT Qt4_FIND_QUIETLY)
+ RETURN()
+ ENDIF(Qt4_FIND_REQUIRED)
+ ENDIF(QT_QTCORE_LIBRARY)
+
+
INCLUDE(CheckSymbolExists)
INCLUDE(MacroAddFileDependencies)
***************
*** 475,481 ****
IF( NOT QT_INCLUDE_DIR)
! IF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED)
MESSAGE( FATAL_ERROR "Could NOT find QtGlobal header")
! ENDIF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED)
ENDIF( NOT QT_INCLUDE_DIR)
--- 488,494 ----
IF( NOT QT_INCLUDE_DIR)
! IF(Qt4_FIND_REQUIRED)
MESSAGE( FATAL_ERROR "Could NOT find QtGlobal header")
! ENDIF(Qt4_FIND_REQUIRED)
ENDIF( NOT QT_INCLUDE_DIR)
***************
*** 772,778 ****
ENDIF(QT_LIBRARY_DIR AND MSVC)
! IF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED)
MESSAGE( FATAL_ERROR "Could NOT find QtCore. Check ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log for more details.")
! ENDIF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED)
ENDIF( NOT QT_QTCORE_LIBRARY_DEBUG AND NOT QT_QTCORE_LIBRARY_RELEASE )
--- 785,791 ----
ENDIF(QT_LIBRARY_DIR AND MSVC)
! IF(Qt4_FIND_REQUIRED)
MESSAGE( FATAL_ERROR "Could NOT find QtCore. Check ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log for more details.")
! ENDIF(Qt4_FIND_REQUIRED)
ENDIF( NOT QT_QTCORE_LIBRARY_DEBUG AND NOT QT_QTCORE_LIBRARY_RELEASE )
Index: FindKDE3.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindKDE3.cmake,v
retrieving revision 1.20
retrieving revision 1.21
diff -C 2 -d -r1.20 -r1.21
*** FindKDE3.cmake 5 Aug 2008 20:06:14 -0000 1.20
--- FindKDE3.cmake 16 Aug 2008 23:11:53 -0000 1.21
***************
*** 68,71 ****
--- 68,83 ----
ENDIF(NOT UNIX AND KDE3_FIND_REQUIRED)
+ # If Qt4 has already been found, fail.
+ IF(QT4_FOUND)
+ IF(KDE3_FIND_REQUIRED)
+ MESSAGE( FATAL_ERROR "KDE3/Qt3 and Qt4 cannot be used together in one project.")
+ ELSE(KDE3_FIND_REQUIRED)
+ IF(NOT KDE3_FIND_QUIETLY)
+ MESSAGE( STATUS "KDE3/Qt3 and Qt4 cannot be used together in one project.")
+ ENDIF(NOT KDE3_FIND_QUIETLY)
+ RETURN()
+ ENDIF(KDE3_FIND_REQUIRED)
+ ENDIF(QT4_FOUND)
+
SET(QT_MT_REQUIRED TRUE)
From cmake-commits at cmake.org Sun Aug 17 05:11:54 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Sun, 17 Aug 2008 09:11:54 +0000
Subject: [Cmake-commits] [cmake-commits] alex committed FindQt4.cmake 1.125
1.126
Message-ID: <20080817091154.1D35FF9B@public.kitware.com>
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv6650
Modified Files:
FindQt4.cmake
Log Message:
BUG: fix closing IF()
Alex
Index: FindQt4.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindQt4.cmake,v
retrieving revision 1.125
retrieving revision 1.126
diff -C 2 -d -r1.125 -r1.126
*** FindQt4.cmake 16 Aug 2008 23:11:53 -0000 1.125
--- FindQt4.cmake 17 Aug 2008 09:11:51 -0000 1.126
***************
*** 267,271 ****
RETURN()
ENDIF(Qt4_FIND_REQUIRED)
! ENDIF(QT_QTCORE_LIBRARY)
--- 267,271 ----
RETURN()
ENDIF(Qt4_FIND_REQUIRED)
! ENDIF(QT_QT_LIBRARY)
From cmake-commits at cmake.org Sun Aug 17 05:38:04 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Sun, 17 Aug 2008 09:38:04 +0000
Subject: [Cmake-commits] [cmake-commits] alex committed FindKDE4.cmake 1.14
1.15
Message-ID: <20080817093804.A749F22E5@public.kitware.com>
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv8621
Modified Files:
FindKDE4.cmake
Log Message:
BUG: fix closing ENDIF()
Alex
Index: FindKDE4.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindKDE4.cmake,v
retrieving revision 1.14
retrieving revision 1.15
diff -C 2 -d -r1.14 -r1.15
*** FindKDE4.cmake 16 Aug 2008 23:11:53 -0000 1.14
--- FindKDE4.cmake 17 Aug 2008 09:38:02 -0000 1.15
***************
*** 20,24 ****
RETURN()
ENDIF(KDE4_FIND_REQUIRED)
! ENDIF(QT_QTCORE_LIBRARY)
FILE(TO_CMAKE_PATH "$ENV{KDEDIRS}" _KDEDIRS)
--- 20,24 ----
RETURN()
ENDIF(KDE4_FIND_REQUIRED)
! ENDIF(QT_QT_LIBRARY)
FILE(TO_CMAKE_PATH "$ENV{KDEDIRS}" _KDEDIRS)
From cmake-commits at cmake.org Mon Aug 18 09:53:08 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Mon, 18 Aug 2008 13:53:08 +0000
Subject: [Cmake-commits] [cmake-commits] king committed
cmCMakePolicyCommand.cxx 1.3 1.4 cmCMakePolicyCommand.h 1.5 1.6
Message-ID: <20080818135308.ABFD92925@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv24354/Source
Modified Files:
cmCMakePolicyCommand.cxx cmCMakePolicyCommand.h
Log Message:
ENH: Add cmake_policy(GET) command mode
It is likely that projects or CMake modules in the future will need to
check the value of a policy setting. For example, if we add a policy
that affects the results of FindXYZ.cmake modules, the module code will
need to be able to check the policy.
Index: cmCMakePolicyCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCMakePolicyCommand.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** cmCMakePolicyCommand.cxx 24 Mar 2008 14:56:26 -0000 1.3
--- cmCMakePolicyCommand.cxx 18 Aug 2008 13:53:06 -0000 1.4
***************
*** 33,36 ****
--- 33,40 ----
return this->HandleSetMode(args);
}
+ else if(args[0] == "GET")
+ {
+ return this->HandleGetMode(args);
+ }
else if(args[0] == "PUSH")
{
***************
*** 105,108 ****
--- 109,169 ----
//----------------------------------------------------------------------------
+ bool cmCMakePolicyCommand::HandleGetMode(std::vector const& args)
+ {
+ if(args.size() != 3)
+ {
+ this->SetError("GET must be given exactly 2 additional arguments.");
+ return false;
+ }
+
+ // Get arguments.
+ std::string const& id = args[1];
+ std::string const& var = args[2];
+
+ // Lookup the policy number.
+ cmPolicies::PolicyID pid;
+ if(!this->Makefile->GetPolicies()->GetPolicyID(id.c_str(), pid))
+ {
+ cmOStringStream e;
+ e << "GET given policy \"" << id << "\" which is not known to this "
+ << "version of CMake.";
+ this->SetError(e.str().c_str());
+ return false;
+ }
+
+ // Lookup the policy setting.
+ cmPolicies::PolicyStatus status = this->Makefile->GetPolicyStatus(pid);
+ switch (status)
+ {
+ case cmPolicies::OLD:
+ // Report that the policy is set to OLD.
+ this->Makefile->AddDefinition(var.c_str(), "OLD");
+ break;
+ case cmPolicies::WARN:
+ // Report that the policy is not set.
+ this->Makefile->AddDefinition(var.c_str(), "");
+ break;
+ case cmPolicies::NEW:
+ // Report that the policy is set to NEW.
+ this->Makefile->AddDefinition(var.c_str(), "NEW");
+ break;
+ case cmPolicies::REQUIRED_IF_USED:
+ case cmPolicies::REQUIRED_ALWAYS:
+ // The policy is required to be set before anything needs it.
+ {
+ cmOStringStream e;
+ e << this->Makefile->GetPolicies()->GetRequiredPolicyError(pid)
+ << "\n"
+ << "The call to cmake_policy(GET " << id << " ...) at which this "
+ << "error appears requests the policy, and this version of CMake "
+ << "requires that the policy be set to NEW before it is checked.";
+ this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
+ }
+ }
+
+ return true;
+ }
+
+ //----------------------------------------------------------------------------
bool
cmCMakePolicyCommand::HandleVersionMode(std::vector const& args)
Index: cmCMakePolicyCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCMakePolicyCommand.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C 2 -d -r1.5 -r1.6
*** cmCMakePolicyCommand.h 18 Mar 2008 00:30:47 -0000 1.5
--- cmCMakePolicyCommand.h 18 Aug 2008 13:53:06 -0000 1.6
***************
*** 109,112 ****
--- 109,117 ----
"and set the policy state to NEW."
"\n"
+ " cmake_policy(GET CMP)\n"
+ "Check whether a given policy is set to OLD or NEW behavior. "
+ "The output variable value will be \"OLD\" or \"NEW\" if the "
+ "policy is set, and empty otherwise."
+ "\n"
" cmake_policy(PUSH)\n"
" cmake_policy(POP)\n"
***************
*** 124,127 ****
--- 129,133 ----
private:
bool HandleSetMode(std::vector const& args);
+ bool HandleGetMode(std::vector const& args);
bool HandleVersionMode(std::vector const& args);
};
From cmake-commits at cmake.org Mon Aug 18 09:53:08 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Mon, 18 Aug 2008 13:53:08 +0000
Subject: [Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.71
1.72
Message-ID: <20080818135308.B5D122928@public.kitware.com>
Update of /cvsroot/CMake/CMake/Tests/Complex
In directory public:/mounts/ram/cvs-serv24354/Tests/Complex
Modified Files:
CMakeLists.txt
Log Message:
ENH: Add cmake_policy(GET) command mode
It is likely that projects or CMake modules in the future will need to
check the value of a policy setting. For example, if we add a policy
that affects the results of FindXYZ.cmake modules, the module code will
need to be able to check the policy.
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/Complex/CMakeLists.txt,v
retrieving revision 1.71
retrieving revision 1.72
diff -C 2 -d -r1.71 -r1.72
*** CMakeLists.txt 26 Jun 2008 17:01:35 -0000 1.71
--- CMakeLists.txt 18 Aug 2008 13:53:06 -0000 1.72
***************
*** 8,11 ****
--- 8,16 ----
IF(POLICY CMP0003)
CMAKE_POLICY(SET CMP0003 NEW)
+
+ CMAKE_POLICY(GET CMP0003 P3)
+ IF(NOT "${P3}" STREQUAL "NEW")
+ MESSAGE(FATAL_ERROR "CMAKE_POLICY(GET) did not report NEW!")
+ ENDIF(NOT "${P3}" STREQUAL "NEW")
ENDIF(POLICY CMP0003)
From cmake-commits at cmake.org Mon Aug 18 10:11:31 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Mon, 18 Aug 2008 14:11:31 +0000
Subject: [Cmake-commits] [cmake-commits] king committed
cmTargetLinkLibrariesCommand.cxx 1.27 1.28
cmTargetLinkLibrariesCommand.h 1.17 1.18
Message-ID: <20080818141131.46F9F2009@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv26796/Source
Modified Files:
cmTargetLinkLibrariesCommand.cxx
cmTargetLinkLibrariesCommand.h
Log Message:
ENH: Make link interface mode more distinct
Rename the recently added INTERFACE mode of the target_link_libraries()
command to LINK_INTERFACE_LIBRARIES. This makes it much more distinct
from a normal call to the command, and clearly states its connection to
the property of the same name. Also require the option to appear
immediately after the target name to make it a mode rather than an
option.
Index: cmTargetLinkLibrariesCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTargetLinkLibrariesCommand.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -C 2 -d -r1.17 -r1.18
*** cmTargetLinkLibrariesCommand.h 11 Aug 2008 20:23:02 -0000 1.17
--- cmTargetLinkLibrariesCommand.h 18 Aug 2008 14:11:29 -0000 1.18
***************
*** 65,69 ****
{
return
! " target_link_libraries( [INTERFACE]\n"
" [[debug|optimized|general] ] ...)\n"
"Specify a list of libraries to be linked into the specified target. "
--- 65,69 ----
{
return
! " target_link_libraries( [lib1 [lib2 [...]]]\n"
" [[debug|optimized|general] ] ...)\n"
"Specify a list of libraries to be linked into the specified target. "
***************
*** 91,95 ****
"set of transitive link dependencies for a target."
"\n"
! "The INTERFACE option tells the command to append the libraries "
"to the LINK_INTERFACE_LIBRARIES and LINK_INTERFACE_LIBRARIES_DEBUG "
"target properties instead of using them for linking. "
--- 91,97 ----
"set of transitive link dependencies for a target."
"\n"
! " target_link_libraries( LINK_INTERFACE_LIBRARIES\n"
! " [[debug|optimized|general] ] ...)\n"
! "The LINK_INTERFACE_LIBRARIES mode appends the libraries "
"to the LINK_INTERFACE_LIBRARIES and LINK_INTERFACE_LIBRARIES_DEBUG "
"target properties instead of using them for linking. "
Index: cmTargetLinkLibrariesCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTargetLinkLibrariesCommand.cxx,v
retrieving revision 1.27
retrieving revision 1.28
diff -C 2 -d -r1.27 -r1.28
*** cmTargetLinkLibrariesCommand.cxx 11 Aug 2008 20:23:02 -0000 1.27
--- cmTargetLinkLibrariesCommand.cxx 18 Aug 2008 14:11:28 -0000 1.28
***************
*** 65,77 ****
// add libraries, nothe that there is an optional prefix
// of debug and optimized than can be used
! std::vector::const_iterator i = args.begin();
!
! for(++i; i != args.end(); ++i)
{
! if(*i == "INTERFACE")
{
this->DoingInterface = true;
}
! else if(*i == "debug")
{
if(haveLLT)
--- 65,84 ----
// add libraries, nothe that there is an optional prefix
// of debug and optimized than can be used
! for(unsigned int i=1; i < args.size(); ++i)
{
! if(args[i] == "LINK_INTERFACE_LIBRARIES")
{
this->DoingInterface = true;
+ if(i != 1)
+ {
+ this->Makefile->IssueMessage(
+ cmake::FATAL_ERROR,
+ "The LINK_INTERFACE_LIBRARIES option must appear as the second "
+ "argument, just after the target name."
+ );
+ return true;
+ }
}
! else if(args[i] == "debug")
{
if(haveLLT)
***************
*** 82,86 ****
haveLLT = true;
}
! else if(*i == "optimized")
{
if(haveLLT)
--- 89,93 ----
haveLLT = true;
}
! else if(args[i] == "optimized")
{
if(haveLLT)
***************
*** 91,95 ****
haveLLT = true;
}
! else if(*i == "general")
{
if(haveLLT)
--- 98,102 ----
haveLLT = true;
}
! else if(args[i] == "general")
{
if(haveLLT)
***************
*** 104,108 ****
// The link type was specified by the previous argument.
haveLLT = false;
! this->HandleLibrary(i->c_str(), llt);
}
else
--- 111,115 ----
// The link type was specified by the previous argument.
haveLLT = false;
! this->HandleLibrary(args[i].c_str(), llt);
}
else
***************
*** 130,134 ****
}
}
! this->HandleLibrary(i->c_str(), llt);
}
}
--- 137,141 ----
}
}
! this->HandleLibrary(args[i].c_str(), llt);
}
}
From cmake-commits at cmake.org Mon Aug 18 10:11:31 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Mon, 18 Aug 2008 14:11:31 +0000
Subject: [Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.13
1.14
Message-ID: <20080818141131.825622009@public.kitware.com>
Update of /cvsroot/CMake/CMake/Tests/ExportImport/Export
In directory public:/mounts/ram/cvs-serv26796/Tests/ExportImport/Export
Modified Files:
CMakeLists.txt
Log Message:
ENH: Make link interface mode more distinct
Rename the recently added INTERFACE mode of the target_link_libraries()
command to LINK_INTERFACE_LIBRARIES. This makes it much more distinct
from a normal call to the command, and clearly states its connection to
the property of the same name. Also require the option to appear
immediately after the target name to make it a mode rather than an
option.
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/ExportImport/Export/CMakeLists.txt,v
retrieving revision 1.13
retrieving revision 1.14
diff -C 2 -d -r1.13 -r1.14
*** CMakeLists.txt 12 Aug 2008 21:27:48 -0000 1.13
--- CMakeLists.txt 18 Aug 2008 14:11:29 -0000 1.14
***************
*** 55,59 ****
set_property(TARGET testLib4libopt PROPERTY COMPILE_DEFINITIONS LIB_OPT)
target_link_libraries(testLib4
! INTERFACE testLib4lib debug testLib4libdbg optimized testLib4libopt
)
--- 55,60 ----
set_property(TARGET testLib4libopt PROPERTY COMPILE_DEFINITIONS LIB_OPT)
target_link_libraries(testLib4
! LINK_INTERFACE_LIBRARIES
! testLib4lib debug testLib4libdbg optimized testLib4libopt
)
From cmake-commits at cmake.org Mon Aug 18 11:26:53 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Mon, 18 Aug 2008 15:26:53 +0000
Subject: [Cmake-commits] [cmake-commits] king committed cmLocalGenerator.cxx
1.280 1.281 cmTarget.cxx 1.220 1.221
Message-ID: <20080818152654.119EA299B@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv6357/Source
Modified Files:
cmLocalGenerator.cxx cmTarget.cxx
Log Message:
STYLE: Convert unused target type cases to default
In switch statements that deal with only a few target types, use a
'default' case for the remaining target types instead of listing them
explicitly. This will make it easier to add more types in the future.
Index: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.280
retrieving revision 1.281
diff -C 2 -d -r1.280 -r1.281
*** cmLocalGenerator.cxx 5 Aug 2008 17:27:06 -0000 1.280
--- cmLocalGenerator.cxx 18 Aug 2008 15:26:50 -0000 1.281
***************
*** 724,732 ****
}
break;
! case cmTarget::UTILITY:
! case cmTarget::GLOBAL_TARGET:
! case cmTarget::INSTALL_FILES:
! case cmTarget::INSTALL_PROGRAMS:
! case cmTarget::INSTALL_DIRECTORY:
break;
}
--- 724,728 ----
}
break;
! default:
break;
}
***************
*** 1442,1450 ****
}
break;
! case cmTarget::UTILITY:
! case cmTarget::GLOBAL_TARGET:
! case cmTarget::INSTALL_FILES:
! case cmTarget::INSTALL_PROGRAMS:
! case cmTarget::INSTALL_DIRECTORY:
break;
}
--- 1438,1442 ----
}
break;
! default:
break;
}
Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.220
retrieving revision 1.221
diff -C 2 -d -r1.220 -r1.221
*** cmTarget.cxx 23 Jul 2008 16:59:14 -0000 1.220
--- cmTarget.cxx 18 Aug 2008 15:26:51 -0000 1.221
***************
*** 2044,2052 ****
case cmTarget::EXECUTABLE:
return "_LINK_EXECUTABLE";
! case cmTarget::UTILITY:
! case cmTarget::GLOBAL_TARGET:
! case cmTarget::INSTALL_FILES:
! case cmTarget::INSTALL_PROGRAMS:
! case cmTarget::INSTALL_DIRECTORY:
break;
}
--- 2044,2048 ----
case cmTarget::EXECUTABLE:
return "_LINK_EXECUTABLE";
! default:
break;
}
***************
*** 2074,2082 ****
? "CMAKE_IMPORT_LIBRARY_SUFFIX"
: "CMAKE_EXECUTABLE_SUFFIX");
! case cmTarget::UTILITY:
! case cmTarget::GLOBAL_TARGET:
! case cmTarget::INSTALL_FILES:
! case cmTarget::INSTALL_PROGRAMS:
! case cmTarget::INSTALL_DIRECTORY:
break;
}
--- 2070,2074 ----
? "CMAKE_IMPORT_LIBRARY_SUFFIX"
: "CMAKE_EXECUTABLE_SUFFIX");
! default:
break;
}
***************
*** 2103,2111 ****
case cmTarget::EXECUTABLE:
return (implib? "CMAKE_IMPORT_LIBRARY_PREFIX" : "");
! case cmTarget::UTILITY:
! case cmTarget::GLOBAL_TARGET:
! case cmTarget::INSTALL_FILES:
! case cmTarget::INSTALL_PROGRAMS:
! case cmTarget::INSTALL_DIRECTORY:
break;
}
--- 2095,2099 ----
case cmTarget::EXECUTABLE:
return (implib? "CMAKE_IMPORT_LIBRARY_PREFIX" : "");
! default:
break;
}
From cmake-commits at cmake.org Mon Aug 18 11:39:24 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Mon, 18 Aug 2008 15:39:24 +0000
Subject: [Cmake-commits] [cmake-commits] king committed
cmAddLibraryCommand.cxx 1.36 1.37 cmAddLibraryCommand.h 1.22
1.23 cmComputeLinkDepends.cxx 1.20 1.21
cmComputeLinkInformation.cxx 1.42 1.43 cmLocalGenerator.cxx
1.281 1.282 cmTarget.cxx 1.221 1.222 cmTarget.h 1.117 1.118
Message-ID: <20080818153924.EB3A420E2@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv8993/Source
Modified Files:
cmAddLibraryCommand.cxx cmAddLibraryCommand.h
cmComputeLinkDepends.cxx cmComputeLinkInformation.cxx
cmLocalGenerator.cxx cmTarget.cxx cmTarget.h
Log Message:
ENH: Add UNKNOWN type for IMPORTED libraries
When creating an IMPORTED target for a library that has been found on
disk, it may not be known whether the library is STATIC or SHARED.
However, the library may still be linked using the file found from disk.
Use of an IMPORTED target is still important to allow per-configuration
files to be specified for the library.
This change creates an UNKNOWN type for IMPORTED library targets. The
IMPORTED_LOCATION property (and its per-config equivalents) specifies
the location of the library. CMake makes no assumptions about the
library that cannot be inferred from the file on disk. This will help
projects and find-modules import targets found on disk or specified by
the user.
Index: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.281
retrieving revision 1.282
diff -C 2 -d -r1.281 -r1.282
*** cmLocalGenerator.cxx 18 Aug 2008 15:26:50 -0000 1.281
--- cmLocalGenerator.cxx 18 Aug 2008 15:39:22 -0000 1.282
***************
*** 1707,1710 ****
--- 1707,1711 ----
case cmTarget::SHARED_LIBRARY:
case cmTarget::MODULE_LIBRARY:
+ case cmTarget::UNKNOWN_LIBRARY:
{
// Get the location of the target's output file and depend on it.
Index: cmAddLibraryCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmAddLibraryCommand.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -C 2 -d -r1.22 -r1.23
*** cmAddLibraryCommand.h 11 Feb 2008 18:35:39 -0000 1.22
--- cmAddLibraryCommand.h 18 Aug 2008 15:39:22 -0000 1.23
***************
*** 101,105 ****
"The add_library command can also create IMPORTED library "
"targets using this signature:\n"
! " add_library( IMPORTED)\n"
"An IMPORTED library target references a library file located "
"outside the project. "
--- 101,105 ----
"The add_library command can also create IMPORTED library "
"targets using this signature:\n"
! " add_library( IMPORTED)\n"
"An IMPORTED library target references a library file located "
"outside the project. "
Index: cmComputeLinkInformation.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmComputeLinkInformation.cxx,v
retrieving revision 1.42
retrieving revision 1.43
diff -C 2 -d -r1.42 -r1.43
*** cmComputeLinkInformation.cxx 30 Jul 2008 14:23:41 -0000 1.42
--- cmComputeLinkInformation.cxx 18 Aug 2008 15:39:22 -0000 1.43
***************
*** 582,589 ****
}
! if(tgt && (tgt->GetType() == cmTarget::STATIC_LIBRARY ||
! tgt->GetType() == cmTarget::SHARED_LIBRARY ||
! tgt->GetType() == cmTarget::MODULE_LIBRARY ||
! impexe))
{
// This is a CMake target. Ask the target for its real name.
--- 582,586 ----
}
! if(tgt && tgt->IsLinkable())
{
// This is a CMake target. Ask the target for its real name.
***************
*** 1556,1559 ****
--- 1553,1564 ----
cmTarget* target)
{
+ // Libraries with unknown type must be handled using just the file
+ // on disk.
+ if(target->GetType() == cmTarget::UNKNOWN_LIBRARY)
+ {
+ this->AddLibraryRuntimeInfo(fullPath);
+ return;
+ }
+
// Skip targets that are not shared libraries (modules cannot be linked).
if(target->GetType() != cmTarget::SHARED_LIBRARY)
Index: cmAddLibraryCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmAddLibraryCommand.cxx,v
retrieving revision 1.36
retrieving revision 1.37
diff -C 2 -d -r1.36 -r1.37
*** cmAddLibraryCommand.cxx 11 Feb 2008 22:33:46 -0000 1.36
--- cmAddLibraryCommand.cxx 18 Aug 2008 15:39:22 -0000 1.37
***************
*** 69,72 ****
--- 69,78 ----
haveSpecifiedType = true;
}
+ else if(libType == "UNKNOWN")
+ {
+ ++s;
+ type = cmTarget::UNKNOWN_LIBRARY;
+ haveSpecifiedType = true;
+ }
else if(*s == "EXCLUDE_FROM_ALL")
{
***************
*** 128,131 ****
--- 134,147 ----
}
+ // A non-imported target may not have UNKNOWN type.
+ if(type == cmTarget::UNKNOWN_LIBRARY)
+ {
+ this->Makefile->IssueMessage(
+ cmake::FATAL_ERROR,
+ "The UNKNOWN library type may be used only for IMPORTED libraries."
+ );
+ return true;
+ }
+
// Enforce name uniqueness.
{
Index: cmComputeLinkDepends.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmComputeLinkDepends.cxx,v
retrieving revision 1.20
retrieving revision 1.21
diff -C 2 -d -r1.20 -r1.21
*** cmComputeLinkDepends.cxx 6 Aug 2008 21:48:53 -0000 1.20
--- cmComputeLinkDepends.cxx 18 Aug 2008 15:39:22 -0000 1.21
***************
*** 892,895 ****
--- 892,903 ----
//----------------------------------------------------------------------------
+ static bool cmComputeLinkDependsNotStatic(cmTarget* tgt)
+ {
+ return (tgt &&
+ tgt->GetType() != cmTarget::STATIC_LIBRARY &&
+ tgt->GetType() != cmTarget::UNKNOWN_LIBRARY);
+ }
+
+ //----------------------------------------------------------------------------
void cmComputeLinkDepends::PreserveOriginalEntries()
{
***************
*** 902,906 ****
{
cmTarget* tgt = this->EntryList[*in].Target;
! if(tgt && tgt->GetType() != cmTarget::STATIC_LIBRARY)
{
// Skip input items known to not be static libraries.
--- 910,914 ----
{
cmTarget* tgt = this->EntryList[*in].Target;
! if(cmComputeLinkDependsNotStatic(tgt))
{
// Skip input items known to not be static libraries.
***************
*** 925,929 ****
{
cmTarget* tgt = this->EntryList[*in].Target;
! if(tgt && tgt->GetType() != cmTarget::STATIC_LIBRARY)
{
// Skip input items known to not be static libraries.
--- 933,937 ----
{
cmTarget* tgt = this->EntryList[*in].Target;
! if(cmComputeLinkDependsNotStatic(tgt))
{
// Skip input items known to not be static libraries.
Index: cmTarget.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.h,v
retrieving revision 1.117
retrieving revision 1.118
diff -C 2 -d -r1.117 -r1.118
*** cmTarget.h 23 Jul 2008 16:59:14 -0000 1.117
--- cmTarget.h 18 Aug 2008 15:39:22 -0000 1.118
***************
*** 81,85 ****
enum TargetType { EXECUTABLE, STATIC_LIBRARY,
SHARED_LIBRARY, MODULE_LIBRARY, UTILITY, GLOBAL_TARGET,
! INSTALL_FILES, INSTALL_PROGRAMS, INSTALL_DIRECTORY};
static const char* TargetTypeNames[];
enum CustomCommandType { PRE_BUILD, PRE_LINK, POST_BUILD };
--- 81,86 ----
enum TargetType { EXECUTABLE, STATIC_LIBRARY,
SHARED_LIBRARY, MODULE_LIBRARY, UTILITY, GLOBAL_TARGET,
! INSTALL_FILES, INSTALL_PROGRAMS, INSTALL_DIRECTORY,
! UNKNOWN_LIBRARY};
static const char* TargetTypeNames[];
enum CustomCommandType { PRE_BUILD, PRE_LINK, POST_BUILD };
***************
*** 394,397 ****
--- 395,401 ----
bool IsExecutableWithExports();
+ /** Return whether this target may be used to link another target. */
+ bool IsLinkable();
+
/** Return whether this target is a shared library Framework on
Apple. */
Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.221
retrieving revision 1.222
diff -C 2 -d -r1.221 -r1.222
*** cmTarget.cxx 18 Aug 2008 15:26:51 -0000 1.221
--- cmTarget.cxx 18 Aug 2008 15:39:22 -0000 1.222
***************
*** 31,35 ****
"EXECUTABLE", "STATIC_LIBRARY",
"SHARED_LIBRARY", "MODULE_LIBRARY", "UTILITY", "GLOBAL_TARGET",
! "INSTALL_FILES", "INSTALL_PROGRAMS", "INSTALL_DIRECTORY"
};
--- 31,36 ----
"EXECUTABLE", "STATIC_LIBRARY",
"SHARED_LIBRARY", "MODULE_LIBRARY", "UTILITY", "GLOBAL_TARGET",
! "INSTALL_FILES", "INSTALL_PROGRAMS", "INSTALL_DIRECTORY",
! "UNKNOWN_LIBRARY"
};
***************
*** 278,281 ****
--- 279,283 ----
"symlink just inside the framework folder. "
"For DLLs this is the location of the \".dll\" part of the library. "
+ "For UNKNOWN libraries this is the location of the file to be linked. "
"Ignored for non-imported targets.");
***************
*** 788,791 ****
--- 790,803 ----
//----------------------------------------------------------------------------
+ bool cmTarget::IsLinkable()
+ {
+ return (this->GetType() == cmTarget::STATIC_LIBRARY ||
+ this->GetType() == cmTarget::SHARED_LIBRARY ||
+ this->GetType() == cmTarget::MODULE_LIBRARY ||
+ this->GetType() == cmTarget::UNKNOWN_LIBRARY ||
+ this->IsExecutableWithExports());
+ }
+
+ //----------------------------------------------------------------------------
bool cmTarget::IsFrameworkOnApple()
{
***************
*** 1861,1865 ****
this->GetType() == cmTarget::STATIC_LIBRARY ||
this->GetType() == cmTarget::SHARED_LIBRARY ||
! this->GetType() == cmTarget::MODULE_LIBRARY)
{
if(!this->IsImported() && strcmp(prop,"LOCATION") == 0)
--- 1873,1878 ----
this->GetType() == cmTarget::STATIC_LIBRARY ||
this->GetType() == cmTarget::SHARED_LIBRARY ||
! this->GetType() == cmTarget::MODULE_LIBRARY ||
! this->GetType() == cmTarget::UNKNOWN_LIBRARY)
{
if(!this->IsImported() && strcmp(prop,"LOCATION") == 0)
***************
*** 1958,1961 ****
--- 1971,1977 ----
return "INSTALL_DIRECTORY";
// break; /* unreachable */
+ case cmTarget::UNKNOWN_LIBRARY:
+ return "UNKNOWN_LIBRARY";
+ // break; /* unreachable */
}
return 0;
From cmake-commits at cmake.org Mon Aug 18 11:39:25 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Mon, 18 Aug 2008 15:39:25 +0000
Subject: [Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.100
1.101
Message-ID: <20080818153925.2DF4820E2@public.kitware.com>
Update of /cvsroot/CMake/CMake/Tests/SimpleInstall
In directory public:/mounts/ram/cvs-serv8993/Tests/SimpleInstall
Modified Files:
CMakeLists.txt
Log Message:
ENH: Add UNKNOWN type for IMPORTED libraries
When creating an IMPORTED target for a library that has been found on
disk, it may not be known whether the library is STATIC or SHARED.
However, the library may still be linked using the file found from disk.
Use of an IMPORTED target is still important to allow per-configuration
files to be specified for the library.
This change creates an UNKNOWN type for IMPORTED library targets. The
IMPORTED_LOCATION property (and its per-config equivalents) specifies
the location of the library. CMake makes no assumptions about the
library that cannot be inferred from the file on disk. This will help
projects and find-modules import targets found on disk or specified by
the user.
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/SimpleInstall/CMakeLists.txt,v
retrieving revision 1.100
retrieving revision 1.101
diff -C 2 -d -r1.100 -r1.101
*** CMakeLists.txt 17 Jun 2008 15:39:26 -0000 1.100
--- CMakeLists.txt 18 Aug 2008 15:39:22 -0000 1.101
***************
*** 67,73 ****
DOC "Fourth library")
INCLUDE_DIRECTORIES(${CMAKE_INSTALL_PREFIX}/MyTest/include)
ADD_EXECUTABLE (SimpleInstExeS2 inst2.cxx foo.c foo.h)
! TARGET_LINK_LIBRARIES(SimpleInstExeS2 ${TEST1_LIBRARY} ${TEST2_LIBRARY} ${TEST4_LIBRARY})
SET(install_target SimpleInstExeS2)
--- 67,77 ----
DOC "Fourth library")
+ # Test importing a library found on disk.
+ ADD_LIBRARY(lib_test4 UNKNOWN IMPORTED)
+ SET_PROPERTY(TARGET lib_test4 PROPERTY IMPORTED_LOCATION ${TEST4_LIBRARY})
+
INCLUDE_DIRECTORIES(${CMAKE_INSTALL_PREFIX}/MyTest/include)
ADD_EXECUTABLE (SimpleInstExeS2 inst2.cxx foo.c foo.h)
! TARGET_LINK_LIBRARIES(SimpleInstExeS2 ${TEST1_LIBRARY} ${TEST2_LIBRARY} lib_test4)
SET(install_target SimpleInstExeS2)
From cmake-commits at cmake.org Mon Aug 18 16:29:02 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Mon, 18 Aug 2008 20:29:02 +0000
Subject: [Cmake-commits] [cmake-commits] king committed cmMakefile.cxx 1.478
1.479 cmMakefile.h 1.233 1.234 cmPolicies.cxx 1.31 1.32
cmPolicies.h 1.16 1.17
Message-ID: <20080818202902.A44172A62@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv17174/Source
Modified Files:
cmMakefile.cxx cmMakefile.h cmPolicies.cxx cmPolicies.h
Log Message:
ENH: Improve errors when a policy is REQUIRED
In the future some policies may be set to REQUIRED_IF_USED or
REQUIRED_ALWAYS. This change clarifies the error messages users receive
when violating the requirements.
Index: cmPolicies.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmPolicies.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -C 2 -d -r1.16 -r1.17
*** cmPolicies.h 23 Jul 2008 16:59:14 -0000 1.16
--- cmPolicies.h 18 Aug 2008 20:29:00 -0000 1.17
***************
*** 76,87 ****
bool ApplyPolicyVersion(cmMakefile *mf, const char *version);
- ///! test to see if setting a policy to a specific value is valid
- bool IsValidPolicyStatus(cmPolicies::PolicyID id,
- cmPolicies::PolicyStatus status);
-
- ///! test to see if setting a policy to a specific value is valid, when used
- bool IsValidUsedPolicyStatus(cmPolicies::PolicyID id,
- cmPolicies::PolicyStatus status);
-
///! return a warning string for a given policy
std::string GetPolicyWarning(cmPolicies::PolicyID id);
--- 76,79 ----
***************
*** 90,93 ****
--- 82,88 ----
std::string GetRequiredPolicyError(cmPolicies::PolicyID id);
+ ///! return an error string for when a required policy is unspecified
+ std::string GetRequiredAlwaysPolicyError(cmPolicies::PolicyID id);
+
///! Get docs for policies
void GetDocumentation(std::vector& v);
***************
*** 97,101 ****
std::map Policies;
std::map PolicyStringMap;
!
};
--- 92,99 ----
std::map Policies;
std::map PolicyStringMap;
!
! void DiagnoseAncientPolicies(std::vector const& ancient,
! unsigned int majorVer, unsigned int minorVer,
! unsigned int patchVer, cmMakefile* mf);
};
Index: cmPolicies.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmPolicies.cxx,v
retrieving revision 1.31
retrieving revision 1.32
diff -C 2 -d -r1.31 -r1.32
*** cmPolicies.cxx 23 Jul 2008 16:59:14 -0000 1.31
--- cmPolicies.cxx 18 Aug 2008 20:29:00 -0000 1.32
***************
*** 348,351 ****
--- 348,352 ----
}
+ //----------------------------------------------------------------------------
bool cmPolicies::ApplyPolicyVersion(cmMakefile *mf,
const char *version)
***************
*** 409,412 ****
--- 410,414 ----
// now loop over all the policies and set them as appropriate
+ std::vector ancientPolicies;
std::map::iterator i
= this->Policies.begin();
***************
*** 415,419 ****
if (i->second->IsPolicyNewerThan(majorVer,minorVer,patchVer))
{
! if (!mf->SetPolicy(i->second->ID, cmPolicies::WARN))
{
return false;
--- 417,425 ----
if (i->second->IsPolicyNewerThan(majorVer,minorVer,patchVer))
{
! if(i->second->Status == cmPolicies::REQUIRED_ALWAYS)
! {
! ancientPolicies.push_back(i->first);
! }
! else if (!mf->SetPolicy(i->second->ID, cmPolicies::WARN))
{
return false;
***************
*** 428,530 ****
}
}
- return true;
- }
! // is this a valid status the listfile can set this policy to?
! bool cmPolicies::IsValidPolicyStatus(cmPolicies::PolicyID id,
! cmPolicies::PolicyStatus status)
! {
! // if they are setting a feature to anything other than OLD or WARN and the
! // feature is not known about then that is an error
! if (this->Policies.find(id) == this->Policies.end())
! {
! if (status == cmPolicies::WARN ||
! status == cmPolicies::OLD)
{
! return true;
! }
! cmOStringStream error;
! error <<
! "Error: an attempt was made to enable the new behavior for " <<
! "a new feature that is in a later version of CMake than "
! "what you are runing, please upgrade to a newer version "
! "of CMake.";
! cmSystemTools::Error(error.str().c_str());
! return false;
! }
!
! // now we know the feature is defined, so the only issue is if someone is
! // setting it to WARN or OLD when the feature is REQUIRED_ALWAYS
! if ((status == cmPolicies::WARN ||
! status == cmPolicies::OLD) &&
! this->Policies[id]->Status == cmPolicies::REQUIRED_ALWAYS)
! {
! cmOStringStream error;
! error <<
! "Error: an attempt was made to enable the old behavior for " <<
! "a feature that is no longer supported. The feature in " <<
! "question is feature " <<
! id <<
! " which had new behavior introduced in CMake version " <<
! this->Policies[id]->GetVersionString() <<
! " please either update your CMakeLists files to conform to " <<
! "the new behavior " <<
! "or use an older version of CMake that still supports " <<
! "the old behavior. Run cmake --help-policies " <<
! id << " for more information.";
! cmSystemTools::Error(error.str().c_str());
return false;
- }
-
- return true;
- }
-
- // is this a valid status the listfile can set this policy to?
- bool cmPolicies::IsValidUsedPolicyStatus(cmPolicies::PolicyID id,
- cmPolicies::PolicyStatus status)
- {
- // if they are setting a feature to anything other than OLD or WARN and the
- // feature is not known about then that is an error
- if (this->Policies.find(id) == this->Policies.end())
- {
- if (status == cmPolicies::WARN ||
- status == cmPolicies::OLD)
- {
- return true;
}
- cmOStringStream error;
- error <<
- "Error: an attempt was made to enable the new behavior for " <<
- "a new feature that is in a later version of CMake than "
- "what you are runing, please upgrade to a newer version "
- "of CMake.";
- cmSystemTools::Error(error.str().c_str());
- return false;
- }
- // now we know the feature is defined, so the only issue is if someone is
- // setting it to WARN or OLD when the feature is REQUIRED_ALWAYS
- if ((status == cmPolicies::WARN ||
- status == cmPolicies::OLD) &&
- (this->Policies[id]->Status == cmPolicies::REQUIRED_ALWAYS ||
- this->Policies[id]->Status == cmPolicies::REQUIRED_IF_USED))
- {
- cmOStringStream error;
- error <<
- "Error: an attempt was made to enable the old behavior for " <<
- "a feature that is no longer supported. The feature in " <<
- "question is feature " <<
- id <<
- " which had new behavior introduced in CMake version " <<
- this->Policies[id]->GetVersionString() <<
- " please either update your CMakeLists files to conform to " <<
- "the new behavior " <<
- "or use an older version of CMake that still supports " <<
- "the old behavior. Run cmake --help-policies " <<
- id << " for more information.";
- cmSystemTools::Error(error.str().c_str());
- return false;
- }
-
return true;
}
--- 434,447 ----
}
}
! // Make sure the project does not use any ancient policies.
! if(!ancientPolicies.empty())
{
! this->DiagnoseAncientPolicies(ancientPolicies,
! majorVer, minorVer, patchVer, mf);
! cmSystemTools::SetFatalErrorOccured();
return false;
}
return true;
}
***************
*** 672,673 ****
--- 589,635 ----
}
}
+
+ //----------------------------------------------------------------------------
+ std::string
+ cmPolicies::GetRequiredAlwaysPolicyError(cmPolicies::PolicyID id)
+ {
+ std::string pid = this->GetPolicyIDString(id);
+ cmOStringStream e;
+ e << "Policy " << pid << " may not be set to OLD behavior because this "
+ << "version of CMake no longer supports it. "
+ << "The policy was introduced in "
+ << "CMake version " << this->Policies[id]->GetVersionString()
+ << ", and use of NEW behavior is now required."
+ << "\n"
+ << "Please either update your CMakeLists.txt files to conform to "
+ << "the new behavior or use an older version of CMake that still "
+ << "supports the old behavior. "
+ << "Run cmake --help-policy " << pid << " for more information.";
+ return e.str();
+ }
+
+ //----------------------------------------------------------------------------
+ void
+ cmPolicies::DiagnoseAncientPolicies(std::vector const& ancient,
+ unsigned int majorVer,
+ unsigned int minorVer,
+ unsigned int patchVer,
+ cmMakefile* mf)
+ {
+ cmOStringStream e;
+ e << "The project requests behavior compatible with CMake version \""
+ << majorVer << "." << minorVer << "." << patchVer
+ << "\", which requires OLD the behavior for some policies:\n";
+ for(std::vector::const_iterator
+ i = ancient.begin(); i != ancient.end(); ++i)
+ {
+ cmPolicy const* policy = this->Policies[*i];
+ e << " " << policy->IDString << ": " << policy->ShortDescription << "\n";
+ }
+ e << "However, this version of CMake no longer supports the OLD "
+ << "behavior for these policies. "
+ << "Please either update your CMakeLists.txt files to conform to "
+ << "the new behavior or use an older version of CMake that still "
+ << "supports the old behavior.";
+ mf->IssueMessage(cmake::FATAL_ERROR, e.str().c_str());
+ }
Index: cmMakefile.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.h,v
retrieving revision 1.233
retrieving revision 1.234
diff -C 2 -d -r1.233 -r1.234
*** cmMakefile.h 26 Jun 2008 17:30:10 -0000 1.233
--- cmMakefile.h 18 Aug 2008 20:29:00 -0000 1.234
***************
*** 901,904 ****
--- 901,905 ----
cmPolicies::PolicyStatus> PolicyMap;
std::vector PolicyStack;
+ cmPolicies::PolicyStatus GetPolicyStatusInternal(cmPolicies::PolicyID id);
bool CheckCMP0000;
Index: cmMakefile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.cxx,v
retrieving revision 1.478
retrieving revision 1.479
diff -C 2 -d -r1.478 -r1.479
*** cmMakefile.cxx 31 Jul 2008 14:33:25 -0000 1.478
--- cmMakefile.cxx 18 Aug 2008 20:29:00 -0000 1.479
***************
*** 3461,3508 ****
}
! cmPolicies::PolicyStatus cmMakefile
! ::GetPolicyStatus(cmPolicies::PolicyID id)
{
! cmPolicies::PolicyStatus status = cmPolicies::REQUIRED_IF_USED;
! PolicyMap::iterator mappos;
! int vecpos;
! bool done = false;
! // check our policy stack first
! for (vecpos = static_cast(this->PolicyStack.size()) - 1;
! vecpos >= 0 && !done; vecpos--)
! {
! mappos = this->PolicyStack[vecpos].find(id);
! if (mappos != this->PolicyStack[vecpos].end())
{
! status = mappos->second;
! done = true;
}
! }
!
! // if not found then
! if (!done)
! {
! // pass the buck to our parent if we have one
! if (this->LocalGenerator->GetParent())
{
! cmMakefile *parent =
! this->LocalGenerator->GetParent()->GetMakefile();
! return parent->GetPolicyStatus(id);
}
! // otherwise use the default
! else
{
! status = this->GetPolicies()->GetPolicyStatus(id);
}
! }
!
! // warn if we see a REQUIRED_IF_USED above a OLD or WARN
! if (!this->GetPolicies()->IsValidUsedPolicyStatus(id,status))
! {
! return cmPolicies::REQUIRED_IF_USED;
! }
!
! return status;
}
--- 3461,3517 ----
}
! //----------------------------------------------------------------------------
! cmPolicies::PolicyStatus
! cmMakefile::GetPolicyStatus(cmPolicies::PolicyID id)
{
! // Get the current setting of the policy.
! cmPolicies::PolicyStatus cur = this->GetPolicyStatusInternal(id);
! // If the policy is required to be set to NEW but is not, ignore the
! // current setting and tell the caller.
! if(cur != cmPolicies::NEW)
{
! if(cur == cmPolicies::REQUIRED_ALWAYS ||
! cur == cmPolicies::REQUIRED_IF_USED)
! {
! return cur;
! }
! cmPolicies::PolicyStatus def = this->GetPolicies()->GetPolicyStatus(id);
! if(def == cmPolicies::REQUIRED_ALWAYS ||
! def == cmPolicies::REQUIRED_IF_USED)
! {
! return def;
! }
}
!
! // The current setting is okay.
! return cur;
! }
!
! //----------------------------------------------------------------------------
! cmPolicies::PolicyStatus
! cmMakefile::GetPolicyStatusInternal(cmPolicies::PolicyID id)
! {
! // Is the policy set in our stack?
! for(std::vector::reverse_iterator
! psi = this->PolicyStack.rbegin();
! psi != this->PolicyStack.rend(); ++psi)
{
! PolicyMap::const_iterator pse = psi->find(id);
! if(pse != psi->end())
! {
! return pse->second;
! }
}
!
! // If we have a parent directory, recurse up to it.
! if(this->LocalGenerator->GetParent())
{
! cmMakefile* parent = this->LocalGenerator->GetParent()->GetMakefile();
! return parent->GetPolicyStatusInternal(id);
}
!
! // The policy is not set. Use the default for this CMake version.
! return this->GetPolicies()->GetPolicyStatus(id);
}
***************
*** 3521,3555 ****
}
! bool cmMakefile::SetPolicy(cmPolicies::PolicyID id,
cmPolicies::PolicyStatus status)
{
! // setting a REQUIRED_ALWAYS policy to WARN or OLD is an insta error
! if (this->GetPolicies()->
! IsValidPolicyStatus(id,status))
! {
! this->PolicyStack.back()[id] = status;
! // Special hook for presenting compatibility variable as soon as
! // the user requests it.
! if(id == cmPolicies::CMP0001 &&
! (status == cmPolicies::WARN || status == cmPolicies::OLD))
{
! if(!(this->GetCacheManager()
! ->GetCacheValue("CMAKE_BACKWARDS_COMPATIBILITY")))
! {
! // Set it to 2.4 because that is the last version where the
! // variable had meaning.
! this->AddCacheDefinition
! ("CMAKE_BACKWARDS_COMPATIBILITY", "2.4",
! "For backwards compatibility, what version of CMake "
! "commands and "
! "syntax should this version of CMake try to support.",
! cmCacheManager::STRING);
! }
}
! return true;
! }
! return false;
}
--- 3530,3571 ----
}
! //----------------------------------------------------------------------------
! bool cmMakefile::SetPolicy(cmPolicies::PolicyID id,
cmPolicies::PolicyStatus status)
{
! // A REQUIRED_ALWAYS policy may be set only to NEW.
! if(status != cmPolicies::NEW &&
! this->GetPolicies()->GetPolicyStatus(id) ==
! cmPolicies::REQUIRED_ALWAYS)
! {
! std::string msg =
! this->GetPolicies()->GetRequiredAlwaysPolicyError(id);
! this->IssueMessage(cmake::FATAL_ERROR, msg.c_str());
! return false;
! }
! // Store the setting.
! this->PolicyStack.back()[id] = status;
!
! // Special hook for presenting compatibility variable as soon as
! // the user requests it.
! if(id == cmPolicies::CMP0001 &&
! (status == cmPolicies::WARN || status == cmPolicies::OLD))
! {
! if(!(this->GetCacheManager()
! ->GetCacheValue("CMAKE_BACKWARDS_COMPATIBILITY")))
{
! // Set it to 2.4 because that is the last version where the
! // variable had meaning.
! this->AddCacheDefinition
! ("CMAKE_BACKWARDS_COMPATIBILITY", "2.4",
! "For backwards compatibility, what version of CMake "
! "commands and "
! "syntax should this version of CMake try to support.",
! cmCacheManager::STRING);
}
+ }
! return true;
}
From cmake-commits at cmake.org Tue Aug 19 10:28:25 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Tue, 19 Aug 2008 14:28:25 +0000
Subject: [Cmake-commits] [cmake-commits] king committed cmMakefile.cxx 1.479
1.480
Message-ID: <20080819142825.187EE2368@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv15894/Source
Modified Files:
cmMakefile.cxx
Log Message:
BUG: Linking to modules is for 2.2 compat only
The compatibility check to allow linking to modules should test for
CMake 2.2, not the unreleased 2.3. See issue #7500. Furthermore, the
message should be more clear about fixing the code instead of setting
CMAKE_BACKWARDS_COMPATIBILITY unless one is just trying to build an
existing project.
Index: cmMakefile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.cxx,v
retrieving revision 1.479
retrieving revision 1.480
diff -C 2 -d -r1.479 -r1.480
*** cmMakefile.cxx 18 Aug 2008 20:29:00 -0000 1.479
--- cmMakefile.cxx 19 Aug 2008 14:28:22 -0000 1.480
***************
*** 1223,1227 ****
{
// CMake versions below 2.4 allowed linking to modules.
! bool allowModules = this->NeedBackwardsCompatibility(2,3);
// if it is not a static or shared library then you can not link to it
if(!((tgt->GetType() == cmTarget::STATIC_LIBRARY) ||
--- 1223,1227 ----
{
// CMake versions below 2.4 allowed linking to modules.
! bool allowModules = this->NeedBackwardsCompatibility(2,2);
// if it is not a static or shared library then you can not link to it
if(!((tgt->GetType() == cmTarget::STATIC_LIBRARY) ||
***************
*** 1230,1244 ****
{
cmOStringStream e;
! e << "Attempt to add link target " << lib << " of type: "
<< cmTarget::TargetTypeNames[static_cast(tgt->GetType())]
! << "\nto target " << target
! << ". One can only link to STATIC or SHARED libraries, or "
<< "to executables with the ENABLE_EXPORTS property set.";
// in older versions of cmake linking to modules was allowed
if( tgt->GetType() == cmTarget::MODULE_LIBRARY )
{
! e <<
! "\nTo allow linking of modules set "
! "CMAKE_BACKWARDS_COMPATIBILITY to 2.2 or lower\n";
}
// if no modules are allowed then this is always an error
--- 1230,1247 ----
{
cmOStringStream e;
! e << "Target \"" << lib << "\" of type "
<< cmTarget::TargetTypeNames[static_cast(tgt->GetType())]
! << " may not be linked into another target. "
! << "One may link only to STATIC or SHARED libraries, or "
<< "to executables with the ENABLE_EXPORTS property set.";
// in older versions of cmake linking to modules was allowed
if( tgt->GetType() == cmTarget::MODULE_LIBRARY )
{
! e << "\n"
! << "If you are developing a new project, re-organize it to avoid "
! << "linking to modules. "
! << "If you are just trying to build an existing project, "
! << "set CMAKE_BACKWARDS_COMPATIBILITY to 2.2 or lower to allow "
! << "linking to modules.";
}
// if no modules are allowed then this is always an error
***************
*** 1248,1252 ****
(allowModules && tgt->GetType() != cmTarget::MODULE_LIBRARY))
{
! cmSystemTools::Error(e.str().c_str());
}
}
--- 1251,1255 ----
(allowModules && tgt->GetType() != cmTarget::MODULE_LIBRARY))
{
! this->IssueMessage(cmake::FATAL_ERROR, e.str().c_str());
}
}
From cmake-commits at cmake.org Tue Aug 19 10:29:37 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Tue, 19 Aug 2008 14:29:37 +0000
Subject: [Cmake-commits] [cmake-commits] king committed cmTarget.cxx 1.222
1.223
Message-ID: <20080819142937.2573D28F0@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv15993/Source
Modified Files:
cmTarget.cxx
Log Message:
ENH: Clarify link interface documentation
The LINK_INTERFACE_LIBRARIES property does not apply for STATIC
libraries. The IMPORTED_LINK_INTERFACE_LIBRARIES property does apply
for STATIC libraries. State both explicitly in the documentation.
Also, clarify that the per-configuration version of these properties
completely overrids the generic version.
Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.222
retrieving revision 1.223
diff -C 2 -d -r1.222 -r1.223
*** cmTarget.cxx 18 Aug 2008 15:39:22 -0000 1.222
--- cmTarget.cxx 19 Aug 2008 14:29:35 -0000 1.223
***************
*** 247,251 ****
"configuration of an imported target. "
"Configuration names correspond to those provided by the project "
! "from which the target is imported.");
cm->DefineProperty
--- 247,253 ----
"configuration of an imported target. "
"Configuration names correspond to those provided by the project "
! "from which the target is imported. "
! "If set, this property completely overrides the generic property "
! "for the named configuration.");
cm->DefineProperty
***************
*** 255,259 ****
"target is linked to another target. "
"The libraries will be included on the link line for the target. "
! "Ignored for non-imported targets.");
cm->DefineProperty
--- 257,263 ----
"target is linked to another target. "
"The libraries will be included on the link line for the target. "
! "Unlike the LINK_INTERFACE_LIBRARIES property, this property applies "
! "to all imported target types, including STATIC libraries. "
! "This property is ignored for non-imported targets.");
cm->DefineProperty
***************
*** 263,267 ****
"configuration of an imported target. "
"Configuration names correspond to those provided by the project "
! "from which the target is imported.");
cm->DefineProperty
--- 267,273 ----
"configuration of an imported target. "
"Configuration names correspond to those provided by the project "
! "from which the target is imported. "
! "If set, this property completely overrides the generic property "
! "for the named configuration.");
cm->DefineProperty
***************
*** 401,405 ****
"If the list is empty then no transitive link dependencies will be "
"incorporated when this target is linked into another target even if "
! "the default set is non-empty.");
cm->DefineProperty
--- 407,412 ----
"If the list is empty then no transitive link dependencies will be "
"incorporated when this target is linked into another target even if "
! "the default set is non-empty. "
! "This property is ignored for STATIC libraries.");
cm->DefineProperty
***************
*** 407,411 ****
"Per-configuration list of public interface libraries for a target.",
"This is the configuration-specific version of "
! "LINK_INTERFACE_LIBRARIES.");
cm->DefineProperty
--- 414,420 ----
"Per-configuration list of public interface libraries for a target.",
"This is the configuration-specific version of "
! "LINK_INTERFACE_LIBRARIES. "
! "If set, this property completely overrides the generic property "
! "for the named configuration.");
cm->DefineProperty
From cmake-commits at cmake.org Tue Aug 19 11:43:53 2008
From: cmake-commits at cmake.org (cmake-commits at cmake.org)
Date: Tue, 19 Aug 2008 15:43:53 +0000
Subject: [Cmake-commits] [cmake-commits] king committed
cmSetPropertyCommand.cxx 1.7 1.8
cmSetTargetPropertiesCommand.cxx 1.9 1.10 cmTarget.cxx 1.223
1.224 cmTarget.h 1.118 1.119
Message-ID: <20080819154353.ECFD623B1@public.kitware.com>
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv24701/Source
Modified Files:
cmSetPropertyCommand.cxx cmSetTargetPropertiesCommand.cxx
cmTarget.cxx cmTarget.h
Log Message:
ENH: Disallow link-type keywords in link interface
The LINK_INTERFACE_LIBRARIES target property may not contain the
"debug", "optimized", or "general" keywords. These keywords are
supported only by the target_link_libraries (and link_libraries) command
and are not a generic library list feature in CMake. When a user
attempts to add one of these keywords to the property value, we now
produce an error message that refers users to alternative means.
Index: cmSetTargetPropertiesCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSetTargetPropertiesCommand.cxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -C 2 -d -r1.9 -r1.10
*** cmSetTargetPropertiesCommand.cxx 28 Jan 2008 13:38:36 -0000 1.9
--- cmSetTargetPropertiesCommand.cxx 19 Aug 2008 15:43:51 -0000 1.10
***************
*** 104,107 ****
--- 104,108 ----
target->SetProperty(propertyPairs[k].c_str(),
propertyPairs[k+1].c_str());
+ target->CheckProperty(propertyPairs[k].c_str(), mf);
}
}
Index: cmTarget.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.h,v
retrieving revision 1.118
retrieving revision 1.119
diff -C 2 -d -r1.118 -r1.119
*** cmTarget.h 18 Aug 2008 15:39:22 -0000 1.118
--- cmTarget.h 19 Aug 2008 15:43:51 -0000 1.119
***************
*** 246,249 ****
--- 246,250 ----
const char *GetProperty(const char *prop, cmProperty::ScopeType scope);
bool GetPropertyAsBool(const char *prop);
+ void CheckProperty(const char* prop, cmMakefile* context);
bool IsImported() const {return this->IsImportedTarget;}
Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.223
retrieving revision 1.224
diff -C 2 -d -r1.223 -r1.224
*** cmTarget.cxx 19 Aug 2008 14:29:35 -0000 1.223
--- cmTarget.cxx 19 Aug 2008 15:43:51 -0000 1.224
***************
*** 23,26 ****
--- 23,27 ----
#include "cmComputeLinkInformation.h"
#include "cmListFileCache.h"
+ #include
#include