Commit Graph

34063 Commits

Author SHA1 Message Date
Tyler f2a699261b cxxmodules: Do not expect collator install scripts with no CXX_MODULES
Calling `install(EXPORT)` with the `CXX_MODULES_DIRECTORY` parameter
leads to installation rules being generated which `include()` CMake
scripts that set the `IMPORTED_CXX_MODULES_[CONFIG]` target property for
relevant targets.  However, these scripts don't get generated for
targets in an export set which don't have any C++20 modules.  When the
installation rules attempt to `include()` the missing scripts, the
install fails.

Co-authored-by: Brad King <brad.king@kitware.com>
2023-05-23 15:01:32 -04:00
Brad King 1242ea14c5 Merge topic 'framework-path-parsing'
5884303e69 Apple Framework: enhance path parsing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8499
2023-05-23 11:00:36 -04:00
Brad King e05230ebcf Merge topic 'ci-fedora-38'
1689e0a118 ci: Subsume Clang C++ modules testing in main Fedora+Clang jobs
bdaa9e1e4e ci: use Fedora 38 images and environments
b69c63d3aa ci: update Linux image to Fedora 38
9c388fb064 ci: Remove nlohmann-json from Fedora base image
d9d061d19f ci: Disable sccache in clang-analyzer job
fad150d314 clang-tidy module: Update to build against LLVM/Clang 16
ce3ec02bb2 clang-tidy module: Drop unused variable
2c27968619 clang-tidy: ignore warnings new in version 16
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8502
2023-05-23 06:16:32 -04:00
Kitware Robot 17f574e867 CMake Nightly Date Stamp 2023-05-23 00:01:08 -04:00
Brad King 9ea7b4ac66 clang-tidy: Fix readability-redundant-string-cstr warnings 2023-05-22 17:15:58 -04:00
Brad King bd4ec7a71e clang-tidy: Fix modernize-loop-convert warnings 2023-05-22 17:15:45 -04:00
Brad King 93ee2b369c Source: Fix -Wdangling-reference warnings exposed by gcc 13 2023-05-22 17:14:54 -04:00
Brad King 71817dc37c ccmake: Tell clang-analyzer a loop body runs at least once 2023-05-22 16:51:15 -04:00
Brad King 04b0d5c862 codespell: Fix typos 2023-05-22 16:51:15 -04:00
Brad King 3728f079af codespell: Avoid escape sequence that looks like misspelled "nodes" 2023-05-22 16:50:51 -04:00
Brad King 08bccb2dfd Merge branch 'upstream-KWSys' into ci-fedora-38
* upstream-KWSys:
  KWSys 2023-05-22 (df6f93a4)
2023-05-22 14:19:19 -04:00
Brad King fc29c5f1bf Merge topic 'minor-refactoring'
8c066045ec Source: Improve some code readability and efficiency
f64a774b49 Source: Reuse some existing variable declarations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8492
2023-05-22 12:39:27 -04:00
Brad King dc4a53f49e Merge topic 'FileAPI-framework'
b3a6a11e95 fileapi: Extend codemodel targets/compileGroups with Apple frameworks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8489
2023-05-22 12:35:28 -04:00
Kitware Robot dabba15172 CMake Nightly Date Stamp 2023-05-22 00:01:36 -04:00
Marc Chevrier 5884303e69 Apple Framework: enhance path parsing 2023-05-21 14:26:08 +02:00
Kitware Robot faa14ecfae CMake Nightly Date Stamp 2023-05-21 00:01:08 -04:00
Kitware Robot f32e275f29 CMake Nightly Date Stamp 2023-05-20 00:01:11 -04:00
Meekness Adesina 8c066045ec Source: Improve some code readability and efficiency
- Replace raw loop with STL find algorithm for improved efficiency
- Update functions for enhanced readability and understandability
2023-05-19 09:56:07 -04:00
Meekness Adesina f64a774b49 Source: Reuse some existing variable declarations 2023-05-19 08:58:57 -04:00
Brad King 9939f606a6 Merge topic 'cxxmodules-private-between-targets'
d38779df2a ci: Enable RunCMake.CXXModules collation cases in clang jobs
69e4525241 Tests/CXXModules: add example for private modules between targets
18f87c87f8 cmCxxModuleMapper: track whether modules are private or not
56f7d6f827 cmCxxModuleMapper: add a structure to represent BMI locations
8207a3a266 cmDyndepCollation: add a query for visibility of an object's modules
e8efcbec8c iwyu: ignore `std::remove_reference` requirements

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8476
2023-05-19 08:35:17 -04:00
Brad King a60ce4e5f4 Merge topic 'vs-cxxmodules'
51c343b788 ci: Enable C++20 module testing with VS 2022 on ARM64
406a103318 VS: Add support for C++ module internal partitions in VS 17.6 and newer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8471
2023-05-19 08:33:20 -04:00
Marc Chevrier b3a6a11e95 fileapi: Extend codemodel targets/compileGroups with Apple frameworks
Fixes: #19897
2023-05-19 12:10:20 +02:00
Kitware Robot 685eba4dd9 CMake Nightly Date Stamp 2023-05-19 00:01:12 -04:00
Brad King 4d5c32fa2c Merge topic 'skip-linting'
775c369420 Autogen: set SKIP_LINTING ON for generated files
b480315e0c TargetGenerator: Add SKIP_LINTING source property
993dde925f TargetGenerator: Factor out generation of code check rules
023af4ab2f Improve Const Correctness

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8467
2023-05-18 09:24:17 -04:00
Ben Boeckel 18f87c87f8 cmCxxModuleMapper: track whether modules are private or not
This allows collation to give a useful error message when it finds usage
of a private module rather than collation just not informing the
compilation and the compiler erroring out about not being able to import
unknown modules (which exists, but it was not told about due to
visibility).

