Commit Graph

420 Commits

Author SHA1 Message Date
Marc Chevrier
768225837d list: Add SUBLIST sub-command
Issue: #17823
2018-03-21 12:54:53 -04:00
Brad King
d41abae70f Merge topic 'list-join'
a58158727b list(): add `JOIN` sub-command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1846
2018-03-20 09:40:40 -04:00
Marc Chevrier
a58158727b list(): add JOIN sub-command 2018-03-20 14:28:17 +01:00
Brad King
882ba7fd11 Merge topic 'doc-set_target_properties-clarify'
89ee7ce3ea Help: Reference set_property from set_target_properties
c27e3e0f2b Help: Clarify that set_target_properties supports multiple targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1866
2018-03-19 11:18:31 -04:00
Brad King
180a36e243 Merge topic 'find-package_root-restore'
eb35d8884b find_package: Use PackageName_ROOT variables as search prefixes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1858
2018-03-19 08:30:05 -04:00
Brad King
cded54f48d Merge topic 'doc-list-command'
81226c73a4 Help: refresh list() command documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1860
2018-03-19 08:28:51 -04:00
Brad King
89ee7ce3ea Help: Reference set_property from set_target_properties 2018-03-19 08:05:29 -04:00
Brad King
c27e3e0f2b Help: Clarify that set_target_properties supports multiple targets
Reported-by: Alan W. Irwin <irwin@beluga.phys.uvic.ca>
2018-03-19 07:44:42 -04:00
Craig Scott
80784ef77f Merge topic 'project-homepage-url'
73f9b2974c project: Add HOMEPAGE_URL named parameter
fd28c382b4 project: Add <PROJECT-NAME>_DESCRIPTION
9b57cb62ea Help: Fix minor typo in docs for CMAKE_PROJECT_DESCRIPTION
c89993d529 Tests: Avoid enabling languages unnecessarily in RunCMake.project

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1816
2018-03-17 18:24:44 -04:00
Alex Turbov
73f9b2974c project: Add HOMEPAGE_URL named parameter
This sets variables like PROJECT_HOMEPAGE_URL, which can be
used as default values for various things (packaging modules,
doxygen defaults, etc.). Some packaging modules have been
updated to do this as part of this commit.

Co-Author: Craig Scott <craig.scott@crascit.com>
2018-03-17 08:25:48 +11:00
Craig Scott
fd28c382b4 project: Add <PROJECT-NAME>_DESCRIPTION
For consistency with the VERSION keyword, also define the
<PROJECT-NAME>_DESCRIPTION variable.
2018-03-17 08:25:48 +11:00
Marc Chevrier
81226c73a4 Help: refresh list() command documentation
Reformat `list` command documentation be consistent with the `string`
command.
2018-03-16 15:28:14 +01:00
Brad King
eb35d8884b find_package: Use PackageName_ROOT variables as search prefixes
This feature was originally added by commit v3.9.0-rc1~71^2~2 (find_*:
Add a new PackageRoot search path group, 2017-05-03) and documented by
commit v3.9.0-rc1~71^2 (find_*: Add docs for PackageRoot search path
group, 2017-05-03).  However, we had to disable the feature and remove
the documentation in commit v3.9.1~2^2 (find_*: Disable the PACKAGE_ROOT
search path group for CMake 3.9, 2017-08-08) due to breaking projects
that used `PackageName_ROOT` variables themselves.

Add policy `CMP0074` to restore the `PackageName_ROOT` variable behavior
in a compatible way.  Also revise the stack of root paths to store the
paths themselves rather than the package names.  This way the policy can
be considered at the `find_package` call site instead of individual
`find_` calls inside a find module.

Co-Author: Chuck Atkins <chuck.atkins@kitware.com>
Issue: #17144
2018-03-16 09:19:28 -04:00
Brad King
2ab900c71b Merge topic 'compile-options-shell'
ce0b983216 target_compile_options: Add syntax to specify shell strings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1841
2018-03-15 07:55:14 -04:00
Brad King
ce0b983216 target_compile_options: Add syntax to specify shell strings
Options specified via `COMPILE_OPTIONS` and `INTERFACE_COMPILE_OPTIONS`
are deduplicated, but individual options can legitimately be duplicated
when grouped with other options, e.g.

    -D A -D B

After deduplication that becomes `-D A B`.  Therefore we need a way to
treat groups of options as units during deduplication.  A simple approach
is to specify each group as one option, e.g.

    "-D A" "-D B"

However, that conflicts with options that legitimately have spaces.  To
break this ambiguity, add a `SHELL:` prefix syntax to specify that an
option should be parsed like shell command line arguments after
deduplication, e.g.

    "SHELL:-D A" "SHELL:-D B"

These will survive deduplication intact, and then be parsed to produce
`-D A -D B` on the final command line.

