summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Ninja: Allow compilation before generation of dependencies' private sourcesMartin Duffy2023-09-201-0/+14
| | | | | | | | | | This requires knowing when a generated header is public, which we can model using file sets. Add policy CMP0154 to treat generated sources as private by default in targets with file sets. Generated public headers can be specified in public file sets. Fixes: #24959 Issue: #15555
* Ninja: Use absolute path to COMSPEC if possiblescivision2023-09-111-0/+9
| | | | | | | | | If the COMSPEC is set to an absolute path, use it instead of just `cmd.exe`. This avoids searching for the tool in the current working directory and the `PATH`. If COMSPEC is not set to an absolute path, fall back to the existing behavior. Issue: #18350
* Ninja: generate scanning and build rules for C++20 module synthetic targetsBen Boeckel2023-08-171-3/+9
|
* IWYU: Update for Debian 12 CI jobBrad King2023-07-281-0/+1
| | | | | | `include-what-you-use` diagnostics, in practice, are specific to the environment's compiler and standard library. Update includes to satisfy IWYU for our CI job under Debian 12.
* LINK_OPTIONS: ensure correct dollar escapingMarc Chevrier2023-07-171-6/+6
| | | | | | Ensure correct escaping for Ninja and Makefile generators. Fixes: #25049
* Merge topic 'compile-commands-modules'Brad King2023-07-121-1/+2
|\ | | | | | | | | | | | | | | 677b28dc7b Ninja: include module mapper flags in `compile_commands.json` Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !8611
| * Ninja: include module mapper flags in `compile_commands.json`Ben Boeckel2023-07-091-1/+2
| | | | | | | | Fixes: #24618
* | codecvt: Extrace codecvt::Encoding to remove codecvt includesClemens Wasser2023-06-221-6/+6
|/
* cxxmodules: remove `CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP` variableBen Boeckel2023-06-011-1/+0
| | | | It is now subsumed by the UUID setting completely.
* Preserve --compile-no-warning-as-error in automatic CMake re-runsBrad King2023-05-301-8/+11
| | | | | | | | When the build system re-runs `cmake` to regenerate itself, preserve the `--compile-no-warning-as-error` option if it was used when `cmake` was last explicitly invoked. Normally such settings are preserved in the cache, but the purpose of this option is to be beyond the reach of project code.
* Merge topic 'cxxmodules-private-between-targets'Brad King2023-05-191-10/+34
|\ | | | | | | | | | | | | | | | | | | | | | | 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
| * cmCxxModuleMapper: track whether modules are private or notBen Boeckel2023-05-181-10/+34
| | | | | | | | | | | | | | | | | | | | 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
* | TargetGenerator: Factor out generation of code check rulesOrkun Tokdemir2023-05-161-1/+11
|/ | | | | | | | 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.
* Ninja: Fix Fortran INCLUDE directive dependencies when not preprocessingBrad King2023-05-091-3/+11
| | | | | | | 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.
* Ninja: Rename internal Fortran scanner flag from --pp= to --src=Brad King2023-05-091-14/+17
| | | | | The value represents the source file to be scanned. It is not always preprocessor output.
* CMake code rely on cmList class for CMake lists management (part. 2)Marc Chevrier2023-04-291-16/+12
|
* Merge topic 'ninja-performance'Brad King2023-03-301-12/+3
|\ | | | | | | | | | | | | | | 426f3295f6 Ninja: Use more efficient data structures to collect outputs Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8371
| * Ninja: Use more efficient data structures to collect outputsNicolas van Kempen2023-03-281-12/+3
| |
* | Merge topic 'mingw-slashes'Brad King2023-03-281-4/+6
|\ \ | |/ |/| | | | | | | | | | | a67cd9c39c Ninja: Restore slash style for MinGW tools when extra languages are enabled Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8368
| * Ninja: Restore slash style for MinGW tools when extra languages are enabledBrad King2023-03-271-4/+6
| | | | | | | | | | | | | | | | | | | | Since commit f3ca199c9b (cmGlobalNinjaGenerator: Factor out GNU-like command-line detection on Windows, 2023-03-18, v3.26.1~2^2~6), we accidentally "unrecognize" MinGW tools on Windows if a language other than C or CXX is enabled. This causes the wrong slash style to be generated in paths in `build.ninja`. Fixes: #24642
* | Merge topic 'clang-windows-cxx-modules'Brad King2023-03-211-14/+39
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | 1b7c26da49 Ninja: Wrap rules using '>' shell redirection with 'cmd /C' on Windows ffd8537acf Clang: Record Clang 16.0 C++ modules flags only for GNU-like front-end 6013227230 cmGlobalNinjaGenerator: Use forward slashes in clang modmap format on Windows d9d74b5e8a cmDyndepCollation: Drop outdated mentions of CXX_MODULE_INTERNAL_PARTITIONS edab56d29a cmLocalNinjaGenerator: De-duplicate condition for using 'cmd /C' on Windows 8ebe3f92b3 cmGlobalNinjaGenerator: Detect GNU-like command-line for dyndep collator f3ca199c9b cmGlobalNinjaGenerator: Factor out GNU-like command-line detection on Windows f79817fcf0 cmCxxModuleMapper: Use value semantics in path conversion callback ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8346
| * cmGlobalNinjaGenerator: Use forward slashes in clang modmap format on WindowsBrad King2023-03-181-1/+7
| | | | | | | | Issue: #24611
| * cmGlobalNinjaGenerator: Detect GNU-like command-line for dyndep collatorBrad King2023-03-181-6/+16
| | | | | | | | | | This will help the collator choose flags and path styles for modmap files.
| * cmGlobalNinjaGenerator: Factor out GNU-like command-line detection on WindowsBrad King2023-03-181-6/+15
| |
| * cmCxxModuleMapper: Use value semantics in path conversion callbackBrad King2023-03-181-1/+1
| | | | | | | | | | | | The call site already owns a path it doesn't need when the callback returns. Hand ownership to the callback so it can optionally mutate the path without necessarily allocating.
* | Merge topic 'revert-optimize-target-depends-closure'Brad King2023-03-131-66/+50
|\ \ | |/ | | | | | | | | | | 685108a582 Ninja: Revert "Optimize target depends closure" due to performance regression Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8315
| * Ninja: Revert "Optimize target depends closure" due to performance regressionBrad King2023-03-101-66/+50
| | | | | | | | | | | | Revert commit 1f16af01f4 (cmGlobalNinjaGenerator: Optimize target depends closure, 2023-01-17, v3.26.0-rc1~74^2). It regressed generation time for some projects. Revert it pending further investigation.
* | Ninja Multi-Config: Write output path prefixKyle Edwards2023-03-021-10/+15
| | | | | | | | Fixes: #24566
* | Apple: Handle generation and comsuption of text-based stubs (.tbd files)Marc Chevrier2023-03-011-0/+4
| | | | | | | | Fixes: #24123
* | cmGlobalNinjaGenerator: Remove unused memberBrad King2023-02-071-7/+0
|/ | | | | | | | The `DisableCleandead` member was added by commit c5011399c5 (Ninja: Avoid cleandead with dyndep bindings for Fortran module dependencies, 2020-11-10, v3.19.0~15^2) but has not been used since commit 1144d25094 (Merge branch 'backport-ninja-no-cleandead' into ninja-no-cleandead, 2020-12-14, v3.19.2~4^2). Remove it.
* cmGlobalNinjaGenerator: require that dependency info files workBen Boeckel2023-02-011-1/+6
| | | | | Now that only targets expected to have information are listed, all `<LANG>Modules.json` files should exist.
* Ninja: require Ninja 1.11 for C++ module supportBen Boeckel2023-01-231-8/+13
| | | | | See: https://gitlab.kitware.com/cmake/cmake/-/issues/18355#note_1296721 See: https://github.com/ninja-build/ninja/pull/1937
* cmGlobalNinjaGenerator: Optimize target depends closurePierre Testart2023-01-171-50/+66
| | | | | | | | | | Rewrite AppendTargetDependsClosure method to only cache local target outputs, not including outputs from dependencies. Caching all recursive target outputs causes much time to be spent merging sets that have many elements in common (from targets that are included through multiple dependency paths). It is faster to always iterate over all dependencies instead.
* Make vector operations more efficientRose2022-12-101-0/+1
|
* Merge topic 'clang-tidy-export-fixes-dir'Brad King2022-12-071-0/+4
|\ | | | | | | | | | | | | | | 232467eb1c clang-tidy: add <LANG>_CLANG_TIDY_EXPORT_FIXES_DIR property Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7982
| * clang-tidy: add <LANG>_CLANG_TIDY_EXPORT_FIXES_DIR propertyKyle Edwards2022-12-061-0/+4
| | | | | | | | Fixes: #21362
* | cmCxxModuleMapper: support the `clang` module map formatBen Boeckel2022-12-021-0/+2
|/
* cmDyndepCollation: factor out metadata writing for dyndepBen Boeckel2022-11-301-272/+10
|
* cmDyndepCollation: factor out parsing dyndep informationBen Boeckel2022-11-301-93/+4
|
* cmGlobalGenerator: factor out C++ module support checkingBen Boeckel2022-11-231-10/+4
| | | | This will simplify adding support to other generators.
* cmGlobalNinjaGenerator: fix comment typoBen Boeckel2022-11-211-1/+1
|
* Refactor: `cmGlobalGeneratorFactory::GetDocumentation` returns entryAlex Turbov2022-11-171-7/+6
| | | | | | | | | | Before, a documentation entry was in/out parameter. Now it's a normal return value. This also makes possible to eliminate defaulted default ctor for `cmDocumentationEntry` for C++ 11. Also, simplify `cmake::AppendGlobalGeneratorsDocumentation()`.
* EXPORT_COMPILE_COMMANDS: add `output` fieldBen Boeckel2022-10-281-2/+5
| | | | | | | | Also write for all configurations from multi-config generators. This field was added in the Clang 5 documentation and not present in the Clang 4 documentation (sometime between Dec 2016 and Mar 2017 according to `web.archive.org`).
* Merge topic 'ninja-intl-paths'Brad King2022-10-271-13/+0
|\ | | | | | | | | | | | | | | a12050666c Tests: Add case for ninja with non-ascii chars 02a04dd9c7 Ninja: Restore support for non-ascii paths on Windows with ninja<=1.10 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7833
| * Ninja: Restore support for non-ascii paths on Windows with ninja<=1.10Brad King2022-10-261-13/+0
| | | | | | | | | | | | | | | | Revert commit bbdb000c55 (GlobalNinjaGenerator: enlarge file stream buffer, 2022-01-25, v3.23.0-rc1~68^2). Somehow `rdbuf()->pubsetbuf()` is resetting our imbued locale and `cm_codecvt` that handles encoding. Fixes: #24089
* | cmCxxModuleMapper: support MSVC module map formatBen Boeckel2022-08-021-1/+3
| | | | | | | | | | | | 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.
* | cmCxxModuleMapper: track transitive modules for MSVCBen Boeckel2022-08-021-5/+91
| | | | | | | | MSVC needs the transitive closure of module usage to compile.
* | cmGlobalNinjaGenerator: verify that private sources stay privateBen Boeckel2022-07-061-0/+27
| | | | | | | | | | Private source files are not installed or made available, so they must not be required by public module interface units at all.
* | cmGlobalNinjaGenerator: generate install rules for BMI filesBen Boeckel2022-07-061-2/+98
| |
* | cmGlobalNinjaGenerator: generate module property files for each target exportBen Boeckel2022-07-061-0/+111
| |