Commit Graph

1237 Commits

Author SHA1 Message Date
Craig Scott
1046a61cfd
Help: clean up and clarify block() and return() 2022-11-08 00:05:55 +11:00
Brad King
63d28469cd Merge topic 'doc-cli-xrefs' into release-3.25
3043c17039 Help: Add more CLI `:option:` references to various pages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7811
2022-10-21 10:19:53 -04:00
Alex Turbov
3043c17039 Help: Add more CLI :option: references to various pages 2022-10-20 11:21:40 -04:00
Alex Turbov
65dc8aa8b3 Help: Mention CMake version for a recently-added find_package search path
Add a `versionadded` mark for the search path added by commit e55c154c5b
(cmFindPackageCommand: Add one more search path, 2022-06-27,
v3.25.0-rc1~339^2~1).

Fixes: #24067
2022-10-20 11:17:46 -04:00
Alex Turbov
93871cb5a9 Help: Reformat find_package search paths as Sphinx tables 2022-10-20 11:17:46 -04:00
Brad King
4cb8564087 Merge topic 'doc-timestamp-f' into release-3.25
7d25ae7350 Help: Add versionadded for string(TIMESTAMP) %f specifier

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7796
2022-10-17 10:00:57 -04:00
Brad King
7d25ae7350 Help: Add versionadded for string(TIMESTAMP) %f specifier
This was accidentally left out of commit c050d6a01e (string(TIMESTAMP):
add %f specifier for microseconds, 2022-01-27, v3.23.0-rc1~59^2).
2022-10-14 11:28:38 -04:00
Brad King
f9fd27a5ee Help: Fix typo that crashes older pygments lexers
In commit cb14ae2b87 (try_compile: Add SOURCE_FROM_{ARG,VAR},
2022-09-21, v3.25.0-rc1~94^2~2) we accidentally added unbalanced closing
`]` characters in the `try_compile` and `try_run` signatures.

Fixes: #24053
2022-10-13 12:04:00 -04:00
Craig Scott
f8b3b24915
Help: Minor grammar, typo and formatting cleanups 2022-10-09 13:34:05 +11:00
Brad King
b768a5e23b Help: Disambiguate cmake(1) program modes in Sphinx option references
Define the entry point to each mode as an option for the `cmake`
program, but reference the options for that mode as part of stand-in
`cmake-<mode>` programs.
2022-10-05 15:27:40 -04:00
Brad King
5e53164acf Merge topic 'improve-try_compile-debug-documentation'
3801785cc3 Help: Improve try_compile debug documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: alcroito <alexandru.croitor@qt.io>
Merge-request: !7735
2022-10-04 10:28:32 -04:00
Brad King
6755539fca Merge topic 'fix-try_compile-doc-typo'
ef05a56387 Help: Fix typo in try_compile documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7736
2022-10-04 10:27:40 -04:00
Matthew Woehlke
3801785cc3 Help: Improve try_compile debug documentation
Update the --debug-trycompile documentation to account for recent
changes to try_compile. Mention where in the build tree to find
artifacts when using said option.
2022-10-03 11:44:58 -04:00
Matthew Woehlke
ef05a56387 Help: Fix typo in try_compile documentation 2022-09-30 15:49:35 -04:00
Matthew Woehlke
0f28653ba9 try_compile: Rename SOURCE_FROM_ARG -> SOURCE_FROM_CONTENT
Change the SOURCE_FROM_ARG keyword to try_compile to SOURCE_FROM_CONTENT
(which we can do because it was recently added and hasn't been in a
release yet). The new name should be clearer as to what it does, and
also more consistent with the CONTENT arguments to some other commands.

Also, fix a typo in an error message.
2022-09-30 14:50:25 -04:00
Matthew Woehlke
09b3051524 try_compile: Add NO_CACHE option (also try_run)
Add NO_CACHE option to try_compile and try_run, which places the results
in regular, rather than cache, variables.