Fixes: #15826
2018-03-14 11:10:25 -04:00
Craig Scott
6a2a9d107d Help: Fix incorrect CMAKE_PROJECT_xxx docs
The docs for CMAKE_PROJECT_NAME and CMAKE_PROJECT_DESCRIPTION
were erroneously documenting the behavior of PROJECT_NAME and
PROJECT_DESCRIPTION respectively. Fix these and update the
project() docs to also mention CMAKE_PROJECT_NAME and
CMAKE_PROJECT_DESCRIPTION.

Fixes: #17815
2018-03-14 07:33:38 +11:00
Brad King
bafe655b11 Help: Document linking behavior of OBJECT libraries
Inspired-by: Deniz Bahadir <dbahadir@benocs.com>
Issue: #14778
2018-03-01 09:27:50 -05:00
Brad King
61f92e69c0 Merge topic 'object-library-export-as-interface'
ea0ce73a19 install,export: Maybe transform OBJECT libraries to INTERFACE libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1811
2018-03-01 07:54:20 -05:00
Brad King
ea0ce73a19 install,export: Maybe transform OBJECT libraries to INTERFACE libraries
Teach the `install` and `export` commands to support installing and
exporting `OBJECT` libraries without their object files.  Transform
them to `INTERFACE` libraries in such cases.

For `install(TARGETS)`, activate this when no destination for the object
files is specified.  For `export`, activate this only under Xcode with
multiple architectures when we have no well-defined object file
locations to give to clients.
2018-02-28 10:58:10 -05:00
Brad King
846a4dd118 Merge topic 'string-join'
689eeb67 string: Add JOIN subcommand

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Pavel Solodovnikov <hellyeahdominate@gmail.com>
Merge-request: !1762
2018-02-20 11:47:51 -05:00
Alex Turbov
689eeb67cb string: Add JOIN subcommand
This is just like CONCAT but accepts a glue string to put between
each value.  `JOIN ""` is equivalent to `CONCAT`.
2018-02-16 10:04:47 -05:00
Shane Parris
602988e1e5 Adds file(TOUCH) and file(TOUCH_NOCREATE) sub-commands 2018-02-15 10:54:18 -05:00
Craig Scott
a71ab3be0e Help: Expand string(MAKE_C_IDENTIFIER) docs
The MAKE_C_IDENTIFIER subcommand was also buried in the docs for the
TIMESTAMP subcommand, so it has been pulled out to its own subheading.
2018-02-11 21:04:26 +11:00
Kai Wolf
b95eda9b11 Help: Fix code example in cmake_parse_arguments.rst 2018-02-04 08:41:03 +01:00
Robert Maynard
7771657cd0 Help: Better explain that foreach(RANGE ) is inclusive. 2018-01-29 10:52:14 -05:00
Christoph Ruediger
60216e158f Help: Improved MAIN_DEPENDENCY documentation of add_custom_command() 2018-01-16 15:10:26 +01:00
Kyle Edwards
f09fda97d8 Help: improve install() documentation of argument ordering
Fixes #16362.
2018-01-08 15:07:30 -05:00
Brad King
f4a3143940 Merge topic 'execute_process_UTF8_keyword'
8caec41e execute_process: Allow UTF-8 as a synonym for the UTF8 keyword

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !1623
2018-01-08 10:44:47 -05:00
Luz Paz
3ab7bf8285 Various typo fixes
Some are user-facing. Others are source comments.
2018-01-04 06:52:01 +11:00
Craig Scott
8caec41e6e execute_process: Allow UTF-8 as a synonym for the UTF8 keyword
UTF-8 is the proper naming according to the UTF-8 RFC and is also the
name used for a similar keyword in the file() command. This commit
brings (backward compatible) consistency to the keyword names and allows
the standard UTF-8 name to be used with execute_process(). The old UTF8
keyword is still supported.
2017-12-27 21:56:00 +11:00
Brad King
6ecd8b601b Help: Document that ASM should be enabled last
ASM should be enabled after C and/or CXX because we consider the
compilers for those languages as possible assemblers.

Issue: #17532
2017-12-06 06:48:06 -05:00
Ben Boeckel
4c40ab261c add_library: mention that Xcode requires a real source file
The docs mentioned that it happened, but not when. Mention Xcode since
it is the culprit today.

See #16524.
2017-12-01 10:37:15 -05:00
luzpaz
777e87ae00 Fix trivial typos in text
Some are user facing.

