Commit Graph

1223 Commits

Author SHA1 Message Date
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
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
Brad King
2ed7d6cee7 Merge topic 'doc-find_package-typo'
5635d33656 Help: Fix reST syntax typo in find_package docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7540
2022-08-04 09:33:50 -04:00
Eisuke Kawashima
5635d33656 Help: Fix reST syntax typo in find_package docs 2022-08-03 10:02:21 -04:00
Brad King
41597025f9 Merge topic 'doc-if-PATH_EQUAL'
37e01773e4 Help: Clarify behavior of path-based equality conditions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7503
2022-07-26 09:22:29 -04:00
Brad King
d4336c9c99 Merge topic 'doc-if-PATH_EQUAL' into release-3.24
37e01773e4 Help: Clarify behavior of path-based equality conditions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7503
2022-07-26 09:22:28 -04:00
Brad King
1cde77e526 Merge topic 'doc-find_package-BYPASS_PROVIDER'
4f7a0c25d2 Help: Document BYPASS_PROVIDER keyword for find_package()
76370e06b8 Help: Minor grammar fix for the Using Dependencies manual

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7501
2022-07-25 12:02:20 -04:00
Craig Scott
37e01773e4 Help: Clarify behavior of path-based equality conditions
The docs for if(PATH_EQUAL) did not mention the component-wise
nature of the checks. It also claimed no normalization was
performed, but multiple separators are effectively collapsed
(part of normalization). Improve the wording to clarify both of
these points.

Also update the corresponding description of cmake_path(COMPARE),
which had the same inaccuracy.

Fixes: #23758
2022-07-24 16:03:20 +10:00
Craig Scott
4f7a0c25d2 Help: Document BYPASS_PROVIDER keyword for find_package()
Fixes: #23669
2022-07-23 21:43:49 +10:00
Brad King
66998035c1 Merge topic 'try_run_split_output'
a2cd0687db try_run: Add RUN_OUTPUT_STDOUT_VARIABLE and RUN_OUTPUT_STDERR_VARIABLE.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7453
2022-07-22 10:14:34 -04:00
Brad King
4ea33b41d7 Merge topic 'doc-execute_process'
70c26a65b7 Help: Clarify execute_process OS-specific command-line encoding

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7492
2022-07-20 12:39:44 -04:00
Brad King
70c26a65b7 Help: Clarify execute_process OS-specific command-line encoding
Issue: #23557
2022-07-20 11:46:23 -04:00
Brad King
12192e7f94 Merge topic 'doc_command_links'
033c066543 Help: Add see-also refs for flow control commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7467
2022-07-20 09:27:55 -04:00
Brad King
e077d0b351 Merge topic 'doc-example-target-sources'
c7c5a50b97 Help: Add missing PRIVATE keyword to target_sources() example

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7490
2022-07-20 08:45:54 -04:00
Craig Scott
c7c5a50b97 Help: Add missing PRIVATE keyword to target_sources() example
Fixes: #23746
2022-07-20 20:19:37 +10:00
Markus Ferrell
033c066543 Help: Add see-also refs for flow control commands 2022-07-19 13:06:25 -04:00