Issue: #22799
2022-09-28 13:41:11 -04:00
Brad King
164a156c7c Merge topic 'remove-vs10-generator'
8d6f015d59 Drop Visual Studio 10 2010 generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7718
2022-09-27 10:32:11 -04:00
Brad King
50b668ddc8 Merge topic 'add_subdirectory_system'
2eb30a7036 add_subdirectory: Add SYSTEM option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7399
2022-09-27 10:28:49 -04:00
Brad King
8d6f015d59 Drop Visual Studio 10 2010 generator
This generator has been deprecated since CMake 3.22.  Remove it.
2022-09-26 15:43:04 -04:00
Da Quexian
2eb30a7036 add_subdirectory: Add SYSTEM option
Fixes: #22401
Signed-off-by: Da Quexian <daquexian566@gmail.com>
2022-09-26 10:56:54 -04:00
Brad King
98aef0929f Merge topic 'try_compile-source-from'
611d801790 try_compile: Add SOURCE_FROM_FILE
a04eaf6742 Tests: Clean up and simplify TryCompile tests
cb14ae2b87 try_compile: Add SOURCE_FROM_{ARG,VAR}

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7700
2022-09-23 08:52:13 -04:00
Matthew Woehlke
611d801790 try_compile: Add SOURCE_FROM_FILE
Add ability to copy try_compile (and try_run) source files from
arbitrary locations into the operation directory. This is included for
the sake of completion and consolidation, although use cases which
actually require this may be rare.
2022-09-22 14:56:50 -04:00
Matthew Woehlke
cb14ae2b87 try_compile: Add SOURCE_FROM_{ARG,VAR}
Add ability to "feed" try_compile (and try_run) sources more directly,
either from literal content, or from a CMake variable which contains
literal content. This saves the user from needing a separate step to
write the content to a file, and allows for the sources to only exist in
the scratch directory.
2022-09-22 13:33:27 -04:00
Hinell
37381506dc Help: Link from add_custom_target to policy on BYPRODUCTS
Link policy explaining BYPRODUCTS.

Apply the change from commit 00b788e85e (Help:custom_command: link
policy on BYPRODUCTS, 2022-09-09) to `add_custom_target` docs too.

Issue: #23786
2022-09-19 12:39:29 -04:00
Brad King
71cfcbe816 Merge topic 'transitive-usage-reqs-lnks'
3d31f99b74 Help: Link from usage requirement commands to detailed explanation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7653
2022-09-19 10:24:15 -04:00
Brad King
e9d9cd348c Merge topic 'help-add-custom-comman-byproducts'
00b788e85e Help:custom_command: link policy on BYPRODUCTS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7662
2022-09-19 10:23:02 -04:00
Hinell
3d31f99b74 Help: Link from usage requirement commands to detailed explanation
Augment vague mentions of "Transitive Usage Requirements" with links to
a detailed explanation.

Fixes: #23799
2022-09-16 10:54:27 -04:00
Hinell
00b788e85e Help:custom_command: link policy on BYPRODUCTS
Link policy explaining BYPRODUCTS.

Fixes: #23786
2022-09-16 10:50:46 -04:00
Matthew Woehlke
56ae40cc59 try_compile: Add PROJECT keyword-dispatched signature
Introduce a new signature for the project flavor of try_compile (and
try_run) which removes the `bindir` argument and adds a required PROJECT
tag. This is similar to the SOURCES flavor added by commit aa9220d3
(try_compile: Add keyword-dispatched signature, 2022-09-02).
2022-09-14 16:35:50 -04:00
Glen Chung
0e96a20478 MSVC: Add abstraction for debug information format
Replace our hard-coded default for `/Zi` with a first-class abstraction
to select the debug information format an enumeration of logical
names.  We've long hesitated to do this because the idea of "debug
information format" touches on related concepts on several platforms.
Avoid that scope creep by simply defining an abstraction that applies
only when targeting the MSVC ABI on Windows.

Removing the old default flag requires a policy because existing
projects may rely on string processing to edit them and choose a
runtime library under the old behavior.  Add policy CMP0141 to
provide compatibility.

Fixes: #10189
2022-09-14 09:12:47 -04:00
Brad King
ecfc63a9b0 Merge topic 'try_compile-unique-bindir'
aa9220d3a0 try_compile: Add keyword-dispatched signature
d1befe5515 cmSystemTools: Add MakeTempDirectory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Matthew Woehlke <matthew.woehlke@kitware.com>
Merge-request: !7579
2022-09-07 10:43:14 -04:00
Matthew Woehlke
aa9220d3a0 try_compile: Add keyword-dispatched signature
Introduce a new signature for try_compile (and try_run) which removes
the `bindir` argument and requires the SOURCES tag. This will eventually
allow us to add other ways of providing sources, but also allows us to
change the behavior without breaking compatibility.

