summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
Commit message (Collapse)AuthorAgeFilesLines
* CMakePresets.json: Fix formatting of --list-presets=allKyle Edwards2022-08-315-0/+50
| | | | | Only print an extra newline after a section if that section was actually printed.
* Merge topic 'file-set-source-group'Kyle Edwards2022-08-255-4/+22
|\ | | | | | | | | | | | | | | | | 970052fedd FILE_SET: Fix source group detection bcc3965813 Tests: Fix VS10Project SourceGroupTreeCMakeLists check Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7609
| * FILE_SET: Fix source group detectionKyle Edwards2022-08-243-0/+17
| | | | | | | | | | | | | | Call MatchChildrenFiles() instead of MatchesFiles() in order to account for files being in subgroups of source groups. Fixes: #23880
| * Tests: Fix VS10Project SourceGroupTreeCMakeLists checkKyle Edwards2022-08-242-4/+5
| | | | | | | | | | Fix an `IN LISTS` loop, fix a variable check, and escape backslashes in the regex used to search for source group names.
* | Merge topic 'fix-presets-test-symlinked-build-dir'Kyle Edwards2022-08-231-0/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | ef0cd3dc40 Tests: Fix CMakePresets test in unusual environments Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7598
| * | Tests: Fix CMakePresets test in unusual environmentsMatthew Woehlke2022-08-191-0/+1
| | | | | | | | | | | | | | | | | | Tweak test in RunCMake/CMakePresets/GoodNoSCache.cmake to use the canonical directory for comparison. This avoids an effectively spurious test failure if the overall CMake build directory is a symlink.
* | | Merge topic 'block-management'Brad King2022-08-2349-0/+362
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 44a2f3f332 Add new flow-control commands for variables and policies scopes management 604993248f cmMakefile::VariablePushPop: helper class to manage variable scopes 3d94ee0e03 cmMakefile::RaiseScope: Add support for cmValue argument 553da0685f cmFunctionBlocker: Add handling of close block without parameters. 02c067dee5 cm::enum_set: fix various bugs Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: John Ericson <git@johnericson.me> Merge-request: !7575
| * | | Add new flow-control commands for variables and policies scopes managementMarc Chevrier2022-08-2249-0/+362
| |/ / | | | | | | | | | | | | | | | | | | Add block() and endblock() commands offering the capability to create new scopes for variables and/or policies. Fixes: #20171
* | | target_*: Fix cross-directory call backtracesBrad King2022-08-221-47/+11
| | | | | | | | | | | | | | | | | | | | | Record the call-site backtrace, not the current backtrace of the target's directory. Fixes: #23873
* | | Tests: Add FileAPI case for cross-directory target_* commandsBrad King2022-08-2222-33/+247
|/ / | | | | | | | | | | | | | | | | | | | | The backtraces for some of the commands incorrectly come from the target's directory instead of the caller's directory. Expect the incorrect backtraces in test results for now. Increase the minimum required version of CMake in the test case to enable policy CMP0079 to support cross-directory calls. Issue: #23873
* | Tests: Fix RunCMake.FileAPI test with jsoncpp < 1.7.5Brad King2022-08-183-1/+12
| | | | | | | | | | | | | | Prior to jsoncpp commit `126bdc2b05` (Reject extra chars if strictRoot, 2016-08-21, 1.7.5~2), it did not diagnose trailing characters in the input after a JSON value. Teach our corresponding test case to tolerate the old behavior.
* | 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