Fixes: #24652
2023-05-18 08:34:31 -04:00
Ben Boeckel 56f7d6f827 cmCxxModuleMapper: add a structure to represent BMI locations
This structure allows representing whether a module is private in order
to give a more useful error message when its usage is attempted from
another target.
2023-05-18 08:32:07 -04:00
Kitware Robot 5591f8dbec CMake Nightly Date Stamp 2023-05-18 00:01:19 -04:00
Brad King 406a103318 VS: Add support for C++ module internal partitions in VS 17.6 and newer
VS 17.6 now implements `ScanSourceforModuleDependencies` using the same
`cl /scanDependencies` scanner that our Ninja generator uses.  It can
distinguish module internal partitions from module interface units based
on their content.  Switch from `CompileAsCppModule` to `CompileAsCpp`
for `CXX_MODULES` sources so that MSBuild can scan and classify them.
2023-05-17 11:59:24 -04:00
Kitware Robot 0383bb7ffa CMake Nightly Date Stamp 2023-05-17 00:01:16 -04:00
Orkun Tokdemir 775c369420 Autogen: set SKIP_LINTING ON for generated files
Fixes: #19772
2023-05-16 10:56:25 -04:00
Orkun Tokdemir b480315e0c TargetGenerator: Add SKIP_LINTING source property
The `SKIP_LINTING` source property was added to disable code check for
desired source files. The `SKIP_LINTING`includes `cpplint`, `clang-tidy`, \
`cppcheck` and `include-what-you-use`. If `SKIP_LINTING` is set on a
source file, the tools mentioned above will not be run on that source file.
2023-05-16 10:47:56 -04:00
Orkun Tokdemir 993dde925f TargetGenerator: Factor out generation of code check rules
De-duplicate code check rule generation in Ninja and Makefile generators
by moving their implementation to `cmCommonTargetGenerator`.

Previously Ninja was generating code check rules per language.
It was changed to generate code check rules for each source file.
2023-05-16 10:46:35 -04:00
Kitware Robot 0cae3228b8 CMake Nightly Date Stamp 2023-05-16 00:01:08 -04:00
Ben Boeckel 8207a3a266 cmDyndepCollation: add a query for visibility of an object's modules
This will be used to hide private modules from the view of consuming
targets.
2023-05-15 22:26:36 -04:00
Ben Boeckel e8efcbec8c iwyu: ignore std::remove_reference requirements
This removes some includes from some existing files.
2023-05-15 22:26:36 -04:00
Kitware Robot bafb6e999d CMake Nightly Date Stamp 2023-05-15 00:01:21 -04:00
Kitware Robot 13eae753ea CMake Nightly Date Stamp 2023-05-14 00:01:10 -04:00
Kitware Robot 7f64e9257a CMake Nightly Date Stamp 2023-05-13 00:01:09 -04:00
Orkun Tokdemir 023af4ab2f Improve Const Correctness 2023-05-12 16:09:38 +02:00
Brad King 4a1421efad Merge topic 'system-framework'
ad9020a899 Apple Frameworks: honor SYSTEM target property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8469
2023-05-12 09:26:56 -04:00
Kitware Robot 2b08606511 CMake Nightly Date Stamp 2023-05-12 00:01:08 -04:00
Marc Chevrier ad9020a899 Apple Frameworks: honor SYSTEM target property
Fixes: #24109
2023-05-11 10:24:18 +02:00
Kitware Robot 6c813f5129 CMake Nightly Date Stamp 2023-05-11 00:01:11 -04:00
Brad King aea92864a4 Merge topic 'ninja-fortran-include'
1f1894af1f Ninja: Fix Fortran INCLUDE directive dependencies when not preprocessing
9075ebda60 Ninja: Rename internal Fortran scanner flag from --pp= to --src=
266634bce5 Fortran: Teach lexer to recognize LLVMFlang preprocessor dependencies
efadf839be Tests: Teach RunCMake to ignore LLVMFlang -flang-experimental-exec warning
c78be340ba Tests: Teach RunCMake to ignore Intel Fortran remark 10440

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8461
2023-05-10 09:35:50 -04:00
Kitware Robot 65430031a6 CMake Nightly Date Stamp 2023-05-10 00:01:08 -04:00
Brad King 1f1894af1f Ninja: Fix Fortran INCLUDE directive dependencies when not preprocessing
Since commit b0a6161190 (Fortran: Add Fortran_PREPROCESS property,
2020-04-24, v3.18.0-rc1~116^2~3), if `Fortran_PREPROCESS` is `OFF`, the
Ninja generator does not properly detect dependencies on sources loaded
via the Fortran INCLUDE directive.  Fix this and add a test.
2023-05-09 09:56:42 -04:00
Brad King 9075ebda60 Ninja: Rename internal Fortran scanner flag from --pp= to --src=
The value represents the source file to be scanned.
It is not always preprocessor output.
2023-05-09 09:56:41 -04:00
Brad King 266634bce5 Fortran: Teach lexer to recognize LLVMFlang preprocessor dependencies
The line directives have the form `#line <path> <number>`, and do not
have the line number before the path as other compilers do.
2023-05-09 09:56:41 -04:00
Kitware Robot a2fba5967a CMake Nightly Date Stamp 2023-05-09 00:01:07 -04:00
Kitware Robot b2d689bc5a CMake Nightly Date Stamp 2023-05-08 00:01:27 -04:00