The old signature uses a special, but non-unique temporary location
inside the specified `bindir`, which conventionally is just the
project's build directory. The new signature unconditionally uses the a
unique temporary directory which is unconditionally within the project's
build directory (which is no longer separately specified). This ensures
that successive runs do not overwrite previous runs, will simplify
debugging, and should also, eventually, allow us to execute multiple
trials in parallel.
2022-09-05 13:19:59 -04:00
Marc Chevrier
838a5fae23 return(): Propagate variables to result scope
Fixes: #23871
2022-09-03 23:10:01 +02:00
Brad King
b9371c0477 Merge topic 'CMAKE_FIND_USE_INSTALL_PREFIX-support-staging-prefix'
0fc10bb19b CMAKE_FIND_USE_INSTALL_PREFIX considers CMAKE_STAGING_PREFIX
43d31c5198 cmFindBase: Refactor CMAKE_FIND_USE_INSTALL_PREFIX handling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7623
2022-08-31 09:39:52 -04:00
Brad King
aa7316a358 Merge topic 'doc-CMP0134-fixes'
7dca3807f8 Help: Fix typos, grammar and formatting in CMP0134 policy docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7620
2022-08-31 09:37:46 -04:00
Robert Maynard
0fc10bb19b CMAKE_FIND_USE_INSTALL_PREFIX considers CMAKE_STAGING_PREFIX
Fixes #23900
2022-08-30 17:52:40 -04:00
Craig Scott
7dca3807f8 Help: Fix typos, grammar and formatting in CMP0134 policy docs 2022-08-30 15:11:09 -04:00
Craig Scott
bbda95e7bd Merge topic 'file-DOWNLOAD-existing-file-matched-message'
666b3c6f13 Help: Clarify file(DOWNLOAD) behavior for existing file with same hash
87a40b720a file(DOWNLOAD): Fix message for existing file with matching hash

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7599
2022-08-26 06:53:46 -04:00
Michael Hirsch
666b3c6f13
Help: Clarify file(DOWNLOAD) behavior for existing file with same hash 2022-08-23 22:42:06 +10:00
Marc Chevrier
44a2f3f332 Add new flow-control commands for variables and policies scopes management
Add block() and endblock() commands offering the capability to create
new scopes for variables and/or policies.

Fixes: #20171
2022-08-22 16:25:53 +02:00
Craig Scott
fadc93286a
Help: Add crossrefs to ctest output control options 2022-08-19 14:47:01 +10:00
Craig Scott
de892f3d4e
Help: Add crossrefs to ctest output control options 2022-08-19 14:45:36 +10:00
Craig Scott
3453e6bd48
Merge branch 'backport-3.24-doc-ctest_test-output-control' into doc-ctest_test-output-control 2022-08-19 14:30:50 +10:00
Craig Scott
8981e88b18
Help: Add missing closing quote on C++ example 2022-08-19 14:03:18 +10:00
Brad King
5d76ff6019 Help: Fix formatting of CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API notes 2022-08-09 13:05:34 -04:00
Brad King
ed86192cd8 Merge topic 'doc-markup-program-options'
a6abdf6c8f Help: Consistent options declaration -- short first, then long
f4563f05db Help: Value for `--graphviz=` option actually is mandatory
04843d743e Help: Replace a bunch of more ``--option`` to `:option:` role
09446266ee Help: Replace mentions of ``-D`` option with :option:`-D` role
b57f27b087 Help: Replace mentions of ``-T`` and ``-A`` options with role
d25b232dee Help: Replace mentions of ``-G`` option with :option:`-G` role
63940e1cab Help: Replace mentions of ``-C`` option with :option:`-C` role
183a49cbfe Help: Replace mentions of ``-S`` option with :option:`-S` role
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7544
2022-08-08 09:39:41 -04:00
Brad King
9274bdff27 Merge topic 'find_package-one-more-path'
19366408fe cmFindPackageCommand: Protect overrides of `cmDirectoryListGenerator`
e55c154c5b cmFindPackageCommand: Add one more search path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7542
2022-08-05 08:53:09 -04:00
Alex Turbov
04843d743e Help: Replace a bunch of more `--option to :option:` role 2022-08-04 19:34:45 +04:00
Alex Turbov
183a49cbfe Help: Replace mentions of `-S option with :option:-S` role 2022-08-04 19:33:42 +04:00
Alex Turbov
e55c154c5b cmFindPackageCommand: Add one more search path
The `PREFIX/(Foo|foo|FOO).*/(cmake|CMake)/(Foo|foo|FOO).*/` search
path is the similar to the one already exists
`PREFIX/(Foo|foo|FOO).*/(lib/ARCH|lib*|share)/cmake/(Foo|foo|FOO).*/`.
2022-08-04 09:41:59 -04:00