Commit Graph

180 Commits

Author SHA1 Message Date
Kitware Robot
1772622772 LICENSE: Replace references to Copyright.txt with LICENSE.rst
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
  while IFS= read -r -d $'\0' f ; do
    sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
              s/Copyright.txt/LICENSE.rst/
            }' "$f" ; done
```
2025-03-03 10:43:35 -05:00
Nikita Nemkin
d138555959 Help: Use Title Case for all "Imported Targets" sections 2025-01-31 12:23:29 -05:00
Brad King
7afa58b15d Modules/Find*: Include FindPackageHandleStandardArgs normally
Since commit d74210a8bd (CMP0017: Remove support for OLD behavior,
2024-11-17) we can rely on CMP0017's NEW behavior unconditionally.
Calling `include(FindPackageHandleStandardArgs)` in a builtin module
will always get the builtin `FindPackageHandleStandardArgs`.
2025-01-30 08:53:12 -05:00
Nikita Nemkin
9890cfc4ec Help: More syntax highlighting for literal blocks
Covers almost all blocks containing actual code, except:

* Parsed-literal blocks can't be highlighted, including many command
  summaries and substitution-heavy docs like find_... commands.
  This is a Sphinx limitation.

* Code with errors, like CMP0049, DEPLOYMENT_ADDITIONAL_FILES,
  DEPLOYMENT_REMOTE_DIRECTORY, @PACKAGE_INIT@ substitution in the
  tutorial, bracket arguments/comments in cmake-language.7 and
  cmake-developer.7.

* FindQt4 module, which needs reformatting.
2025-01-29 16:48:53 -05:00
Brad King
c283aafe62 CMP0057: Remove support for OLD behavior 2025-01-22 10:40:53 -05:00
Brad King
c234cc8e67 Merge topic 'FindMatlab-doc'
6e21dcc0ee FindMatlab: Fix multi-signature function documentation anchors

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10186
2025-01-17 08:19:17 -05:00
Brad King
6e21dcc0ee FindMatlab: Fix multi-signature function documentation anchors
Fix use of the `signature::` directive by commit ae558b9ad0 (FindMatlab:
Support REGISTRY_VIEW, 2024-02-08, v3.30.0-rc1~528^2).  The directive
was created for use inside `Help/command/*.rst` documents.  Using it
in module documentation requires explicit anchors.
2025-01-16 14:28:17 -05:00
Peter Kokot
1a8e43d57d
FindPackageHandleStandardArgs: Clarify the FOUND_VAR option
The `find_package_handle_standard_args(FOUND_VAR)` is deprecated as of
CMake 3.3 and both the `<PackageName>_FOUND` and the upper-cased
`<PACKAGE_NAME>_FOUND` are set with or without using this option.
Additionally, find modules and docs are also synced with this to make it
clearer.
2024-12-31 02:07:16 +01:00
Craig Scott
fc7aa3cd69
tests: Preserve empty arguments in test command lines
This will now preserve empty values in the TEST_LAUNCHER and
CROSSCOMPILING_EMULATOR target properties for tests added by:

- The add_test() command.
- The ExternalData_Add_Test() command from the ExternalData module.
- The gtest_add_tests() or gtest_discover_tests() commands from the
  GoogleTest module.

For the gtest_add_tests() and gtest_discover_tests() commands,
empty elements in the values passed after the EXTRA_ARGS keyword
are also now preserved.

Policy CMP0178 is added to provide backward compatibility with the
old behavior where empty values were silently discarded from the
above cases.

Fixes: #26337
2024-10-02 10:09:11 +10:00
Brad King
e8597f2b09 Merge topic 'FindMatlab-mcr'
9ceca05e6b FindMatlab: Search mex and mx libraries for MCR
67e3c6b6eb FindMatlab: Cache whether MATLAB root contains MCR or MATLAB
b426ce1d04 FindMatlab: Add support for MCR distributions without mex.h
cd4782bac3 FindMatlab: Only consider versioned MCR subdirectory if it exists

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9831
2024-09-20 10:04:21 -04:00
Hermann von Kleist
9ceca05e6b FindMatlab: Search mex and mx libraries for MCR
Further changes:
- Better documentation of library availabilities
- Log each library location in debug mode

Fixes: #26306
2024-09-19 15:33:19 +02:00
Hermann von Kleist
67e3c6b6eb FindMatlab: Cache whether MATLAB root contains MCR or MATLAB
Fixes: #26306
2024-09-19 15:33:06 +02:00
Hermann von Kleist
b426ce1d04 FindMatlab: Add support for MCR distributions without mex.h
Consider `matrix.h` in search for include dirs.

Fixes: #26306
2024-09-18 11:19:16 -04:00
Hermann von Kleist
cd4782bac3 FindMatlab: Only consider versioned MCR subdirectory if it exists
Issue: #26306
2024-09-18 11:16:03 -04:00
Brad King
e701265823 Merge topic 'matlab-macos'
b90d7a3a82 FindMatlab: On macOS search under ~/Applications and /Applications

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9814
2024-09-13 09:23:18 -04:00
scivision
b90d7a3a82
FindMatlab: On macOS search under ~/Applications and /Applications
users with locked-down macOS may not be able to install their desired Matlab
under /Applications, but may use the standard ~/Applications instead
2024-09-12 12:37:30 -04:00
scivision
20412181e9 FindMatlab: Add R2024b version map 2024-09-12 12:34:00 -04:00
Brad King
70cbcb1da3 FindMatlab: Restore support for finding Matlab without any languages
Revise commit 657064b6d4 (FindMatlab: Refactor: Eliminate
_matlab_64Build, 2024-01-24, v3.30.0-rc1~594^2~5) to more faithfully
reproduce the original behavior.

Revise commit 91c672e5ae (FindMatlab: Use find_package(Threads) instead
of checking -pthread, 2024-02-02, v3.30.0-rc1~594^2~1) to restore the
old behavior of looking for threads only with C or CXX enabled.

Fixes: #26121
2024-07-15 15:01:15 -04:00
Juan Ramos
3cd64287fe Modules: Fix CMP0159 warnings in modules when tracing
Closes: #25829
2024-03-29 13:51:59 -07:00
Brad King
0f141fbd68 Merge topic 'matlab-2024a'
bade9832e6 FindMatlab: R2024a version map

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9360
2024-03-22 09:01:54 -04:00
scivision
bade9832e6 FindMatlab: R2024a version map 2024-03-21 10:13:59 -04:00
Hermann von Kleist
ae558b9ad0 FindMatlab: Support REGISTRY_VIEW
CMake 3.24 added REGISTRY_VIEW as find_package argument. Since
FindMatlab.cmake looks up the registry, we might as well support it.

While some logic existed to select the correct registry view when
searching for the installed versions, that logic was not applied when
getting the matlab root directories, which might have led to weird
situations in which both the 32-bit and 64-bit version of the same
Matlab release were installed simultaneously.

The changes made in this commit try not to break existing and documented
behavior from exposed functions. The exposed functions which interact
with the registry get an optional `REGISTRY_VIEW` argument.

If no REGISTRY_VIEW is passed to find_package, FindMatlab uses the
`TARGET` view to mimic the previous behavior.
2024-02-20 18:07:47 +01:00
Hermann von Kleist
3b51a52af0 FindMatlab: Add changelog for now supported version range 2024-02-19 16:34:35 +01:00
Hermann von Kleist
ab08e75921 FindMatlab: Remove dead commented-out code 2024-02-13 09:39:58 +01:00
Hermann von Kleist
91c672e5ae FindMatlab: Use find_package(Threads) instead of checking -pthread 2024-02-13 09:39:58 +01:00
Hermann von Kleist
ce426e2a45 FindMatlab: Do not query host processor for registry view
`matlab_extract_all_installed_versions_from_registry` searched for
32-bit installations on 32-bit Windows even if win64 was set to 'TRUE'.
Now, no installation will be found if win64 is set to 'TRUE' on 32-bit
Windows, which is also the documented behavior.
2024-02-13 09:39:58 +01:00
Hermann von Kleist
37723c4bee FindMatlab: Refactor Matlab root list append operation 2024-02-13 09:39:57 +01:00
Hermann von Kleist
07256587f1 FindMatlab: Simplify ROOT lookup for new and old MCR 2024-02-13 09:39:57 +01:00
Hermann von Kleist
657064b6d4 FindMatlab: Refactor: Eliminate _matlab_64Build 2024-02-13 09:39:57 +01:00
Hermann von Kleist
c847be4fc7 FindMatlab: Remove extra [Debug] from log message 2024-02-13 09:39:57 +01:00
Hermann von Kleist
cd2541bb56 FindMatlab: Remove unnecessary if statements and loops 2024-02-13 09:39:57 +01:00
Hermann von Kleist
d4c1b5e00b FindMatlab: Fixup indentation 2024-02-13 09:39:57 +01:00
Brad King
026270fe3d Merge topic 'findmatlab-silence-mex-warnings'
0576913aff FindMatlab: Silence warnings for mex version file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9220
2024-02-12 10:59:28 -05:00
Brad King
93de765e81 Merge topic 'findmatlab-improve-version-check'
c273fc4ffb FindMatlab: Handle version range
3665fe26ba FindMatlab: Refactor version selection using find_package_check_version

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9221
2024-02-12 10:58:49 -05:00
Brad King
761254eca1 Merge topic 'findmatlab-registry-lookup-without-versionxml'
e22c4dfea0 FindMatlab: Revert undocumented and now-unnecessary full version lookup

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9226
2024-02-08 09:42:13 -05:00
Brad King
aba76cdaed Merge topic 'findmatlab-registry-lookup-without-versionxml' into release-3.29
e22c4dfea0 FindMatlab: Revert undocumented and now-unnecessary full version lookup

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9226
2024-02-08 09:42:12 -05:00
Hermann von Kleist
e22c4dfea0 FindMatlab: Revert undocumented and now-unnecessary full version lookup
Partially revert commit dc9d9589e4 (FindMatlab:WIN32: return full Matlab
version when found via registry, 2023-09-14, v3.28.0-rc1~82^2~2).  It
changed `matlab_extract_all_installed_versions_from_registry` behavior
to query `VersionInfo.xml` for version information.  However, the
function documentation states that it only uses the registry.  It's also
not needed since commit c608adc236 (FindMatlab: Fix major.minor version
lookups in Windows Registry, 2024-01-11, v3.28.2~13^2~1), which added
the same lookup to `matlab_get_all_valid_matlab_roots_from_registry`.
2024-02-07 12:12:12 -05:00
Hermann von Kleist
c273fc4ffb FindMatlab: Handle version range 2024-02-07 09:09:20 +01:00
Hermann von Kleist
3665fe26ba FindMatlab: Refactor version selection using find_package_check_version 2024-02-07 09:09:20 +01:00
Hermann von Kleist
0576913aff FindMatlab: Silence warnings for mex version file
This adds -w to to the version source file's compile options.
Currently, this is done for Clang and compilers officially supported by
Matlab.

Fixes: #24851
2024-02-07 09:08:34 +01:00
Brad King
8e7960773f Merge topic 'find-matlab-docs-mcr-version-mapping'
29fece7ef3 FindMatlab: Document that version mappings do not apply to MCR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9184
2024-01-26 10:11:09 -05:00
Brad King
f6c9da9154 Merge topic 'find-matlab-docs-mcr-version-mapping' into release-3.28
29fece7ef3 FindMatlab: Document that version mappings do not apply to MCR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9184
2024-01-26 10:11:08 -05:00
Brad King
ebef793519 Merge topic 'find-matlab-fix-nonzero-patch-version'
b1e27b1b9d FindMatlab: Some versions use major.minor.patch in the registry

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9183
2024-01-26 10:10:02 -05:00
Hermann von Kleist
29fece7ef3 FindMatlab: Document that version mappings do not apply to MCR 2024-01-25 09:00:18 +01:00
Hermann von Kleist
b1e27b1b9d FindMatlab: Some versions use major.minor.patch in the registry
Fixes #25631.
2024-01-25 08:54:01 +01:00
Brad King
e855c7a4de Merge topic 'FindMatlab-docs'
b8665d44ba FindMatlab: Fix error message from function
44d2cf3ed4 FindMatlab: Document all registry paths for version lookup
363a7d4693 FindMatlab: matlab_get_release_name_from_version is a function now

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !9175
2024-01-23 14:57:08 -05:00
Hermann von Kleist
b8665d44ba FindMatlab: Fix error message from function 2024-01-22 09:29:57 -05:00
Hermann von Kleist
44d2cf3ed4 FindMatlab: Document all registry paths for version lookup 2024-01-22 09:29:09 -05:00
Hermann von Kleist
363a7d4693 FindMatlab: matlab_get_release_name_from_version is a function now 2024-01-22 09:28:04 -05:00
Brad King
d5cc1da1ca Merge topic 'matlab-env'
6f7d87b40d FindMatlab: use NAMES for find_*
9e97893147 FindMatlab: set MATLAB_ARCH per process call

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9161
2024-01-19 11:02:56 -05:00