summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
Commit message (Collapse)AuthorAgeFilesLines
* find_package: Add variable to make package REQUIREDEugene Shalygin2021-07-087-0/+43
| | | | | | | | | | | | | | Add a `CMAKE_REQUIRE_FIND_PACKAGE_<PackageName>` variable is complement to `CMAKE_DISABLE_FIND_PACKAGE_<PackageName>` with just the opposite behaviour: it turns non-required find_package call into the required one. While optional package dependencies usually result in simple and clean build logic, sometimes people want to be sure those optional dependencies will be found and used. Examples are reproducible builds and build instructions for 3rd parties. People choose to make find_package calls REQUIRED and put them behind an option(). Such workarounds blend build logic with build environment management and do not look elegant.
* Merge topic 'cmake-presets-list-no-generator'Brad King2021-07-075-13/+20
|\ | | | | | | | | | | | | d9a3c9fad5 CMakePresets.json: Make --list-presets show presets with no generator Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6314
| * CMakePresets.json: Make --list-presets show presets with no generatorKyle Edwards2021-07-065-13/+20
| | | | | | | | Fixes: #22389
* | Merge topic 'ci-fixups'Brad King2021-07-0618-21/+42
|\ \ | |/ | | | | | | | | | | | | 46c89c77de gitlab-ci: Rename CI config variable to avoid conflict with CMAKE_BUILD_TYPE 3ede66e17a Tests: Fix newline matching in several RunCMake.* cases Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6298
| * Tests: Fix newline matching in several RunCMake.* casesBrad King2021-07-0218-21/+42
| | | | | | | | | | | | | | | | The RunCMake infrastructure's `*-stdout.txt` expected output files interpret `\n` as a `\` and `n` rather than a newline. Use a literal newline instead. Otherwise the cases that were trying to match any configuration name via `[^\n]*` would fail on `RelWithDebInfo` because it contains the letter `n`.
| * Merge topic 'CMP0126-WARNING' into release-3.21Brad King2021-06-304-0/+20
| |\ | | | | | | | | | | | | | | | | | | | | | 16208ac113 CMP0126: Add control for warnings Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !6282
* | \ Merge topic 'ctest_not_dart'Brad King2021-07-023-5/+32
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0962cbf21d help: update ctest attached file example 5489ce74b3 ctest: support <CTestMeasurement> for runtime measurements 7817aa6fa4 ctest: improve test for runtime labels Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6296
| * | | ctest: support <CTestMeasurement> for runtime measurementsZack Galbreath2021-07-012-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach CTest to parse output for <CTestMeasurement> in addition to <DartMeasurement> for measurements defined at runtime. Use a new class (cmCTestTestMeasurementXMLParser) derived from cmXMLParser to parse the data and attributes these XML elements. This is an improvement over our previous approach of using a series of regular expressions. As part of this commit we also rename some member variables and methods to make their purpose more clear. DartStuff -> AllTestMeasurementsRegex DartStuff1 -> SingleTestMeasurementRegex DartString -> TestMeasurementsOutput GenerateDartOutput() -> GenerateCTestXML() GenerateRegressionImages() -> RecordCustomTestMeasurements() cmCTestRunTest::DartProcessing() -> ParseOutputForMeasurements()
| * | | ctest: improve test for runtime labelsZack Galbreath2021-07-011-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | Check for the whole expected output string rather than particular substrings. This verifies that newlines are stripped for any <CTestLabel> lines found in the test output.
* | | | Merge topic 'env-init-configs'Brad King2021-07-019-0/+34
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ef56eefc9b cmake: Allow CMAKE_CONFIGURATION_TYPES to be set by environment variable e216b9bbd3 cmake: Allow CMAKE_BUILD_TYPE to be set by environment variable 6986a382a9 Help: Document when CMAKE_BUILD_TYPE and CMAKE_CONFIGURATION_TYPES are set e96169a3ec Help: Cross-reference CMAKE_CONFIGURATION_TYPES from CMAKE_BUILD_TYPE 03bd9c4c10 cmMakefile: Add helper to initialize CMAKE_CONFIGURATION_TYPES Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6291
| * | | | cmake: Allow CMAKE_CONFIGURATION_TYPES to be set by environment variableBrad King2021-06-305-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When no `CMAKE_CONFIGURATION_TYPES` is explicitly specified while creating a new build tree, check for an environment variable of the same name. Issue: #20983
| * | | | cmake: Allow CMAKE_BUILD_TYPE to be set by environment variableBrad King2021-06-305-0/+18
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | When no `CMAKE_BUILD_TYPE` is explicitly specified while creating a new build tree, check for an environment variable of the same name. Issue: #20983
* | | | Merge topic 'post-rel-dev'Brad King2021-07-015-0/+44
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2c209097b9 Configure CMake itself with policies through CMake 3.20 83a3db5631 export: Increase maximum policy version in exported files to 3.20 d76cb12905 Add deprecation warnings for policies CMP0088 and below Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6290
| * | | | Add deprecation warnings for policies CMP0088 and belowBrad King2021-06-305-0/+44
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | The OLD behaviors of all policies are deprecated, but only by documentation. Add an explicit deprecation diagnostic for policies introduced in CMake 3.14 and below to encourage projects to port away from setting policies to OLD.
* | | | Merge topic 'cpackdeb-md5sums-order'Brad King2021-07-013-2/+5
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a0d3494afa Tests: update MD5SUMS test to have several files 9028195a22 CPackDeb: sort package files before generating deb file Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Kyle Edwards <kyle.edwards@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !6287
| * | | Tests: update MD5SUMS test to have several filesAlexey Rogachevskiy2021-06-303-2/+5
| | | | | | | | | | | | | | | | | | | | The test is now updated to check the order of files in the md5sums.
* | | | Merge topic 'CMP0126-WARNING'Brad King2021-06-304-0/+20
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 616972197a Merge branch 'backport-3.21-CMP0126-WARNING' into CMP0126-WARNING 16208ac113 CMP0126: Add control for warnings Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !6282
| * \ \ \ Merge branch 'backport-3.21-CMP0126-WARNING' into CMP0126-WARNINGMarc Chevrier2021-06-294-0/+20
| |\ \ \ \ | | | |_|/ | | |/| |
| | * | | CMP0126: Add control for warningsMarc Chevrier2021-06-294-0/+20
| | | | | | | | | | | | | | | | | | | | Fixes: #22353
* | | | | Merge topic 'rpm-suggests'Brad King2021-06-302-11/+31
|\ \ \ \ \ | |_|_|/ / |/| | | / | | |_|/ | |/| | | | | | | | | | 9b53eca317 CPack/RPM: Fix weak dep support Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6274
| * | | CPack/RPM: Fix weak dep supportAlex Sweet2021-06-292-11/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RPM 4.11.3 for el7 contains backported support for the RPM weak dep tags. It only supports querying those tags, but rpmbuild can not make use of them. Since CPack relies on rpmbuild --querytags to check for support, this commit switches to rpm --suggests to check for support of weak dependencies. Fixes: #22350
* | | | Merge topic 'tests-tolerate-NINJA_STATUS'Brad King2021-06-292-0/+6
|\ \ \ \ | |/ / / | | / / | |/ / |/| | | | | | | | 63177678d0 Tests/RunCMake/Ninja.*: Sanitize NINJA_STATUS since we expect default behavior Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6271
| * | Tests/RunCMake/Ninja.*: Sanitize NINJA_STATUS since we expect default behaviorNAKAMURA Takumi2021-06-282-0/+6
| |/ | | | | | | FYI, NINJA_STATUS is "[%f/%t] " by default.
| * Merge topic 'vs2022' into release-3.21Brad King2021-06-284-9/+9
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | 93c718791e VS: Use 64-bit MSBuild in VS 2022 c46b265839 VS: Add Visual Studio 17 2022 generator b610b7a35c VS: Update v142 CL flag table for VS 17.0 Preview 1 43375c6418 Help: Remove unnecessary Sphinx versionadded markup in VS toolset selection Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6268
* | \ Merge topic 'target_compile_features-only-apply-to-enabled-languages'Brad King2021-06-281-4/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | a3cafa4237 compile_features: Ignore features that map to languages that aren't enabled Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6255
| * | | compile_features: Ignore features that map to languages that aren't enabledRobert Maynard2021-06-251-4/+2
| | | | | | | | | | | | | | | | | | | | Remove the Cuda/ConsumeCompileFeatures test as it only existed to validate that using `cxx_std_XY` would cause the paired language (CUDA) to also build in mode XY.
* | | | Merge topic 'vs2022'Brad King2021-06-284-9/+9
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 93c718791e VS: Use 64-bit MSBuild in VS 2022 c46b265839 VS: Add Visual Studio 17 2022 generator b610b7a35c VS: Update v142 CL flag table for VS 17.0 Preview 1 43375c6418 Help: Remove unnecessary Sphinx versionadded markup in VS toolset selection Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6268
| * | | VS: Add Visual Studio 17 2022 generatorBrad King2021-06-254-9/+9
| | | | | | | | | | | | | | | | Fixes: #22339
* | | | Merge topic 'test-RunCMake.GenEx-names'Brad King2021-06-28221-176/+176
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | a95cbf3890 Tests: Shorten RunCMake.GenEx-* case names Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6269
| * | | Tests: Shorten RunCMake.GenEx-* case namesBrad King2021-06-25221-176/+176
| |/ / | | | | | | | | | Reduce the length of the longest path on disk needed by the tests.
* | | cmELF: Include the ELF parsing code unconditionallyAlex Richardson2021-06-242-6/+2
| | | | | | | | | | | | | | | Now that the ELF definitions are provided on all platforms there is no need to keep the CMake_USE_ELF_PARSER option.
* | | cmELF: Allow building without system ELF headersAlex Richardson2021-06-242-3/+3
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use ELF headers vendored in `Utilities/cmelf` to get the ELF constants and types. Using the same ELF definition header for all compilation targets allows removing some #ifdefs depending on the host OS since we know all required ELF constants will always be present. To reduce the size of this commit, the CMake_USE_ELF_PARSER definite will be removed in a separate commit. This allows me to use CMAKE_BUILD_WITH_INSTALL_RPATH=False and the Ninja generator on macOS, whereas before it would always give me the following error message (despite cross-compiling for an ELF-based platform): ``` The install of the <name> target requires changing an RPATH from the build tree, but this is not supported with the Ninja generator unless on an ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking step. ```
* | Merge topic 'FindPkgConfig-PKG_CONFIG-args'Brad King2021-06-214-0/+54
|\ \ | | | | | | | | | | | | | | | | | | 35d3e00e4e FindPkgConfig: split args if loaded from environment Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6222
| * | FindPkgConfig: split args if loaded from environmentChristopher Degawa2021-06-184-0/+54
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's common for some people to use the PKG_CONFIG environment variable to not only load a custom pkg-config/pkgconf but also to load some default arguments such as `--static` or `--keep-system-libs` which often worked since shell scripts would call `$PKG_CONFIG --libs pkg` without quotes, but this breaks FindPkgConfig since it uses the full string as `argv[0]` and might try looking for a binary called `pkgconf --static`, instead of looking for `pkgconf` and adding `--static` as the `argv[1]` Additionally adds RunCMake.FindPkgConfig ARGN test case Fixes: #22305 Signed-off-by: Christopher Degawa <ccom@randomderp.com>
* | ctest: allow test output to add labelsZack Galbreath2021-06-172-0/+41
|/ | | | | Parse test output for <CTestLabel>...</CTestLabel>. If found, add this value to the list of labels associated with this test.
* Merge topic 'fix-flow-control-override'Brad King2021-06-173-0/+5
|\ | | | | | | | | | | | | c017098d4d CMake: Allow override of unexpected non-flow-control commands Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6232
| * CMake: Allow override of unexpected non-flow-control commandsKyle Edwards2021-06-163-0/+5
| | | | | | | | Fixes: #22310
| * Merge topic 'presets-build-fixes' into release-3.20Brad King2021-06-093-5/+28
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | 534c40e6d8 presets: Fix buildPreset "targets" not allowing a single string 5d67632813 presets: Fix buildPreset "jobs" 93e396b402 presets: Fix buildPreset "jobs" field test case Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Kyle Edwards <kyle.edwards@kitware.com> Merge-request: !6190
* | | CMakeDependentOption: Allow parentheses in the depends stringDaniel Schürmann2021-06-144-0/+12
| | | | | | | | | | | | | | | | | | | | | `if()` takes the condition as a list of arguments. Parentheses need to be separated as well. Fixes: #22303
* | | Merge topic 'xcode13-linker-output'Brad King2021-06-141-0/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | a7bbbbf73b Tests: ignore Xcode DVTPlugInManager output 8dcdd4351f Tests: recognize Xcode 13 linker warning Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6216
| * | | Tests: ignore Xcode DVTPlugInManager outputGregor Jasny2021-06-101-0/+1
| | | |
* | | | Merge topic 'dir-IMPORTED_TARGETS'Brad King2021-06-113-0/+12
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e13704ce72 Add directory property to list imported targets ea6d338ea1 cmState: Record imported target names in each directory Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6215
| * | | | Add directory property to list imported targetsBrad King2021-06-103-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Model the change after commit cbca65826c (Add directory property to list buildsystem targets, 2016-09-19, v3.7.0-rc1~79^2~1). Fixes: #22291
* | | | | Tests: Fix RunCMake.CPack_RPM.DEBUGINFO test caseBrad King2021-06-101-0/+17
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | Since commit c826745f5a (CPack/DEB: Do not crash when asked for debug symbols when there are none, 2020-10-29, v3.20.0-rc1~461^2) the test fails because CPackRPM warns about no sources in which to find debug symbols. Add expected output for this case.
* | | | Merge topic 'vs-custom-depfile'Brad King2021-06-101-1/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 526e2ef71c VS: Add support for add_custom_command DEPFILE 794ad78abb Help: Generalize release note filename for add_custom_command DEPFILE 7291f31254 cmTransformDepfile: Add support for MSBuild AdditionalInputs format a6de8ec51b cmTransformDepfile: Make directory for transformed depfile automatically Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6206
| * | | | VS: Add support for add_custom_command DEPFILEBrad King2021-06-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Transform the depfile into MSBuild `AdditionalInputs` content. Add MSBuild Targets to update `AdditionalInputs` and the `.tlog` files for future builds without actually modifying the `.vcxproj` file. Fixes: #20286
* | | | | Merge topic 'ctest_custom_details'Brad King2021-06-102-0/+28
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 02f1271bdf ctest: allow test output to override the 'details' field Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6204
| * | | | | ctest: allow test output to override the 'details' fieldZack Galbreath2021-06-092-0/+28
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | Parse test output for <CTestDetails>...</CTestDetails>. If found, use this value to override the default 'Details' string reported to CDash.
* | | | | Tests: Improve RunCMake.CPack*.SOURCE_PACKAGE test error formattingBrad King2021-06-092-11/+28
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Format message content for `message(FATAL_ERROR)`. Apply the change from commit c54c284de7 (Tests: Improve RunCMake.CPack* test error formatting, 2021-04-22) to the `SOURCE_PACKAGE` script too. Also fix a typo from commit f5d79dec53 (Tests: Cleanup CPack message when files are expected and none are found, 2021-01-15, v3.20.0-rc1~89^2~22).
* | | | Merge topic 'ctest_measurement_file'Brad King2021-06-092-0/+9
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cbcb92d1cb ctest: add support for attaching files to tests at run time Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6192