Commit Graph

32774 Commits

Author SHA1 Message Date
Andrey Filipenkov cc3cd8bc2a CPack: allow custom file extension in archive generator 2022-09-01 11:35:58 -04:00
Kitware Robot 5d0685aa3e CMake Nightly Date Stamp 2022-08-11 00:01:15 -04:00
Brad King 20e544eb24 Merge topic 'fortran-module-dep'
219a9b1e14 Fortran: Fix suprious dependencies with submodules
a7211d6a2f Fortran: Teach lexer to handle CRLF newlines

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7529
2022-08-10 09:17:33 -04:00
Kitware Robot 29115e706a CMake Nightly Date Stamp 2022-08-10 00:01:10 -04:00
Vitaly Mogulian 219a9b1e14 Fortran: Fix suprious dependencies with submodules
In commit 695f0d0d3a (cmFortranParser: Parse keywords as lexical tokens,
2016-09-05, v3.7.0-rc1~150^2) we created keyword-specific variants of
the original `USE WORD other EOSTMT` production, such as
`MODULE WORD other EOSTMT` and `INTERFACE WORD other EOSTMT`.  The same
pattern was used by more keyword-specific productions in commit b5ac8b8aa7
(Fortran: Add support for submodule syntax in dependency scanning,
2016-09-05, v3.7.0-rc1~73^2~1).

The postfix part (`other`) of several keyword-specific productions is
not needed to match Fortran syntax.  See the Fortran 2018 standard,
para.4.1.4/1 on p.28, para.14.2.1/2 on pp.293-294.  The postfix is
needed only for a case of operator 'use':

    use <module-name> [, only : <list-of-vars>]

The unnecessary postfix matching from the keyword-specific productions
such as module, submodule, and interface declarations can cause spurious
module dependencies to be detected, so remove it.

Extend the test suite with examples covering the previously-broken
cases.

Fixes: #18427
2022-08-09 09:11:30 -04:00
Brad King a7211d6a2f Fortran: Teach lexer to handle CRLF newlines
We read sources in binary format, so we need to explicitly match CR
(`\r`) characters that occur as part of newlines in CRLF sources.
This is particularly important when line continuation (`&`) occurs
in the middle of module declaration or usage.
2022-08-09 09:09:51 -04:00
Kitware Robot 241fc839d5 CMake Nightly Date Stamp 2022-08-09 00:01:12 -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
Kitware Robot 33d2491449 CMake Nightly Date Stamp 2022-08-08 00:01:11 -04:00
Kitware Robot 767052c372 CMake Nightly Date Stamp 2022-08-07 00:01:05 -04:00
Kitware Robot 40db0c34b6 CMake Nightly Date Stamp 2022-08-06 00:01:10 -04:00
Brad King c3da25f3d9 Merge topic 'string-JSON-error-typo'
e0d3e6e147 string(JSON): Fix typo in error message

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7547
2022-08-05 08:54:53 -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
Kitware Robot ba2a9fb765 CMake Nightly Date Stamp 2022-08-05 00:01:13 -04:00
Sean Kahler e0d3e6e147 string(JSON): Fix typo in error message
`s/then/than/` in a comparison.
2022-08-04 15:50:59 -04:00
Alex Turbov f4563f05db Help: Value for --graphviz= option actually is mandatory
Before it was `[file]` that AFAIK means optional.
2022-08-04 19:34:45 +04:00
Alex Turbov 19366408fe cmFindPackageCommand: Protect overrides of cmDirectoryListGenerator
Move virtual function overrides into a protected section of class.
2022-08-04 09:41:59 -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 f05ec53112 Merge topic 'cmake-preset-error-reporting'
47929ee98c presets: Add basic error forwarding from cmake preset json parser

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7495
2022-08-04 09:38:34 -04:00
Brad King 0104fec300 Merge topic 'makefile-path-consistency'
5e0b06fe84 Makefiles: Restore path consistency in the global dispatch makefile

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7543
2022-08-04 09:35:50 -04:00
Kitware Robot 365613d98b CMake Nightly Date Stamp 2022-08-04 00:01:12 -04:00
Brad King 5e0b06fe84 Makefiles: Restore path consistency in the global dispatch makefile
Directory-level rules in `CMakeFiles/Makefile2` were previously
previously written by each directory's local generator using its own
decision for using relative or absolute paths.

