Commit Graph

114 Commits

Author SHA1 Message Date
Stephen Kelly 80e9fe9cee Help: Note that language-specific 'built-ins' are set by the project command. 2014-01-07 09:38:01 -05:00
Stephen Kelly 0b5bf8ad0b Help: Mention CMAKE_DISABLE_FIND_PACKAGE_<PackageName> in package docs. 2014-01-07 09:38:00 -05:00
Stephen Kelly 2af966d9ab Genex: Add EQUAL expression.
Support decimal, hex, octal and binary literals.
2014-01-06 17:25:09 +01:00
Brad King b225dbbd02 Merge topic 'minor-cleanups'
a55c70d cmTarget: Remove support for <CONFIG>_LOCATION property.
c9f9b3c cmTarget: Test impliedByUse number-compatible properties.
fbe1fa7 cmTarget: Don't repeat property origin debug information.
01c545c cmTarget: Fix debug report for interface-set compatibility types.
c67e1a6 cmTarget: Fix reporting interface-set properties which are FALSE.
07b0f54 Qt Tests: Remove commented and unneeded line.
79db8ef cmTarget: Fix the property compatibility error message
43340a9 Help: Reformat Qt autogenerator documentation.
d98ea6c Help: Mark some code blocks as containing cmake code.
ea78935 GenerateExportHeader: Reformat docs.
272a20f cmTarget: Don't update IMPORTED target compilation properties
03d842a Run the add_compile_options command unit test.
cd3d0b6 get_property: Fix testing ALIASED_TARGET target property (#14670)
6a62228 install: Ensure that install(TARGETS) works with no DESTINATION
af3d3b8 export: Only generate and install configuration files if needed.
0de81bb Help: Workaround pygments reporting an error for genexes.
...
2014-01-06 11:15:34 -05:00
Stephen Kelly 0d9cdab93d Help: Add cmake-buildsystem.7 manual
Describe how to define a buildsystem of binary targets, how to
express dependencies between them, how to add build specifications,
how to specify usage requirements, transitive and compatible
propagation and the various pseudo targets.
2014-01-06 10:25:24 -05:00
Stephen Kelly d98ea6c0b8 Help: Mark some code blocks as containing cmake code. 2014-01-04 11:28:57 +01:00
Brad King 6cff2afc8b Merge topic 'export-EXPORT-subcommand'
98b9f52 Help: Document export(EXPORT) in the cmake-packages manual.
a1d2bda Don't copy find_dependency in configure_package_config_file.
f4f6529 Help: cmake-packages: Add missing slash.
cbe7e8f export: Implement EXPORT subcommand (#9822)
2014-01-02 14:44:08 -05:00
Brad King 0d63bdd2d9 Merge topic 'rpath-default'
d25ad48 OS X: Add CMP0042 to enable MACOSX_RPATH by default
2014-01-02 14:23:09 -05:00
Clinton Stimpson d25ad482e9 OS X: Add CMP0042 to enable MACOSX_RPATH by default
Also adding documentation for CMAKE_MACOSX_RPATH, and improving
documentation for MACOSX_RPATH.
2014-01-02 13:41:49 -05:00
Stephen Kelly 98b9f52bc9 Help: Document export(EXPORT) in the cmake-packages manual. 2013-12-24 13:02:49 +01:00
Stephen Kelly a1d2bda23e Don't copy find_dependency in configure_package_config_file.
There is not really any need to. Downstreams can either rely on it
being provided by CMake, or copy and distribute it.

Change the documented include for the find_dependency macro.
2013-12-24 13:02:49 +01:00
Stephen Kelly f4f6529354 Help: cmake-packages: Add missing slash. 2013-12-24 13:02:49 +01:00
Brad King 4372365177 Merge topic 'cmake-packages-manual'
3fe4ac8 Help: Add a CMake manual for Packages related docs.
20cafa2 Split the find_dependency macro into a separate file.
2013-12-20 15:01:26 -05:00
Stephen Kelly 3fe4ac828d Help: Add a CMake manual for Packages related docs. 2013-12-20 19:20:31 +01:00
Stephen Kelly 8f849b9071 Help: Mention if(POLICY) and NO_POLICY_SCOPE in policies manual. 2013-12-20 12:32:43 +01:00
Stephen Kelly 20cafa2e1f Split the find_dependency macro into a separate file.
This allows Config file authors to use it without having to use
CONFIGURE_PACKAGE_CONFIG_FILE.
2013-12-13 16:14:02 +01:00
Brad King 520ead7200 Merge topic 'cleanup-build-commands'
e420124 CMakeDetermineCompilerId: Use CMAKE_VS_(DEVENV|MSBUILD|MSDEV)_COMMAND
0c55729 VS: Add CMAKE_VS_(DEVENV|MSBUILD|MSDEV)_COMMAND variables
2013-12-05 09:24:59 -05:00
Brad King 0c55729c13 VS: Add CMAKE_VS_(DEVENV|MSBUILD|MSDEV)_COMMAND variables
Since commit 5f5c92b9 (VS: Add internal APIs to find MSBuild,
devenv/VCExpress, and msdev, 2013-11-13) the VS generators have
known how to lookup the locations of their build tools directly.
Expose this information to CMake language code by defining new
variables to hold the paths to these tools.
2013-12-04 11:05:05 -05:00
Brad King a6b45087a1 Merge topic 'cmake-toolchains-manual'
c45b5ce Help: Add cmake-toolchains.7 manual
3e3f8b4 Help: Document the CMAKE_FIND_ROOT_PATH* variables.
531c108 Help: Document the CMAKE_TOOLCHAIN_FILE.
2013-12-03 09:45:28 -05:00
Stephen Kelly c45b5ceb66 Help: Add cmake-toolchains.7 manual
Create a manual for toolchain related docs.
2013-12-03 09:44:31 -05:00
Brad King 65fb49ba35 Merge topic 'doc-pdb-not-for-static-libs'
c0897cf Help: Document PDB behavior w.r.t. static libraries explicitly (#14600)
09c05f3 Help: Format PDB_NAME and PDB_OUTPUT_DIRECTORY documentation
cb7b907 Help: Document CMAKE_PDB_OUTPUT_DIRECTORY_<CONFIG> variable
2013-12-02 12:07:50 -05:00
Brad King ea8d1a9cca Merge topic 'INTERFACE_AUTOUIC_OPTIONS'
98093c4 QtAutoUic: Add INTERFACE_AUTOUIC_OPTIONS target property.
02542b4 QtAutoUic: Handle new -include command line parameter.
1242f4e Genex: Add {UPPER,LOWER}_CASE and MAKE_C_IDENTIFIER.
754b321 QtAutogen: Use config without prefix in map key.
2013-12-02 12:07:31 -05:00
Brad King 9d51c764f7 Merge topic 'export-includes'
5838aba Export: Report error on relative include with genex.
7a3e45b Export: Prefix relative items with genexes in INSTALL_INTERFACE.
f088a32 Export: Process INSTALL_INTERFACE in INCLUDES DESTINATION.
9eedc85 Export: Process relative includes after genex evaluation.
80790f3 Export: Test existing behavior of exporting includes with genexes.
38afc82 target_include_directories: Allow relative path with genex
2013-12-02 12:06:43 -05:00
Brad King 9c56366250 Merge topic 'KateProjectGenerator2'
b54c336 kate: add some documentation
9414217 kate: insert build targets
644e012 kate: add project generator for the Kate project plugin
2013-12-02 12:06:27 -05:00
Brad King cb7b90726c Help: Document CMAKE_PDB_OUTPUT_DIRECTORY_<CONFIG> variable 2013-12-02 11:11:07 -05:00
Stephen Kelly 98093c45db QtAutoUic: Add INTERFACE_AUTOUIC_OPTIONS target property.
Transitively consume the property from linked dependents.

Implement configuration-specific support by following the pattern
set out for compile definitions and includes in cmQtAutoGenerators.

Implement support for origin-tracking with CMAKE_DEBUG_TARGET_PROPERTIES.

This is motivated by the needs of KDE, which provides a separate
translation system based on gettext instead of the Qt linguist
translation system. The Qt uic tool provides command line options
for configuring the method used to translate text, and to add an
include directive to the generated file to provide the method.

 http://thread.gmane.org/gmane.comp.kde.devel.frameworks/7930/focus=7992

Implement the interface to provide the uic options as a usage-requirement
on the KI18n target, as designed for KDE.
2013-11-27 19:06:12 +01:00
Stephen Kelly 1242f4e569 Genex: Add {UPPER,LOWER}_CASE and MAKE_C_IDENTIFIER. 2013-11-27 19:06:12 +01:00
Stephen Kelly 3e3f8b456f Help: Document the CMAKE_FIND_ROOT_PATH* variables.
Add a replacement template for the variables, and link to them from
the documentation for the find_* commands.
2013-11-27 13:21:12 +01:00
Stephen Kelly 531c108da1 Help: Document the CMAKE_TOOLCHAIN_FILE.
Link to the new docs from existing references to the variable.
2013-11-27 13:21:12 +01:00
Brad King b80ef72b4d Merge topic 'ninja-compile-link-pool'
7605e37 Ninja: job pool support for compiling and linking
2013-11-26 09:52:35 -05:00
Brad King fd2ffb42aa Merge topic 'minor-cleanups'
ebeb31d Help: Fix typo in CMP0040 docs.
97b0abb Help: Fix typo in genex docs.
2013-11-26 09:48:21 -05:00
Stephen Kelly 5838aba1aa Export: Report error on relative include with genex.
Diagnostics which check the sanity of exported include paths
previously skipped over any path containing a generator expression.

Introduce a policy to issue an error message in such cases.

The export files created in the OLD behavior are not usable, because
they contain relative paths or paths to the source or build location
which are not suitable for use on installation. CMake will report an
error on import.
2013-11-26 13:01:55 +01:00
Stephen Kelly 97b0abb423 Help: Fix typo in genex docs.
would be require -> would require
2013-11-26 12:10:25 +01:00
Stephen Kelly 1320e0768e cmQtAutogen: Allow specifying depends for autogen targets.
Test this by generating files with a custom target, which moc
requires to be present when it is run.
2013-11-25 22:41:21 +01:00
Peter Kümmel 7605e37aab Ninja: job pool support for compiling and linking
Could be tested by setting the environment
variable NINJA_STATUS=[%r]
2013-11-25 22:23:24 +01:00
Alex Neundorf b54c336e46 kate: add some documentation
Alex
2013-11-25 10:48:39 -05:00
Brad King beec9dbc53 Help: Organize and revise the cmake-generators.7 manual
Move "extra" generators to their own section instead of duplicating them
for each corresponding main generator.  Divide the list of main
generators into command-line and IDE sections and sort the names within
each section.  Document the environment from which each kind of
generator may be used.

Add a section to each "extra" generator documenting which main
generators may be used with it.
2013-11-25 10:17:18 -05:00
Brad King 45a03aa654 Help: Document $ENV{VAR} syntax in cmake-language.7 manual 2013-11-25 08:55:28 -05:00
Brad King 3013a11826 Merge topic 'cross-compiling-toolchain-variables'
7521da2 Introduce CMAKE_STAGING_PREFIX variable.
2013-11-22 08:40:50 -05:00
Stephen Kelly 8e729df0fc Help: Reformat cmake-generator-expressions.7 manual
Use definition lists instead of a preformatted block to enumerate
the genex documentation.

Consistently capitalize the description.

Use ``...`` to format genex parameters in the description.

Turn references to commands into links.

Add high level documentation about the motivation for generator
expressions.

Regroup expressions into subsections for different genex types. Add
a high-level description and example of the expressions in each
section.

Explode the documentation for filesystem artifacts, instead of only
referring to the variations.
2013-11-21 15:20:46 -05:00
Brad King d46dfd32c6 Merge topic 'missing-target-error'
a02f3d2 Add policy CMP0040 to disallow custom commands on missing targets
2013-11-21 09:39:39 -05:00
Brad King 26bed2ac57 Merge topic 'find_backtrace'
c6f339c Add FindBacktrace.cmake module.
2013-11-21 09:38:56 -05:00
Nils Gladitz a02f3d2de0 Add policy CMP0040 to disallow custom commands on missing targets 2013-11-21 09:24:08 -05:00
Stephen Kelly 7521da2852 Introduce CMAKE_STAGING_PREFIX variable.
This variable can be useful in cross-compiling contexts where the
sysroot is read-only or where the sysroot should otherwise remain
pristine.

If the new CMAKE_STAGING_PREFIX variable is set, it is used instead
of CMAKE_INSTALL_PREFIX when generating the installation rules in
cmake_install.cmake.

This way, the CMAKE_INSTALL_PREFIX variable
always refers to the installation prefix on the target device, regardless
of whether host==target.

If any -rpath paths passed to the linker contain the CMAKE_STAGING_PREFIX,
the matching path fragments are replaced with the CMAKE_INSTALL_PREFIX.
Matching paths in the -rpath-link are not transformed.

The cross-prefix usr-move workaround is assumed not to require extension
regarding CMAKE_STAGING_PREFIX. The staging area is a single prefix, so
there is no scope for cross-prefix symlinks. The CMAKE_INSTALL_PREFIX
is still used to determine the workaround path, and that variable
remains the relevant one even if CMAKE_STAGING_PREFIX is used. If the
generated export files are deployed to the target, the workaround
will still be in place, and still be employed if required.
2013-11-21 11:48:03 +01:00
Brad King 7df3a10a5e Merge topic 'dev/better-eclipse-language-support'
a990722 eclipse: Support custom natures via a global property
51726cc eclipse: Add natures for Eclipse based on enabled languages
4a352d4 Notify extra generators about languages
2013-11-20 09:08:34 -05:00
Brad King 46ec48c93d Merge topic 'cross-compiling-toolchain-variables'
7cd65c9 Add CMAKE_SYSROOT variable to set --sysroot when cross compiling.
5096967 Allow toolchain files to specify an external toolchain.
76552d5 Add compiler target compile options.
f41ecd1 CMakeDetermineCompilerId: Look for internal file only on host
2013-11-19 12:41:57 -05:00
Stephen Kelly 7cd65c97fa Add CMAKE_SYSROOT variable to set --sysroot when cross compiling.
As CMAKE_ROOT_FIND_PATH can be a list, a new CMAKE_SYSROOT is
introduced, which is never a list.

The contents of this variable is passed to supporting compilers
as --sysroot. It is also accounted for when processing implicit
link directories reported by the compiler, and when generating
RPATH information.
2013-11-19 12:39:39 -05:00
Stephen Kelly 5096967ecd Allow toolchain files to specify an external toolchain.
Clang can compile code, but uses the gcc tools for other tasks such
as linking. The -gcc-toolchain option can be used for that, but
generalize so that other compilers can be treated the same.

If such a location is specified, use it as a hint for finding
the binutils executables.
2013-11-19 12:39:34 -05:00
Stephen Kelly 76552d595d Add compiler target compile options.
For clang, this allows passing -target <triple> to the compiler, and
for qcc, -V<arch> using toolchain files containing something like

 set(triple arm-linux-gnueabihf)
 set(CMAKE_C_COMPILER "/usr/bin/clang")
 set(CMAKE_C_COMPILER_TARGET ${triple})
 set(CMAKE_CXX_COMPILER "/usr/bin/clang++")
 set(CMAKE_CXX_COMPILER_TARGET ${triple})

or

 set(arch gcc_ntoarmv7le)
 set(CMAKE_C_COMPILER /opt/qnx650/host/linux/x86/usr/bin/qcc)
 set(CMAKE_C_COMPILER_TARGET ${arch})
 set(CMAKE_CXX_COMPILER /opt/qnx650/host/linux/x86/usr/bin/QCC)
 set(CMAKE_CXX_COMPILER_TARGET ${arch})

Both clang and qcc are inherently cross compiler( driver)s.

When cross-compiling with clang, use the CMAKE_${lang}_COMPILER_TARGET
as the _CMAKE_TOOLCHAIN_PREFIX to find the appropriate binutils.

When cross-compiling with QNX qcc, use the CMAKE_${lang}_COMPILER_TARGET
to set the appropriate _CMAKE_TOOLCHAIN_PREFIX.
2013-11-19 12:38:53 -05:00
Ben Boeckel a990722b5a eclipse: Support custom natures via a global property
This is useful for enabling natures not recognized by the Eclipse
generator directly in a project.
2013-11-19 11:48:19 -05:00