Found using

    codespell -q 3 --skip="./Utilities" -I .cmake-whitelist.txt`

whereby the whitelist contained:

    ans
    dum
    helpfull
    emmited
    emmitted
    buil
    iff
    isnt
    nto
    ot
    pathes
    substract
    te
    todays
    upto
    whitespaces
2017-11-03 10:25:05 -04:00
Craig Scott
1fc31f2f43 Merge topic 'cross_link_CheckLanguage_enable_language'
e2601534 Help: enable_language now documents the CheckLanguage module

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1434
2017-11-02 16:32:05 -04:00
Robert Maynard
e26015347a Help: enable_language now documents the CheckLanguage module
Resolves #17409
2017-10-31 19:15:49 -04:00
Deniz Bahadir
494906a8a2 Add support for IMPORTED GLOBAL targets to be aliased
Issue: #15569
Issue: #17197
2017-10-26 09:11:04 -04:00
Deniz Bahadir
fe4b25ec2f Teach target_* commands to set INTERFACE properties of IMPORTED targets
Now, several `INTERFACE_*` properties can be set on `IMPORTED` targets,
not only via `set_property` and `set_target_properties` but also via
`target_compile_definitions`, `target_compile_features`,
`target_compile_options`, `target_include_directories`, `target_sources`
and `target_link_libraries`.

Fixes: #15689
Issue: #17197
2017-10-26 09:11:04 -04:00
Brad King
b5dd256d94 Merge topic 'defer-target-source-check'
4e7f6738 Defer check for sources within a target until generation.
6e4e7c65 Tests: Exclude bad RunCMake.add_executable case on multi-arch Xcode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1242
2017-10-25 08:11:19 -04:00
Brad King
4edcf4f169 Merge topic 'help_parse_arguments'
546a3289 Help: Fix cmake_parse_arguments behavior for not found arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1397
2017-10-24 08:47:59 -04:00
Deniz Bahadir
4e7f67383f Defer check for sources within a target until generation.
The `add_library` and `add_executable` commands can now be called with
no source-files and won't generate a warning or error message, as long
as source-files will be added later via the `target_sources` command.
If during the generation step still no sources are associated with
targets created by such calls a useful error message will be generated
and generation fails.

Targets of type `INTERFACE_LIBRARY`, `UTILITY` or `GLOBAL_TARGET` are
excluded from this check because we do not need sources for these target
types during generation.

Fixes: #16872
2017-10-24 08:14:47 -04:00
Sylvain Joubert
546a328978 Help: Fix cmake_parse_arguments behavior for not found arguments
Value keywords are actually UNDEFINED rather than set to the empty
string when they are not found in the argument list.
2017-10-20 09:05:13 +02:00
Shane Parris
5d67e9025d file(DOWNLOAD|UPLOAD): Add 'NETRC' and 'NETRC_FILE' suboption 2017-10-18 15:21:42 -04:00
Brad King
28adf3833c Merge topic 'vs_improve_custom_command'
9ed24280 VS: only add custom command line if it is not empty
34c4108b add HasOnlyEmptyCommandLines() method to cmCustomCommandGenerator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1050
2017-09-11 07:53:18 -04:00
Bernhard M. Wiedemann
014ad2989c Timestamp: support %A and %B
These are defined both by [1] and [2] to give full names of a weekday
and month.

[1] http://pubs.opengroup.org/onlinepubs/009695399/functions/strftime.html
[2] https://msdn.microsoft.com/de-de/library/fe06s4ak.aspx
2017-09-07 13:36:11 -04:00
Michael Stürmer
9ed2428078 VS: only add custom command line if it is not empty 2017-09-04 11:42:35 +02:00
Sylvain Joubert
b9ed29b7cb Help: Fix formatting typo for the 'if' command 2017-08-18 09:43:40 +02:00
Sylvain Joubert
d8ecc25457 Add PREPEND sub-command to string command 2017-08-11 13:26:33 +02:00
Brad King
f4e66b41d8 Merge topic 'find-package_root-disable'
578d95f8 find_*: Disable the PACKAGE_ROOT search path group for CMake 3.9

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1116
2017-08-10 09:22:02 -04:00
Brad King
578d95f87d find_*: Disable the PACKAGE_ROOT search path group for CMake 3.9
Disable the feature added by commit v3.9.0-rc1~71^2~2 (find_*: Add a new
PackageRoot search path group, 2017-05-03) and remove documentation
added by commit v3.9.0-rc1~71^2 (find_*: Add docs for PackageRoot search
path group, 2017-05-03).  Unfortunately the name `<pkg>_ROOT` may
already be set by projects for their own incompatible purposes.  Disable
the behavior change for now to fix the regression for CMake 3.9.  We can
restore it later with a policy.

In order to keep the implementation and tests working, add an
undocumented variable we can use in the tests to enable the behavior
before the policy is introduced.

Fixes: #17144
2017-08-08 11:52:28 -04:00
Brad King
b745cb3e55 Merge topic 'file_WRITE_docs'
d7472bbf file: Clarify directory creation behavior when using WRITE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1088
2017-08-04 09:16:46 -04:00