summaryrefslogtreecommitdiffstats
path: root/Tests
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 'FindGLUT-pkg-config'Brad King2021-07-074-0/+38
|\ | | | | | | | | | | | | | | | | f90d15458a FindGLUT: Use pkg-config to find flags if available f3f0401187 FindGLUT: Reduce if/else nesting and indentation bece79f9be Tests: Add case covering FindGLUT variables and imported targets Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6251
| * Tests: Add case covering FindGLUT variables and imported targetsChristopher Degawa2021-07-024-0/+38
| | | | | | | | Signed-off-by: Christopher Degawa <ccom@randomderp.com>
* | 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 'rpm-suggests' into release-3.21Brad King2021-06-302-11/+31
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | 9b53eca317 CPack/RPM: Fix weak dep support Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6274
* | \ \ 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 'tll-out-of-dir'Brad King2021-06-304-0/+16
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | / | | |_|_|/ | |/| | | | | | | | | | | | | e27a76f131 target_link_libraries: Restore transitive out-of-dir linking Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6285
| * | | | target_link_libraries: Restore transitive out-of-dir linkingBrad King2021-06-294-0/+16
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactoring in commit 7f506b95a7 (cmGeneratorTarget: Refactor link item lookup, 2021-05-26, v3.21.0-rc1~103^2~4) accidentally dropped the persistent lookup scope tracking across multiple items that was added by commit f0e67da061 (target_link_libraries: Fix out-of-dir linking of a list of targets, 2020-01-14, v3.17.0-rc1~149^2). This broke a transitive out-of-dir linking case not covered by our test suite. Restore the scope tracking and add a test case. Fixes: #22363
* | | | Merge topic 'test-CTestTestSerialInDepends-lockfile'Brad King2021-06-291-0/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a5011a2fbf Tests: Cleanup CTestTestSerialInDepends lockfile at test start Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6273
| * | | | Tests: Cleanup CTestTestSerialInDepends lockfile at test startAlex Sweet2021-06-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When any test under CTestTestSerialInDepends starts, delete the lockfile for that test in case it wasn't deleted at the end of the last test run. Fixes: #22351
* | | | | 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-286-12/+18
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-286-60/+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-256-60/+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-286-12/+18
|\ \ \ \ \ | | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-256-12/+18
| | | | | | | | | | | | | | | | | | | | 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.
| * | Merge topic 'test-xcode-13' into release-3.21Brad King2021-06-212-2/+2
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | 1dd0eae4fc Tests: Fix xcode version detection for Xcode 13 on ARM Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6248
* | | | 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 'test-xcode-13'Brad King2021-06-212-2/+2
|\ \ \ | | |/ | |/| | | | | | | | | | | | | 1dd0eae4fc Tests: Fix xcode version detection for Xcode 13 on ARM Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6248
| * | Tests: Fix xcode version detection for Xcode 13 on ARMBrad King2021-06-182-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running `xcode -version` on an ARM box prints content to stderr: objc[...]: Class ... is implemented in both... One of the two will be used. Which one is undefined. Capture and parse only stdout. Otherwise we might configure test behavior for the wrong version of Xcode.
* | | 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>
* | | Merge topic 'ctest_runtime_labels'Brad King2021-06-212-0/+41
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | bd38749fd4 ctest: allow test output to add labels Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6234
| * | | 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.
* | | Tests/IncludeDirectories: support MSVC in system include testsBen Boeckel2021-06-173-12/+27
| | |
* | | Tests/IncludeDirectories: align sibling predicatesBen Boeckel2021-06-171-1/+2
| | |
* | | Tests/IncludeDirectories: factor out applying flags to targetsBen Boeckel2021-06-171-6/+10
| | |
* | | Tests/IncludeDirectories: fix copy pasta for otherlibBen Boeckel2021-06-171-1/+1
| | |