Since commit d33b12d84b (Add support for build tree symlink inside
source tree, 2022-02-25, v3.24.0-rc1~583^2), each local generator
explicitly models the relationship between its source and build paths,
and uses this to determine when it is safe to use relative paths.
Because `add_subdirectory` supports arbitrary placement of the source
and build directories, different local generators may have different
relationships between their source and build paths.  This can cause
disagreement among rules written to `CMakeFiles/Makefile2`.

Restore consistency by always using the root local generator to write
rules to `CMakeFiles/Makefile2`.  Relative paths should always be
expressed w.r.t. the top-level build directory since that is the working
directory in which the `make` tool processing the file will run.

Fixes: #23814
2022-08-03 14:58:47 -04:00
Sankhesh Jhaveri 47929ee98c presets: Add basic error forwarding from cmake preset json parser
Print errors only if there are errors.  Add filename for better
introspection, particularly for FileNotFound errors with presets.
2022-08-03 10:20:04 -04:00
Kyle Edwards e7bfd0ac7a Merge topic 'all-verify-interface-header-sets'
83e44002ae VERIFY_INTERFACE_HEADER_SETS: Add verification target for all

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7536
2022-08-03 09:58:43 -04:00
Brad King f8f8b8e60e Merge topic 'try_compile-cleanup'
6b427d8da9 cmCoreTryCompile: Port to cmArgumentParser
067ba3a2bd cmCoreTryCompile: Move target type selection logic to try_compile
781e1b191a cmCoreTryCompile: Simplify TryCompileCode return type
3218ea60de Tests: Add RunCMake.try_compile case for try_run-only args
b8e551ed32 Tests: Add RunCMake.try_run cases for missing keyword arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7531
2022-08-03 09:47:22 -04:00
Brad King e2112b3778 Merge topic 'cpp-named-module-support-msvc'
4f95e6b284 ci: test BMI exporting and installation with GCC in CI
c49d5f137b RunCMake/CXXModules: add a "deep-chain" test
297e0f4dce cmCxxModuleMapper: support MSVC module map format
b3c2880cb2 cmCxxModuleMapper: track transitive modules for MSVC
a43713d615 CTestCustom: ignore `cm::optional` uninitialized memory false positive
b90de0b492 RunCMake/CXXModules: support MSVC extensions
a84c186a7d cmScanDepFormat: support the MSVC 17.3 toolchain temporarily
d7f5064ff7 cmScanDepFormat: support P1689R5
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7481
2022-08-03 09:45:15 -04:00
Brad King f6917a2f1f Merge topic 'cuda_add_lto_support'
96bc59b1ca CUDA: Add Device LTO support for nvcc
1527d48cd0 CheckIPO: Refactor logic selecting test source files
4a552ab4ad remove unused variables
6eda92d037 remove unused variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7389
2022-08-03 09:42:17 -04:00
Brad King 79d7dab1f7 Merge topic 'find_package-refactor-path-generation'
2f69c0233c cmFindPackageCommand: Optimize the last calls to `TryGeneratedPaths`
076a4b44b0 cmFindPackageCommand: Path generators are actually reusable
664abd486f cmFindPackageCommand: Better names for template parameters
c862797a40 cmFindPackageCommand: Rename some generators
fdd14b1744 cmFindPackageCommand: Deduplicate directory listing code
08e7fb3cfa cmFindPackageCommand: Compile-time path generator expressions
61eb5d4de5 cmFindPackageCommand: Avoid friendship between command class and generator
ef62f213f8 cmFindPackageCommand: Drop dead code
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7445
2022-08-03 09:39:48 -04:00
Kyle Edwards 83e44002ae VERIFY_INTERFACE_HEADER_SETS: Add verification target for all
Fixes: #23802
2022-08-03 08:19:08 -04:00
Kitware Robot e170549eb6 CMake Nightly Date Stamp 2022-08-03 00:01:11 -04:00
Brad King 6b427d8da9 cmCoreTryCompile: Port to cmArgumentParser 2022-08-02 12:54:56 -04:00
Ben Boeckel 297e0f4dce cmCxxModuleMapper: support MSVC module map format
THis is a set of flags stored in a response file which informs the
compiler about where to place output BMI files as well as find the
required BMIs.
2022-08-02 10:53:38 -04:00
Ben Boeckel b3c2880cb2 cmCxxModuleMapper: track transitive modules for MSVC
MSVC needs the transitive closure of module usage to compile.
2022-08-02 10:53:38 -04:00
Ben Boeckel a84c186a7d cmScanDepFormat: support the MSVC 17.3 toolchain temporarily
At least until 17.4 is out.
2022-08-02 10:53:38 -04:00
Alex Turbov 2f69c0233c cmFindPackageCommand: Optimize the last calls to TryGeneratedPaths 2022-08-02 09:46:52 -04:00
Alex Turbov 076a4b44b0 cmFindPackageCommand: Path generators are actually reusable 2022-08-02 09:46:52 -04:00
Alex Turbov 664abd486f cmFindPackageCommand: Better names for template parameters 2022-08-02 09:46:52 -04:00
Alex Turbov c862797a40 cmFindPackageCommand: Rename some generators
The point is that `cmFileListBlahBlahGenerator` actually "generate"
directory names and never files.

