summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* cmake: Warn about unnecessary paths on command lineRobert Maynard2022-01-203-0/+14
| | | | | | We can't make it an error as that would break existing behavior. Fixes: #23110
* Tests: Fix RunCMake.CommandLine toolchain case command lineBrad King2022-01-202-2/+3
|
* Merge topic 'cpack-dmg-sla'Brad King2022-01-199-0/+53
|\ | | | | | | | | | | | | | | 9e38bfa915 CPack/DMG: Add explicit option to use CPACK_RESOURCE_FILE_LICENSE for SLA 542ba6ac1a Tests: Add CPack/DMG case covering SLA from CPACK_RESOURCE_FILE_LICENSE Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6876
| * CPack/DMG: Add explicit option to use CPACK_RESOURCE_FILE_LICENSE for SLABrad King2022-01-185-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since macOS 12.0, the ``hdiutil udifrez`` and ``hdiutil udifderez`` commands to embed and extract resources in a disk image are deprecated. The CPack DragNDrop Generator uses these to attach the SLA specified by the `CPACK_RESOURCE_FILE_LICENSE` option. Since that option is shared by multiple CPack generators, we cannot deprecate it. Instead, add an explicit option to control the behavior. This will give projects a way to package on future macOS versions that remove the commands. In order to provide a long-term transition away from attaching SLAs to disk images, update `cpack` to default this behavior to OFF. To retain compatibility for CMake projects, teach the CPack module to default the option to ON. Later a policy can be added to change the default. Issue: #22978
| * Tests: Add CPack/DMG case covering SLA from CPACK_RESOURCE_FILE_LICENSEBrad King2022-01-185-0/+31
| |
* | Merge topic 'define-property-optional-args'Brad King2022-01-194-0/+33
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | edb5059216 define_property(): Make BRIEF_DOCS and FULL_DOCS optional 7d26baff46 cmDefinePropertyCommand: Refactor to use cmArgumentParser Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !6875
| * | define_property(): Make BRIEF_DOCS and FULL_DOCS optionalKyle Edwards2022-01-184-0/+33
| |/ | | | | | | Issue: #20698
* | Merge topic 'handle_multiple_source_dirs'Brad King2022-01-191-0/+13
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | b2bc3364f0 CMake: `-S` paths preferred over other provided paths 2e1b7e5b9a Add tests that showcase cmake -S limitations Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6874
| * | Add tests that showcase cmake -S limitationsRobert Maynard2022-01-181-0/+13
| | |
* | | Merge topic 'depfile-parsing-update'Brad King2022-01-194-0/+19
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | 0b65a2b253 add_custom_command(DEPFILE): ensure all dependencies are taken into account e04a352cca Depfile parsing: enhance compatibility with GNU Make Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !6861
| * | Depfile parsing: enhance compatibility with GNU MakeMarc Chevrier2022-01-164-0/+19
| |/
* | Merge topic 'CheckLinkerFlag-update-implementation'Brad King2022-01-182-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | 9d1b9a4aa1 CheckLinkerFlag: rely now on internal implementation 660e0d80ae internal/CheckCompilerFlag: rely on common configuration Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6860
| * | internal/CheckCompilerFlag: rely on common configurationMarc Chevrier2022-01-142-2/+2
| | | | | | | | | | | | | | | Extract configuration step from the CheckCompilerFlag command to enable to share it with future CheckLinkerFlag implementation
* | | Merge topic 'find_library-clean-env'Brad King2022-01-183-0/+9
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | b916860a48 Tests: Avoid interference from environment in RunCMake.find_library Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6868
| * | Tests: Avoid interference from environment in RunCMake.find_libraryWilliam R. Dieter2022-01-143-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clear $ENV{CMAKE_PREFIX_PATH} in several RunCMake.find_library tests because on Windows, a CMAKE_PREFIX_PATH with two consecutive semicolons causes a library to be found when it should not be. None of the updated tests expect CMAKE_PREFIX_PATH from the environment to influence the test, so clear the variable entirely to guarantee it will not affect the test. Fixes: #23111 Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* | | Help: Document formatting of DEPRECATION target propertyBrad King2022-01-132-2/+9
|/ / | | | | | | Also add a test case to verify it.
* | Merge topic 'vs2022-v143-link-guard-cf'Brad King2022-01-133-0/+48
|\ \ | |/ |/| | | | | | | | | 9e24437c91 VS: Remove the '/guard:cf' flag from v143 link flag table Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6858
| * VS: Remove the '/guard:cf' flag from v143 link flag tableBenjamin Sluis2022-01-123-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | Apply the change from commit db35e3cfd6 (VS: Fix support for '/guard:cf' linker flag for v142, 2019-01-24, v3.14.0-rc1~74^2~2) to the v143 flag table. The entry for `LinkControlFlowGuard` in `v143_Link.json` does not work when used in a `.vcxproj` file. Drop our link flag table entries for this toolset so that the flag will be passed via `AdditionalOptions`. Also add a test case.
* | Merge topic 'better_error_message_on_unsupported_language_level'Brad King2022-01-128-12/+8
|\ \ | | | | | | | | | | | | | | | | | | | | | ec1e40af1a cmStandardLevelResolver: Better error message on unsupported language level Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6854
| * | cmStandardLevelResolver: Better error message on unsupported language levelRobert Maynard2022-01-118-12/+8
| | | | | | | | | | | | Fixes #23079
* | | Merge topic 'file-READ_ELF-capture-error'Brad King2022-01-122-2/+21
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 41bebbe50a file: Restore error capture in undocumented READ_ELF mode Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6853
| * | | file: Restore error capture in undocumented READ_ELF modeBrad King2022-01-112-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revise the error message added by commit 115ff6a347 (cmELF: Include the ELF parsing code unconditionally, 2021-06-17, v3.22.0-rc1~557^2) to honor the `CAPTURE_ERROR` option. This is needed by the call site in `BundleUtilities` to suppress errors on non-ELF files. Fixes: #23074
* | | | GoogleTest: Add handling for square brackets in test namesEvgeniy Shcherbina2022-01-113-3/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a test name contains a square bracket (due to parameters) then it breaks gtest_discovery_test() function in some not-so-predictable way. That happens due to the special meaning these brackets have in the CMake language and they can't be escaped universally. So the following treatment has been implemented: * Every occurrence of ('[' | ']') in a test name gets replaced with the corresponding placeholder ("__osb_*" | "__csb_*") before the Google Test output processing and gets replaced back before adding a new test to CTest, keeping the original test name intact in the CTest output. The placeholders are chosen that way to minimize the chance of clashing with something in the user tests but even if the default ones would clash with something then they are enhanced to not clash with anything (hence "_*" at the placeholder's end). * The GTest output gets searched for the default test name guards ("[=[" | "]=]") and if they are found a new one gets generated until the one is found which can safely encompass any test name. The search is quite simple: find the least amount of '=' which would allow escaping any test. * The resulting ${TEST_LIST} variable will contain every test but tests with square brackets as there is no way to make sure such tests won't break the list altogether. Fixes: #23039
* | | | GoogleTest: Generalize test samplesEvgeniy Shcherbina2022-01-115-135/+135
| | | | | | | | | | | | | | | | | | | | Replaced brittle (and irrelevant to the tests) parts of the sample outputs with generic regexps to ease making new test cases.
* | | | Merge topic 'cmake-presets-include'Brad King2022-01-1036-1/+232
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 26a5512c0f CMakePresets: Add include field a239f23a98 Refactor: Generalize file graph in CMakePresets 84d440caac Refactor: Split JSON processing into configure, build, and test presets fd6ea2f67f Refactor: Rename cmCMakePresetsFile to cmCMakePresetsGraph Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !6829
| * | | CMakePresets: Add include fieldKyle Edwards2022-01-0735-0/+231
| | | | | | | | | | | | | | | | Fixes: #21331
| * | | Refactor: Generalize file graph in CMakePresetsKyle Edwards2022-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this refactoring, presets had a simple flag that marked them as "user" or "not user", and checking the file graph of two files was as simple as checking this flag. This only allowed for two files in the graph. Generalize the code to allow for arbitrarily many files in the graph.
* | | | Merge topic 'GoogleTest-dots'Brad King2022-01-078-89/+170
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | 1f9554d4e9 GoogleTest: Fix regex matching all dots in the suite name Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6822
| * | | GoogleTest: Fix regex matching all dots in the suite nameFrancesco Guastella2022-01-078-89/+170
| | | |
* | | | Merge topic 'xcode-framework-system-includes'Brad King2022-01-065-0/+33
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | 7d99cff236 Xcode: Properly identify frameworks with system includes Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !6815
| * | | Xcode: Properly identify frameworks with system includesGregor Jasny2021-12-225-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check the complete include path for being a system include, not the derived framework search path. The code for Ninja and Makefile generators does exactly the same. Fixes: #23011
* | | | Merge topic 'vs-csharp-dotnet-sdk'Brad King2021-12-2214-0/+170
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0eea32a376 VS: Add DOTNET_SDK property to generate SDK-style C# projects a450cc9533 VS: Set ResolveNugetPackages to false for ALL_BUILD and ZERO_CHECK fa76e5d194 cmVisualStudio10TargetGenerator: Factor out helper for classic MSBuild project Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6634
| * | | | VS: Add DOTNET_SDK property to generate SDK-style C# projectsSumit Bhardwaj2021-12-2114-0/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes in cmVisualStudio10TargetGenerator::Generate to write .Net SDK-style project for VS generators VS 19 and above. Also adds documentation and tests. Issue: #20227
* | | | | Merge topic 'doc-list-non-existent'Brad King2021-12-222-0/+48
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b573a732dc Tests: add tests to check claims in the documentation b151db01f9 Help: mention non-existent case for list(PREPEND) b3a249c2cb Help: clarify range for list(INSERT), mention nonexistent / empty case b6fdcb3df0 Help: clarify description of list(INSERT) e55f473ea9 Help: clarify that list(APPEND) on a non-existent list creates it Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6824
| * | | | | Tests: add tests to check claims in the documentationAdriaan de Groot2021-12-212-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - list commands APPEND, PREPEND, INSERT treat non-existent lists as empty and use that value, creating a new list variable in the process.
* | | | | | Merge topic 'link-only-targets'Brad King2021-12-2226-1/+107
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 37af6c3311 target_link_libraries: Optionally require only target names 5134f099a3 cmGeneratorTarget: Factor out message about reasons for a missing target 37a25072ea Tests: Rename RunCMake.{CMP0028 => LinkItemValidation} Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !6821
| * | | | | target_link_libraries: Optionally require only target namesBrad King2021-12-206-0/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Optionally verify that items in `LINK_LIBRARIES` and `INTERFACE_LINK_LIBRARIES` that can be target names are actually target names. Add a `LINK_LIBRARIES_ONLY_TARGETS` target property and corresponding `CMAKE_LINK_LIBRARIES_ONLY_TARGETS` variable to enable this new check. Fixes: #22858
| * | | | | Tests: Rename RunCMake.{CMP0028 => LinkItemValidation}Brad King2021-12-2022-1/+1
| |/ / / / | | | | | | | | | | | | | | | Generalize the test name to prepare for cases beyond CMP0028.
* | | | | FindGLUT: Provide modern-named GLUT_INCLUDE_DIRS result variableBrad King2021-12-201-1/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | Previously this module only provided `GLUT_INCLUDE_DIR`, which does not follow the modern naming convention documented in `cmake-developer(7)`. Issue: #23018
* | | | Merge topic 'improve-CMP0028-messages'Brad King2021-12-206-34/+76
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ea050286e7 CMP0028: Report the target whose link interface has an offending item a97c92e46e CMP0028: Report backtrace to link item rather than target creation 0dcbf4ab58 cmGeneratorTarget: Record when imported target link iface libs are done Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !6810
| * | | | CMP0028: Report the target whose link interface has an offending itemBrad King2021-12-166-23/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously items linked via the link interface of a dependency were reported in CMP0028 messages as if directly linked by a target. Clarify the messages to indicate that an offending item is actually in the link interface of a given target, regardless of its consumer. Move the check to the end of generation and look through the final set of link implementations and link interfaces that were used for generation. This avoids repeating messages on link interfaces that have multiple consumers.
| * | | | CMP0028: Report backtrace to link item rather than target creationBrad King2021-12-166-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we have proper backtraces for both `LINK_LIBRARIES` and `INTERFACE_LINK_LIBRARIES` entries, we can report them in error messages.
* | | | | Merge topic 'FindGLUT-include-dirs'Brad King2021-12-201-1/+1
|\ \ \ \ \ | | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | ae6b25d920 FindGLUT: Provide legacy GLUT_INCLUDE_DIR result in pkg-config code path Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6814
| * | | | FindGLUT: Provide legacy GLUT_INCLUDE_DIR result in pkg-config code pathBrad King2021-12-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit f90d15458a (FindGLUT: Use pkg-config to find flags if available, 2021-06-11, v3.22.0-rc1~469^2) we return early if pkg-config provides the information. During review of that commit, code to populate the legacy `GLUT_INCLUDE_DIR` result variable was removed from that code path. Add code to provide it. Also fix the test case to use `GLUT_INCLUDE_DIR`, the result variable documented officially by the module. Fixes: #23018
* | | | | Merge topic 'test-vsnormal-allow-intel'Brad King2021-12-201-1/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d7ae61cde6 Tests: In RunCMake.GeneratorToolset accept Intel platform toolsets Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6811
| * | | | | Tests: In RunCMake.GeneratorToolset accept Intel platform toolsetsWilliam R. Dieter2021-12-171-1/+1
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RunCMake.GeneratorToolset test expected platform toolsets to have a name beginning with 'v' followed by one or more decimal digits, as all the Microsoft platform toolsets follow that naming convention. The Intel platform toolsets begin with "Intel" and have various additional strings depending on the compiler version. This change accepts the toolsets delivered by Intel in addition to those from Microsoft. Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* | | | | Merge topic 'filter-debug-find'Brad King2021-12-1731-0/+427
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | d7b18895bc cmake: Add filtered debug-find options Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Alex <leha-bot@yandex.ru> Merge-request: !6778
| * | | | cmake: Add filtered debug-find optionsJohn Parent2021-12-1731-0/+427
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a `--debug-find-pkg=` option to debug find calls for specific packages. Add a `--debug-find-var=` option to debug find calls for specific return variables. Fixes: #21880
* | | | Merge topic 'link-interface-backtrace'Brad King2021-12-163-3/+9
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1d709ea2f5 cmGeneratorTarget: Propagate backtraces from INTERFACE_LINK_LIBRARIES a84a62e0a7 cmTarget: Record backtraces for INTERFACE_LINK_LIBRARIES Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !6805
| * | | | cmGeneratorTarget: Propagate backtraces from INTERFACE_LINK_LIBRARIESBrad King2021-12-153-3/+9
| |/ / /