summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'cmake-E-env-modify'Brad King2022-08-1814-0/+83
|\ | | | | | | | | | | | | | | c9d70a7cc3 cmake -E env: Add --modify flag Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7571
| * cmake -E env: Add --modify flagAlex Reinking2022-08-1714-0/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When `cmake -E env` is given the `--modify` flag, try to parse the following argument as an `ENVIRONMENT_MODIFICATION` operation and apply it to the environment. This generalizes `--unset=`: 1. When implementing `ENVIRONMENT_MODIFICATION` features for other CMake commands, the `MYVAR=OP:VALUE` strings do not need to be translated to OP-specific flags. 2. This provides a natural and consistent extension point to introduce new operations without introducing very many flags. 3. Users need to learn only one syntax to access the same functionality. There is one difference between the behavior here as compared to CTest's interpretation of the `ENVIRONMENT_MODIFICATION` test property. The `MYVAR=reset:` command when run in `cmake -E env` will reset `MYVAR` to whatever its value was when `cmake -E env` launched, rather than try to checkpoint after plain `MYVAR=VALUE` options. This makes `MYVAR=VALUE` and `--modify MYVAR=set:VALUE` semantically equivalent.
* | try_compile: Don't accept try_run argumentsMatthew Woehlke2022-08-171-8/+13
|/ | | | | | | | | | | Modify cmCoreTryCompile to only recognize try_run arguments when actually parsing try_run. (The old behavior was to recognize try_run arguments for try_compile also and then complain.) This has a small chance that a try_run keyword will be consumed as part of a multi-valued keyword argument. However, this behavior is more consistent with other commands, as we don't normally treat keywords as universally reserved. Also, the code is noticeably simplified.
* Merge topic 'refactor-environment-modification'Brad King2022-08-167-0/+26
|\ | | | | | | | | | | | | | | | | | | | | a5d45e685f Tests: Add case for ENVIRONMENT_MODIFICATION property OP=reset behavior e2854b4fa2 cmCTestRunTest: Implement the ENVIRONMENT test property with EnvDiff too bfa1c5285b cmSystemTools: Add EnvDiff class to hold ENVIRONMENT_MODIFICATION logic a0b1c4ee90 cmCTestRunTest: Simplify by using GetSystemPathlistSeparator 4e6cbb1f13 cmCTestRunTest: Remove unnecessary CMAKE_BOOTSTRAP guard Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7572
| * Tests: Add case for ENVIRONMENT_MODIFICATION property OP=reset behaviorAlex Reinking2022-08-157-0/+26
| | | | | | | | | | | | | | | | | | When processing the reset operation in the context of a CTest `ENVIRONMENT_MODIFICATION` property, the value the variable is reset to is the one it had after `ENVIRONMENT` was processed, not before. This was broken once during refactoring and is subtle enough that it should be tested.
* | Merge topic 'export-no-shdeps'Brad King2022-08-169-0/+64
|\ \ | |/ |/| | | | | | | | | 0ebff0d61a export: Restore exclusion of private shared library dependencies from checks Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7557
| * export: Restore exclusion of private shared library dependencies from checksBrad King2022-08-159-0/+64
| | | | | | | | | | | | | | | | | | | | | | Refactoring in commit 8c65b7042e (cmExportFileGenerator: Simplify collection of targets missing from export set, 2022-04-11, v3.24.0-rc1~281^2) accidentally dropped the behavior change from commit 0ad2a1c181 (Export: Never treat private link libraries as public package dependencies., 2013-09-24, v3.0.0-rc1~559^2). Restore the behavior and add a test. Fixes: #23838
| * Merge topic 'fetchcontent-set-CMAKE_VERIFY_INTERFACE_HEADER_SETS' into ↵Brad King2022-08-045-0/+31
| |\ | | | | | | | | | | | | | | | | | | | | | | | | release-3.24 2a9cc3e8e8 FetchContent: Disable header set verification for dependencies Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7535
* | \ Merge topic 'ExternalProject-BUILD_ALWAYS-install'Brad King2022-08-104-0/+50
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 81fd0d6e26 ExternalProject: Fix install on BUILD_ALWAYS+BUILD_BYPRODUCTS with Ninja d9e88721ad ExternalProject: Add test case for BUILD_ALWAYS Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7546
| * | | ExternalProject: Fix install on BUILD_ALWAYS+BUILD_BYPRODUCTS with NinjaMaik Nijhuis2022-08-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `BUILD_BYPRODUCTS` option causes the ExternalProject's `build` step in `build.ninja` to have `restat = 1`, so its "always out-of-date" status caused by `BUILD_ALWAYS` does not propagate to the `install` step. Mark the latter step as explicitly always out-of-date too. Fixes: #23820
| * | | ExternalProject: Add test case for BUILD_ALWAYSBrad King2022-08-094-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | We did not previously have a dedicated explicit test for this option. Issue: #23820
* | | | Merge topic 'string-JSON-error-typo'Brad King2022-08-051-3/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e0d3e6e147 string(JSON): Fix typo in error message Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7547
| * | | | string(JSON): Fix typo in error messageSean Kahler2022-08-041-3/+3
| | | | | | | | | | | | | | | | | | | | `s/then/than/` in a comparison.
* | | | | Merge topic 'find_package-one-more-path'Brad King2022-08-053-0/+15
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 19366408fe cmFindPackageCommand: Protect overrides of `cmDirectoryListGenerator` e55c154c5b cmFindPackageCommand: Add one more search path Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7542
| * | | | cmFindPackageCommand: Add one more search pathAlex Turbov2022-08-043-0/+15
| |/ / / | | | | | | | | | | | | | | | | | | | | 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).*/`.
* | | | Merge topic 'cmake-preset-error-reporting'Brad King2022-08-044-4/+24
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | presets: Add basic error forwarding from cmake preset json parserSankhesh Jhaveri2022-08-034-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | Print errors only if there are errors. Add filename for better introspection, particularly for FileNotFound errors with presets.
* | | | | Merge topic 'fetchcontent-set-CMAKE_VERIFY_INTERFACE_HEADER_SETS'Brad King2022-08-045-0/+31
|\ \ \ \ \ | |_|/ / / |/| | | / | | |_|/ | |/| | | | | | | | | | 2a9cc3e8e8 FetchContent: Disable header set verification for dependencies Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7535
| * | | FetchContent: Disable header set verification for dependenciesCraig Scott2022-08-035-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CMAKE_VERIFY_INTERFACE_HEADER_SETS variable is intended to be under the control of the user. It doesn't discriminate between header sets defined in the main project and those defined by dependencies brought into the build directly via FetchContent. Developers will usually only be interested in verifying the main project's header sets, not those from dependencies. Make the variable effectively only enable header set verification of the main project by turning it off during FetchContent_MakeAvailable() calls. The user still has variables like CMAKE_PROJECT_INCLUDE and CMAKE_PROJECT_<projectName>_INCLUDE available to them if they want to enable verification of all or specific dependencies respectively. Fixes: #23808
* | | | Merge topic 'all-verify-interface-header-sets'Kyle Edwards2022-08-037-0/+34
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | 83e44002ae VERIFY_INTERFACE_HEADER_SETS: Add verification target for all Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7536
| * | | VERIFY_INTERFACE_HEADER_SETS: Add verification target for allKyle Edwards2022-08-037-0/+34
| |/ / | | | | | | | | | Fixes: #23802
| * | Merge topic 'verify-interface-header-sets-interface-library-source-language' ↵Brad King2022-07-282-0/+5
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into release-3.24 41f15193e5 VERIFY_INTERFACE_HEADER_SETS: Fall back to global languages Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7517
* | \ \ Merge topic 'try_compile-cleanup'Brad King2022-08-0335-19/+130
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | cmCoreTryCompile: Port to cmArgumentParserBrad King2022-08-0217-91/+74
| | | | |
| * | | | Tests: Add RunCMake.try_compile case for try_run-only argsBrad King2022-08-023-0/+83
| | | | |
| * | | | Tests: Add RunCMake.try_run cases for missing keyword argumentsBrad King2022-08-0123-13/+58
| | | | |
* | | | | Merge topic 'cpp-named-module-support-msvc'Brad King2022-08-0312-3/+119
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | | RunCMake/CXXModules: add a "deep-chain" testBen Boeckel2022-08-029-0/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This tests that transitive usages are propogated properly across long import chains between targets.
| * | | | | RunCMake/CXXModules: support MSVC extensionsBen Boeckel2022-08-021-1/+1
| | | | | |
| * | | | | RunCMake/CXXModules: fix partition importing syntaxBen Boeckel2022-07-262-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Apparently GCC accepts the ill-formed prior syntax.
* | | | | | Merge topic 'cuda_add_lto_support'Brad King2022-08-031-2/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | | | CUDA: Add Device LTO support for nvccRobert Maynard2022-07-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #22200
* | | | | | | Merge topic 'find_package-refactor-path-generation'Brad King2022-08-0350-0/+238
|\ \ \ \ \ \ \ | |_|_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | | | Tests: Add more find_package search path casesAlex Turbov2022-07-1150-0/+238
| |/ / / / /
* | | | | | cmCMakePathCommand: Enforce non-empty string arguments via binding typeBrad King2022-07-282-0/+7
| | | | | |
* | | | | | Merge topic 'verify-interface-header-sets-interface-library-source-language'Brad King2022-07-282-0/+5
|\ \ \ \ \ \ | | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 41f15193e5 VERIFY_INTERFACE_HEADER_SETS: Fall back to global languages Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7517
| * | | | | VERIFY_INTERFACE_HEADER_SETS: Fall back to global languagesKyle Edwards2022-07-272-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a target doesn't have any source files, fall back to the global list of enabled languages to determine the language of the header file to verify. Fixes: #23774
* | | | | | Merge topic 'verify-interface-header-sets-add-compile-definitions'Brad King2022-07-282-0/+6
|\ \ \ \ \ \ | | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 27fd172d8d VERIFY_INTERFACE_HEADER_SETS: Finalize compile info for verify targets 626e641a19 cmTarget: Factor out FinalizeTargetCompileInfo() Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7516
| * | | | | VERIFY_INTERFACE_HEADER_SETS: Finalize compile info for verify targetsKyle Edwards2022-07-272-0/+6
| |/ / / / | | | | | | | | | | | | | | | Fixes: #23732
* | | | | Tests: Add RunCMake.try_compile case covering empty value argumentsBrad King2022-07-264-0/+15
| | | | |
* | | | | Tests: Add RunCMake.try_compile case covering list arguments with no valuesBrad King2022-07-262-0/+9
| | | | |
* | | | | try_compile: Fail earlier when bindir is not an absolute pathBrad King2022-07-2614-0/+32
| |_|/ / |/| | | | | | | | | | | | | | | If the bindir is not an absolute path, other errors occur later. Fail early with a clear error in this case.
* | | | Merge topic 'cmake-help-flags-after-dashdash'Brad King2022-07-253-3/+5
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | 14a0e750cb cmake: In -P mode ignore flags like `--version` after `--` Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7496
| * | | cmake: In -P mode ignore flags like `--version` after `--`Robert Maynard2022-07-223-3/+5
| | | | | | | | | | | | | | | | Fixes: #21031
* | | | Merge topic 'cmake-P-path-args'Brad King2022-07-253-0/+13
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | febe3190f0 Merge branch 'backport-3.23-cmake-P-path-args' 846a650ff7 cmake: In -P mode ignore extra paths on the command line c362cba566 cmake: simplify to a single source of truth of working mode 261fa5db39 cmake: In -P mode ignore extra paths on the command line 314135cdf1 cmake: simplify to a single source of truth of working mode Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7494
| * | | cmake: In -P mode ignore extra paths on the command lineRobert Maynard2022-07-223-0/+13
| | | | | | | | | | | | | | | | Fixes: #23748
* | | | Merge topic 'command-arg-parser-result'Brad King2022-07-2556-109/+157
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8a18e82e95 cmCMakePathCommand: Report keyword errors via argument parser results 7e4a9afa1a cmCMakeHost*Command: Report keyword errors via argument parser results 74ec6b63c2 cmFileCommand: Report keyword errors via argument parser results e56108f629 cmExecuteProcessCommand: Report keyword errors via argument parser results b7c82b26b0 cmArgumentParser: Capture keyword errors in parse results 50876f6b9a cmArgumentParser: Add structure to capture operational results 5955ec1992 cmArgumentParser: Store keyword action map with explicit name 119e1f7fbc cmArgumentParser: Factor out common static/dynamic implementation ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7488
| * | | | cmCMakePathCommand: Report keyword errors via argument parser resultsBrad King2022-07-222-2/+6
| | | | |
| * | | | cmCMakeHost*Command: Report keyword errors via argument parser resultsBrad King2022-07-222-4/+8
| | | | |
| * | | | cmFileCommand: Report keyword errors via argument parser resultsBrad King2022-07-2211-26/+65
| | | | |