The `cmBlahBlahStringGenerators` produce paths in fact. Ok, paths
nowadays are also strings but...
2022-08-02 09:46:52 -04:00
Alex Turbov fdd14b1744 cmFindPackageCommand: Deduplicate directory listing code
The `cmFileListGeneratorProject` and `cmFileListGeneratorMacProject`
was look very similar 'cept few lines.

Now they have a base class and the generator-specific logic has moved
to overrides.
2022-08-02 09:46:52 -04:00
Alex Turbov 08e7fb3cfa cmFindPackageCommand: Compile-time path generator expressions
Original code had path generators built at run-time using a linked list
of dynamically allocated nodes each of which was responsible to generate
a path segment.

However, the combination of used generators is totally well known at
compile time.
2022-08-02 09:46:48 -04:00
Brad King a3cd71af65 Merge topic 'cmgeneratedfs-absolute-paths'
b02ef99fea cmGeneratedFileStream: Use absolute paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7524
2022-08-02 09:31:54 -04:00
Brad King 5889e5c0eb Merge topic 'vs-msbuild-arm64'
c165dd6a83 VS: Fix ARM64 host architecture detection in x86 binary

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7525
2022-08-02 09:30:04 -04:00
Brad King e18fb0c73e Merge topic 'vs-msbuild-arm64' into release-3.24
c165dd6a83 VS: Fix ARM64 host architecture detection in x86 binary

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7525
2022-08-02 09:30:03 -04:00
Brad King 621ea848b0 Merge topic 'windows-symlink-dir'
a4f1c0fac8 Windows: Revert "Prefer junctions for directory symlinks"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7530
2022-08-02 09:28:49 -04:00
Brad King 067ba3a2bd cmCoreTryCompile: Move target type selection logic to try_compile
This is specific to `try_compile` since `try_run` always needs an
executable.  Move the logic out of the common code path.
2022-08-02 08:04:21 -04:00
Brad King 781e1b191a cmCoreTryCompile: Simplify TryCompileCode return type
The return value is only used as a boolean, so use `bool`.
2022-08-02 08:04:20 -04:00
Kitware Robot 8af9dea833 CMake Nightly Date Stamp 2022-08-02 00:01:12 -04:00
Brad King a4f1c0fac8 Windows: Revert "Prefer junctions for directory symlinks"
Revert commit 5101d586c4 (Windows: Prefer junctions for directory
symlinks, 2022-02-22, v3.24.0-rc1~575^2).  Junctions do not support
`../` and other non-canonical paths.  Revert their use pending further
investigation.

Fixes: #23781
Issue: #23257
2022-08-01 10:59:20 -04:00
Martin Duffy b02ef99fea cmGeneratedFileStream: Use absolute paths
Use absolute paths in cmGeneratedFileStream to ensure output can be found
if the working directory changes.

Fixes: #23784
2022-08-01 10:23:55 -04:00
Anton Lapounov c165dd6a83 VS: Fix ARM64 host architecture detection in x86 binary
Use the 64-bit registry view when we check whether Windows
has the ARM64 version of the .NET Framework 4.x installed.

Issue: #23755
2022-08-01 10:16:14 -04:00