summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'lang-std-flag-order'Brad King2022-11-217-38/+77
|\ | | | | | | | | | | | | | | | | | | a1c20b08b4 cmLocalGenerator: Inline AddCompilerRequirementFlag in only call site 914571a042 Place language standard flags just after CMAKE_<LANG>_FLAGS ad16ae5c70 VS: Recognize -std: flag in CMAKE_C_FLAGS in target with C++ sources Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7931
| * cmLocalGenerator: Inline AddCompilerRequirementFlag in only call siteBrad King2022-11-182-24/+13
| | | | | | | | | | | | The call site in `AddLanguageFlags` is now the "one true place" for adding language standard flags. Inline the helper to reduce risk of adding other call sites later.
| * Place language standard flags just after CMAKE_<LANG>_FLAGSBrad King2022-11-185-15/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we added the language standard flag near the end of all options, even after those added by `add_compile_options` and friends. However, on some compilers such as MSVC, the `-std` flag may reset defaults for flags that precede it on the command line. Move the language standard flag to before all other flags that CMake adds for other abstractions, and before those added by `add_compile_options`. `CMAKE_<LANG>_FLAGS` should still precede the language flags though, because they are meant to be treated as language-wide modifications to the compiler defaults, similar to `$CC $CFLAGS`. Fixes: #23860 Fixes: #24170
| * VS: Recognize -std: flag in CMAKE_C_FLAGS in target with C++ sourcesBrad King2022-11-181-0/+2
| | | | | | | | | | | | Extend commit b325484928 (VS: Fix C language standard in target with C++ sources, 2020-09-28, v3.19.0-rc1~74^2) to account for users placing a `-std:` flag in `CMAKE_C_FLAGS`.
* | Merge topic 'clang-tidy-module-cmstrlen-check-sizeof'Brad King2022-11-218-11/+96
|\ \ | | | | | | | | | | | | | | | | | | | | | 830eed374d CMake: fix sizeof string literal violations c6368a23fe clang-tidy module: look for sizeof string literal in cmStrLen() check Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7927
| * | CMake: fix sizeof string literal violationsKyle Edwards2022-11-184-7/+6
| | |
| * | clang-tidy module: look for sizeof string literal in cmStrLen() checkKyle Edwards2022-11-184-4/+90
| | |
* | | Merge topic 'cxx-scanning-properties'Brad King2022-11-2117-56/+319
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | a02d792c6e cxxmodules: add properties to control scanning 008c09d6db cmNinjaTargetGenerator: factor out determining the fileset of a source Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7935
| * | | cxxmodules: add properties to control scanningBen Boeckel2022-11-1817-9/+245
| | | | | | | | | | | | | | | | | | | | | | | | The `CXX_SCAN_FOR_MODULES` property may be used to control scanning for targets and for source files rather than assuming "C++20 always needs to be scanned".
| * | | cmNinjaTargetGenerator: factor out determining the fileset of a sourceBen Boeckel2022-11-172-47/+74
| | | | | | | | | | | | | | | | | | | | This information is now needed in more than one place, so factor the logic out and use it to build a cache.
* | | | Merge topic 'test-file-download'Brad King2022-11-2158-310/+180
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 28513a5fba Tests: Honor CMake_TEST_NO_NETWORK in RunCMake.file-DOWNLOAD 52b9c7b958 Tests: Move CMake.FileDownload cases into RunCMake.file-DOWNLOAD 9dda7c276c Tests: Factor out common helper in RunCMake.file-DOWNLOAD cases d6af54c473 Tests: Factor out a RunCMake.file-DOWNLOAD test Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7937
| * | | | Tests: Honor CMake_TEST_NO_NETWORK in RunCMake.file-DOWNLOADBrad King2022-11-182-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the test uses `file://` URLs instead of hitting the network. However, a case covering an invalid hostname does try to make a real connection, expecting it to fail DNS resolution. Turn off that case if we are asked not to hit the network during testing.
| * | | | Tests: Move CMake.FileDownload cases into RunCMake.file-DOWNLOADBrad King2022-11-1821-253/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RunCMake infrastructure is more well-suited to check the results of each case. It can also report more precisely what went wrong when a case fails.
| * | | | Tests: Factor out common helper in RunCMake.file-DOWNLOAD casesBrad King2022-11-1810-27/+34
| | | | |
| * | | | Tests: Factor out a RunCMake.file-DOWNLOAD testBrad King2022-11-1732-25/+31
| |/ / / | | | | | | | | | | | | Move the `DOWNLOAD-*` cases over from the `RunCMake.file` test.
* | | | Merge topic 'ci-flang'Brad King2022-11-218-0/+47
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 99370e990e gitlab-ci: add jobs to test with Clang and LLVMFlang on Fedora Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !7939
| * | | | gitlab-ci: add jobs to test with Clang and LLVMFlang on FedoraBrad King2022-11-188-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already have `t:debian10-{makefiles,ninja}-clang` jobs covering old versions of Clang with Makefile and Ninja generators. Complement them with new `t:fedora37-{makefiles,ninja}-clang` jobs covering recent versions of Clang. Fedora 37 now packages LLVMFlang, so enable Fortran tests with that compiler too. Issue: #22387
* | | | | CMake Nightly Date StampKitware Robot2022-11-211-1/+1
| | | | |
* | | | | CMake Nightly Date StampKitware Robot2022-11-201-1/+1
| | | | |
* | | | | CMake Nightly Date StampKitware Robot2022-11-191-1/+1
| |_|_|/ |/| | |
* | | | Merge topic 'file-COPY_FILE-retry'Brad King2022-11-187-13/+53
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d34986036f ExternalData: Improve robustness on Windows to copy a data object to a file efa9eec040 file(COPY_FILE): Add option to retry on Windows if input access fails fa518188d8 cmSystemTools: Remove unused CopySingleFile overload Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7934
| * | | ExternalData: Improve robustness on Windows to copy a data object to a fileBrad King2022-11-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an external data object was recently created on disk, perhaps fetched by the current process or another process, it may be inaccessible on Windows for a short time. Tell our `file(COPY_FILE)` call to retry a few times to copy the object to the final file path. Hopefully this will resolve our long-standing spurious failures of the `Module.ExternalData` test on Windows.
| * | | file(COPY_FILE): Add option to retry on Windows if input access failsBrad King2022-11-176-3/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, a file may be inaccessible for a short time after it is created. This occurs for various reasons, including indexing, antivirus tools, and NTFS's asynchronous semantics. Add an `INPUT_MAY_BE_RECENT` option to tell CMake that the input file may have been recently created so that we can retry a few times to read it.
| * | | cmSystemTools: Remove unused CopySingleFile overloadBrad King2022-11-172-9/+0
| | |/ | |/|
* | | Merge topic 'clang-tidy-module-pragma-once-check'Brad King2022-11-1818-13/+515
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 91a7c0b51c CMake: fix violations of #pragma once check aa0c99c55c clang-tidy module: add test for #pragma once check c9af6f2ff6 clang-tidy module: add #pragma once check 68a4d97da7 clang-tidy module: allow header files in test cases Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !7933
| * | | CMake: fix violations of #pragma once checkKyle Edwards2022-11-173-1/+5
| | | |
| * | | clang-tidy module: add test for #pragma once checkSean Orner2022-11-1710-0/+79
| | | |
| * | | clang-tidy module: add #pragma once checkIgor-Mikhail-Valentin Glebov2022-11-174-0/+389
| | | | | | | | | | | | | | | | Co-Authored-by: Kyle Edwards <kyle.edwards@kitware.com>
| * | | clang-tidy module: allow header files in test casesKyle Edwards2022-11-171-12/+42
| |/ /
* | | Merge topic 'ninja-swiftmodule-no-exe'Brad King2022-11-185-1/+16
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 38c8807c5a Ninja: Avoid re-linking a Swift executable on every build Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7901
| * | | Ninja: Avoid re-linking a Swift executable on every buildEvan Wilde2022-11-175-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | Swift doesn't emit swiftmodules for executables, so we shouldn't put it in dependency graph. Ninja sees the "missing" dependency and always tries to rebuild/re-link the target.
* | | | Merge topic 'nvhpc_fortran_extensions'Brad King2022-11-182-1/+4
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a98a82f24b Fortran: Support cuf file extension when using nvfortran Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7925
| * | | | Fortran: Support cuf file extension when using nvfortranRobert Maynard2022-11-162-1/+4
| | | | |
* | | | | Merge topic 'refactor-cmDocumentation'Brad King2022-11-1842-802/+663
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6e3e8827fa Refactor: `cmGlobalGeneratorFactory::GetDocumentation` returns entry e99a4acbcd cmGlobalGeneratorFactory.h: Simplify returning default values 7daadd304f cmake.cxx: Simplify `cmake::AppendExtraGeneratorsDocumentation()` df2047c2ac cpack.cxx: Optimize calls to `std::osteam::operator<<` f6180485bb cpack.cxx: Eliminate redundant `if` d7c183f35c cpack.cxx: Deduplicate "Generators" section creation code 9c06f0dd71 cmake.cxx: Move `static` functions to an anonymous namespace 69918b07e1 cmDocumentationEntry: Drop all user provided ctors for C++ >= 14 ... Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7605
| * | | | | Refactor: `cmGlobalGeneratorFactory::GetDocumentation` returns entryAlex Turbov2022-11-1728-124/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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()`.
| * | | | | cmGlobalGeneratorFactory.h: Simplify returning default valuesAlex Turbov2022-11-171-7/+5
| | | | | |
| * | | | | cmake.cxx: Simplify `cmake::AppendExtraGeneratorsDocumentation()`Alex Turbov2022-11-171-12/+5
| | | | | |
| * | | | | cpack.cxx: Optimize calls to `std::osteam::operator<<`Alex Turbov2022-11-171-64/+53
| | | | | |
| * | | | | cpack.cxx: Eliminate redundant `if`Alex Turbov2022-11-171-5/+1
| | | | | |
| * | | | | cpack.cxx: Deduplicate "Generators" section creation codeAlex Turbov2022-11-171-21/+24
| | | | | |
| * | | | | cmake.cxx: Move `static` functions to an anonymous namespaceAlex Turbov2022-11-171-100/+97
| | | | | |
| * | | | | cmDocumentationEntry: Drop all user provided ctors for C++ >= 14Alex Turbov2022-11-178-34/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need for them cuz: - the last field has a default value - all static instances use 2 arguments convertible to `std::string` - "dynamic" instances used for _Generator_ doc entries access fields diectly using default constructed instance Moreover, compiler may generate move ctor/assign when needed.
| * | | | | cmake.cxx: Optimize calls to `std::osteam::operator<<`Alex Turbov2022-11-171-28/+27
| | | | | |
| * | | | | cmDocumentationFormatter: Hide internal methods into `private` sectionAlex Turbov2022-11-171-4/+5
| | | | | |
| * | | | | cmDocumentation: Drop unused `SetSections` methodAlex Turbov2022-11-172-8/+0
| | | | | |
| * | | | | cmDocumentation: `char*[][2]` → `cmDocumentationEntry[N]`Alex Turbov2022-11-1713-161/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use fixed size arrays of `cmDocumentationEntry` items instead of open arrays of two `char` pointers when describe program options help screens. Also, drop `const char*[][2]` overloads of methods of `cmDocumentation` and `cmDocumentationSection` classes in the sake of generic (template) appenders introduced earlier.
| * | | | | CMakeSetup.cxx: Use anonymous namespace instead of `static`Alex Turbov2022-11-171-5/+9
| | | | | |
| * | | | | ccmake.cxx: Use anonymous namespace instead of `static`Alex Turbov2022-11-171-10/+10
| | | | | |
| * | | | | ctest.cxx: Eliminate redundand trenary operatorAlex Turbov2022-11-173-3/+3
| | | | | |
| * | | | | ctest.cxx: Optimize `std::ostream::operator<<` callsAlex Turbov2022-11-171-6/+4
| | | | | |