summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
Commit message (Collapse)AuthorAgeFilesLines
* CMake code rely on cmList class for CMake lists management (part. 1)Marc Chevrier2023-04-241-1/+2
|
* GenEx LIST: list operationsMarc Chevrier2023-04-16147-2/+1386
| | | | Fixes: #24550, #24547
* Merge topic 'python-file-encoding'Craig Scott2023-04-091-3/+3
|\ | | | | | | | | | | | | | | | | b855674f5d Tests: Always load presets schema as UTF-8 0de00b8b69 Sphinx: Modernize UTF-8 encoding handling when updating CMake.qhp f0d6010cb5 Sphinx: Specify encoding when opening files for title extraction Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8402
| * Tests: Always load presets schema as UTF-8Craig Scott2023-04-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | We know the encoding of the schema file, so we should specify it when we open it for reading. Previously, by not specifying it, the test was open to using an encoding based on the active locale when running the test. We may have been enforcing a "C" locale at a higher level, but we don't need to rely on that here, we can force correct behavior without that assumption. Issue: #24679
* | list(): rely on cmList classMarc Chevrier2023-04-081-1/+1
|/ | | | Fixes: #24549
* Merge topic 'vs-sdk-selection'Brad King2023-04-0619-2/+176
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 8ecb645934 VS: Select Windows SDK matching WindowsSDKVersion env var f90c8ab54e VS: Select latest available Windows SDK version by default b512c53d43 VS: Add support for setting WindowsTargetPlatformVersion to 10.0 2f3d945f83 VS: Add CMAKE_GENERATOR_PLATFORM field to control Windows SDK selection f0a67b6291 VS: Parse comma-separated fields from CMAKE_GENERATOR_PLATFORM e259063b0a VS: Defer Windows SDK selection until CMAKE_GENERATOR_PLATFORM is known 8499374c6a VS: Simplify logic to require SDK for Windows Store 1c8d4b4bf1 Tests: Teach RunCMake_TEST_FILTER to account for test variant description Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8389
| * VS: Select Windows SDK matching WindowsSDKVersion env varBrad King2023-04-052-0/+9
| | | | | | | | | | | | | | | | | | | | In an environment established by `vcvarsall.bat` or similar, this environment variable may be set to select a Windows SDK version. If the VS generator is used in such an environment, use that SDK. This is similar to how `CMAKE_GENERATOR_INSTANCE` defaults using a `VS##0COMNTOOLS` environment variable. Fixes: #17992
| * VS: Select latest available Windows SDK version by defaultBrad King2023-04-052-0/+14
| | | | | | | | | | | | | | Add policy `CMP0149` to stop preferring SDKs exactly matching `CMAKE_SYSTEM_VERSION` over the latest SDK. Fixes: #16202
| * VS: Add support for setting WindowsTargetPlatformVersion to 10.0Brad King2023-04-051-0/+8
| | | | | | | | | | | | | | VS 2019 and above support this value to select a SDK version automatically. Fixes: #21403
| * VS: Add CMAKE_GENERATOR_PLATFORM field to control Windows SDK selectionBrad King2023-04-0512-0/+106
| | | | | | | | | | | | | | Add a `version=` field to explicitly control the SDK version selection without relying on `CMAKE_SYSTEM_VERSION`. Fixes: #16713
| * VS: Parse comma-separated fields from CMAKE_GENERATOR_PLATFORMBrad King2023-04-057-0/+33
| |
| * Tests: Teach RunCMake_TEST_FILTER to account for test variant descriptionBrad King2023-04-051-2/+6
| |
* | Merge topic 'test-xcode-14.3'Brad King2023-04-041-0/+1
|\ \ | | | | | | | | | | | | | | | 3bb46b29fd Tests: Teach RunCMake to ignore Xcode DVTCoreDeviceEnabledState warnings Merge-request: !8392
| * | Tests: Teach RunCMake to ignore Xcode DVTCoreDeviceEnabledState warningsBrad King2023-04-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | On some Xcode versions, `xcodebuild` may warn: ... xcodebuild[...] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default Teach RunCMake to drop such incidental lines before matching against expected output.
* | | Tests: Fix RunCMake infrastructure for LCC and CMP0129Brad King2023-04-035-12/+10
| |/ |/| | | | | | | | | | | | | | | | | Since commit 3958ed878f (LCC: Add policy CMP0129 regarding interpreting LCC as GNU, 2021-10-19, v3.23.0-rc1~508^2) we intended to enable policy `CMP0129` in RunCMake tests via `-DCMAKE_POLICY_DEFAULT_CMP0129=NEW`. Fix the condition activating that to check `CMAKE_C_COMPILER_ID` where it is always available. Remove now-unnecessary CMP0129 settings in RunCMake cases.
* | Merge topic 'automoc-cxx-standard'Brad King2023-03-316-0/+114
|\ \ | | | | | | | | | | | | | | | | | | | | | 429a452705 Autogen: Add target's C++ standard to moc_predef.h 21f812e57c Autogen: Split creation and setup of custom targets into separate steps Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8359
| * | Autogen: Add target's C++ standard to moc_predef.hOrkun Tokdemir2023-03-306-0/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | Generate `moc_predef.h` using the same C++ standard level that will be used to compile the target so that the compiler's predefined macros can be more accurately recovered. Fixes: #24624 Qt-Issue: https://bugreports.qt.io/browse/QTBUG-110847
* | | Merge topic 'remove-FindPythonInterp-FindPythonLibs'Brad King2023-03-3130-0/+159
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | a4c5b91f80 FindPython{Interp,Libs}: Add policy to remove these modules Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: scivision <michael@scivision.dev> Merge-request: !8380
| * | | FindPython{Interp,Libs}: Add policy to remove these modulesBrad King2023-03-3030-0/+159
| | | | | | | | | | | | | | | | | | | | | | | | The `FindPythonInterp` and `FindPythonLibs` modules have been deprecated since CMake 3.12. Add a policy to pretend they do not exist in order to encourage projects to port to `FindPython` or `FindPython{2,3}`.
* | | | presets: Add trace options to configure presetsArtin Alavi2023-03-3018-0/+118
|/ / / | | | | | | | | | | | | | | | Add JSON schema version 7 to support them. Fixes: #22543
* | | Merge topic 'presets-json-errors'Brad King2023-03-3087-104/+238
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 19305afd8a presets: Improve JSON parser and error messages Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Acked-by: scivision <michael@scivision.dev> Merge-request: !8290
| * | | presets: Improve JSON parser and error messagesMartin Duffy2023-03-2987-104/+238
| | | |
* | | | install(TARGETS): Do not apply installation tweaks to NAMELINK filesBrad King2023-03-282-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These files are symlinks to the real binaries, and we already apply tweaks to those. Previously we generated installation tweak code guarded by a `NOT IS_SYMLINK` condition that is never true. Drop the code altogether. Add a test covering the motivating use case, in which a `POST_BUILD` step modifies the namelink file to not actually be a symlink. Fixes: #24647
* | | | Merge topic 'lint-genex'Brad King2023-03-285-8/+8
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 099934e313 Add generator expression support to static code analysis hooks Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8361
| * | | | Add generator expression support to static code analysis hooksStefan Schober2023-03-275-8/+8
| | |/ / | |/| | | | | | | | | | | | | | | | | | Teach target properties `<LANG>_CPPCHECK`, `<LANG>_CPPLINT`, `<LANG>_CLANG_TIDY` and `<LANG>_INCLUDE_WHAT_YOU_USE` to accept generator expressions.
* | | | Merge topic 'crosscompiling-warn-reset'Brad King2023-03-274-0/+10
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4d23636694 Warn if CMAKE_CROSSCOMPILING is true without CMAKE_SYSTEM_NAME set Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8358
| * | | | Warn if CMAKE_CROSSCOMPILING is true without CMAKE_SYSTEM_NAME setMartin Storsjö2023-03-244-0/+10
| |/ / / | | | | | | | | | | | | | | | | Also clarify the `CMAKE_CROSSCOMPILING` documentation to state that CMake sets the variable automatically.
* | | | file(GET_RUNTIME_DEPENDENCIES): Preserve casing for Windows PE binariesChristian Heimlich2023-03-235-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For Windows PE files the `file(GET_RUNTIME_DEPENDENCIES)` command converts the name of all DLLs found during binary scanning to lowercase in order to simplify the syntax requirements of its regex filters; however, this has the side-effect of causing all DLL paths returned via RESOLVED_DEPENDENCIES_VAR to be in lowercase, regardless of their actual casing. Instead, respect the original casing as closely as possible when returning resolved dependencies after all filters have been passed: When evaluating a Windows PE format binary on a non-Windows host the casing of dependencies recorded within the binary are used. When the host is running Windows, the actual casing of the dependencies on-disk are used instead. Fixes: #23091
* | | | Tests: Add test for file(GET_RUNTIME_DEPENDENCIES) with MixedCase.dllChristian Heimlich2023-03-232-1/+5
|/ / / | | | | | | | | | Issue: #23091
* | | Merge topic 'file-REAL_PATH'Brad King2023-03-211-0/+16
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1d12853ed3 file(REAL_PATH): Ensure same behavior as get_filename_component(REALPATH) Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Acked-by: scivision <michael@scivision.dev> Merge-request: !8348
| * | | file(REAL_PATH): Ensure same behavior as get_filename_component(REALPATH)Marc Chevrier2023-03-201-0/+16
| | | | | | | | | | | | | | | | Fixes: #24605
* | | | Merge topic 'clang-cl-showIncludes'Brad King2023-03-215-0/+22
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | 843fc607de Ninja: Restore detection of clang-cl showIncludes prefix 3346570ae9 Tests: Comment RunCMake.Ninja ShowIncludes sample input languages Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8344
| * | | Ninja: Restore detection of clang-cl showIncludes prefixYR Chen2023-03-205-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 8f82e755f3 (Ninja: Fix detection of MSVC showIncludes prefix in Italian, 2023-01-26, v3.26.0-rc1~20^2) our regex no longer matches the output from `clang-cl`, which uses a relative path, forward slashes, and is always in English [1]: Note: including file: ./foo.h Update the regex to match that too. [1] https://github.com/llvm/llvm-project/blob/llvmorg-16.0.0/clang/lib/Frontend/HeaderIncludeGen.cpp#L102 Co-authored-by: Brad King <brad.king@kitware.com>
| * | | Tests: Comment RunCMake.Ninja ShowIncludes sample input languagesBrad King2023-03-201-0/+6
| | | |
* | | | Merge topic 'vs-BuildInParallel'Brad King2023-03-161-6/+18
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4c866cac40 VS: Do not regenerate build system concurrently with CMP0147 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8329
| * | | | VS: Do not regenerate build system concurrently with CMP0147Brad King2023-03-151-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The VS generators add a custom command to `CMakeLists.txt` to re-run CMake when input files have changed. Mark this custom command as if it were specified with `USES_TERMINAL`. We already do this for the equivalent `rebuild_cache` target in Makefile and Ninja generators. This matters since commit d6353e74b4 (VS: Add policy to build custom commands concurrently, 2023-03-10) because with policy CMP0147 set to NEW, we now add `BuildInParallel` in `.vcxproj` file entries for custom commands that do not have `USES_TERMINAL` set, but we do not want to re-run CMake concurrently with other custom commands. Issue: #18405
* | | | | macOS: Suppress default '-arch arm64' with CMAKE_<LANG>_COMPILER_TARGETBrad King2023-03-155-1/+27
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit b6c60f14b6 (macOS: Default to arm64 architecture on Apple Silicon hosts, 2020-09-28, v3.19.0-rc1~63^2) we add `-arch arm64` by default on Apple Silicon hosts if `CMAKE_OSX_ARCHITECTURES` is not set. This is necessary to prevent the toolchain from selecting its own default architecture based on that of the build tool (e.g., `x86_64`). If `CMAKE_<LANG>_COMPILER_TARGET` is set, its `-target` flag tells the compiler what architecture to use, so do not add `-arch arm64`. Fixes: #24599
* | | | Merge topic 'recursion-limit'Brad King2023-03-1449-28/+371
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 49167cf68f Source: Adjust stack sizes and recursion limits to work together 9504cef8c4 Tests: Allow RunCMake.MaxRecursionDepth to test public-facing default limit 60ef076bac find_package: Enforce maximum nesting depth below maximum recursion depth 89b69bf1ad Add CMAKE_MAXIMUM_RECURSION_DEPTH environment variable 395895bda7 cmMakefile: Factor out helper to get recursion depth limit 88bc8dfc14 cmMakefile: Store recursion depth limit as size_t fcad8d0630 cmMakefile: Improve parsing of CMAKE_MAXIMUM_RECURSION_DEPTH variable 497f7d5c1a Tests: Simplify option passing to RunCMake.MaxRecursionDepth cases Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8307
| * | | | find_package: Enforce maximum nesting depth below maximum recursion depthBrad King2023-03-136-18/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The stack usage for nested `find_package` calls is much larger than for other kinds of recursion, so enforce a lower limit to avoid stack overflow.
| * | | | Add CMAKE_MAXIMUM_RECURSION_DEPTH environment variableBrad King2023-03-1345-0/+347
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the recursion limit controls added by commit a6982cff0d (cmMakefile: Impose maximum recursion limit, 2018-12-14, v3.14.0-rc1~82^2) with an environment variable that is used if the CMake variable of the same name is not set.
| * | | | Tests: Simplify option passing to RunCMake.MaxRecursionDepth casesBrad King2023-03-091-16/+6
| | | | |
* | | | | Merge topic 'revert-CheckCompilerFlag-clang-argument-unused'Brad King2023-03-142-0/+18
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 97fcd3bd30 CheckCompilerFlag: Revert 'Match the Clang "argument unused" output ...' Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Acked-by: scivision <michael@scivision.dev> Merge-request: !8322
| * | | | CheckCompilerFlag: Revert 'Match the Clang "argument unused" output ...'Brad King2023-03-132-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit 5b45a3d0ce (CheckCompilerFlag: Match the Clang "argument unused" output for all languages, 2023-01-23, v3.26.0-rc1~38^2). It broke existing projects that were silently tolerating unrelated unused arguments in their checks for C and CXX. For example, using `CFLAGS=-nostdinc` or `CXXFLAGS=-nostdinc++` causes those flags to be used when driving the linker as well, and Clang warns they are unused in that case. Add a test case covering the now-restored behavior. Fixes: #24591
| * | | | Merge topic 'GoogleTest-type-param-suite' into release-3.26Brad King2023-03-065-3/+67
| |\ \ \ \ | | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | 9aa9032266 GoogleTest: Restore suite name for type-parametrized tests Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8282
| * | | | Merge topic 'ExternalProject-revert-install' into release-3.26Brad King2023-03-034-0/+14
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 771387523a ExternalProject: Restore driving install through build system Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Acked-by: Craig Scott <craig.scott@crascit.com> Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !8279
* | | | | | FindCUDA: Disallow with CMP0147 under Visual StudioBrad King2023-03-127-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FindCUDA's custom commands invoke `nvcc`, which invokes `cl`. Under VS this is done without a `/FS` flag, so `.pdb` generation races if we use `BuildInParallel`. The FindCUDA module has already been removed by policy CMP0146 after being deprecated since CMake 3.10, so it is simplest to just disallow this combination of features. Issue: #24576
* | | | | | VS: Add policy to build custom commands concurrentlyBrad King2023-03-123-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 33c15ae2b9 (VS: Build custom commands concurrently when possible, 2023-01-19, v3.26.0-rc1~56^2) we added `BuildInParallel` to custom commands in `.vcxproj` files, but that had to be reverted by commit abb1c12162 (VS: Revert "Build custom commands concurrently when possible", 2023-03-07, v3.26.0-rc6~3^2) because some projects may have custom commands that accidentally rely on serial execution in MSBuild. Add a policy to use `BuildInParallel` for custom commands in projects that have been updated to set the policy to `NEW`. Fixes: #18405
* | | | | | Merge topic 'cxx-module-extensions'Brad King2023-03-1010-34/+29
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 45d1925efc Treat '.ccm', '.cxxm', and '.c++m' files as C++ sources 8c96d145c1 Tests/RunCMake: Match 'Tried extensions' output more robustly Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !8308
| * | | | | | Tests/RunCMake: Match 'Tried extensions' output more robustlyBrad King2023-03-0910-34/+29
| | |_|_|/ / | |/| | | |
* | | | | | FindCUDA: Add policy to remove this moduleBrad King2023-03-0916-0/+80
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | The `FindCUDA` module has been deprecated since CMake 3.10. Add a policy to pretend it doesn't exist in order to encourage projects to port away from it.