summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/GeneratorPlatform
Commit message (Collapse)AuthorAgeFilesLines
* Tests/RunCMake: Update cmake_minimum_required versions to 3.10Brad King2024-10-031-1/+1
| | | | | For policy-specific tests, use the version before the policy was introduced. Otherwise, use 3.10 where possible.
* Drop Visual Studio 9 2008 generatorBrad King2024-05-081-2/+2
| | | | This generator has been deprecated since CMake 3.27. Remove it.
* VS: Select latest Windows SDK even when targeting Windows 8.1 and belowBrad King2023-08-102-5/+9
| | | | | | | | | The policy added by commit f90c8ab54e (VS: Select latest available Windows SDK version by default, 2023-04-03, v3.27.0-rc1~206^2~1) applied only when targeting Windows 10+. Apply it to older versions too. Fixes: #25170 Issue: #16202
* VS: Teach CMAKE_GENERATOR_PLATFORM to support Windows 8.1 SDK selectionBrad King2023-08-101-0/+11
| | | | | | | Honor an explicit `version=8.1` field value regardless of the Windows target version. Issue: #25170
* VS: Teach CMAKE_GENERATOR_PLATFORM to use Windows 10 SDKs for older versionsBrad King2023-08-109-24/+33
| | | | | | | Honor an explicit `version=` field selecting a Windows 10 SDK regardless of the Windows target version. Issue: #25170
* Tests: Remove redundant condition in RunCMake.GeneratorPlatform testBrad King2023-08-101-23/+21
|
* 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/RunCMake: Update cmake_minimum_required versionsBrad King2023-02-111-1/+1
| | | | | | | | For policy-specific tests, use the version before the policy was introduced. Otherwise, use 3.5 where possible. Also, remove `cmake_minimum_required()` and `project()` calls from individual cases where they are handled by `CMakeLists.txt`.
* VS: Add Visual Studio 17 2022 generatorBrad King2021-06-251-2/+2
| | | | Fixes: #22339
* Tests: Make RunCMake.Generator{Platform,Toolset} two-flag cases explicitBrad King2021-03-091-2/+2
| | | | Do not rely on the RunCMake infrastructure to pass `-T` or `-A`.
* Tests/RunCMake: Update cmake_minimum_required versionsBrad King2020-06-181-1/+1
| | | | Use 3.3 or 2.8.12 where possible.
* VS: Provide the default platform name to project codeBrad King2019-04-192-0/+2
| | | | | | | | | | | | | | | | | | The value of `CMAKE_VS_PLATFORM_NAME` is computed by Visual Studio generators based on `CMAKE_GENERATOR_PLATFORM` or some default. Prior to the VS 2019 generator, the default was always `Win32`. However, for the `Visual Studio 16 2019` generator, the default is based on the host platform. Store the default in a new `CMAKE_VS_PLATFORM_NAME_DEFAULT` variable for use by project code. This is particularly useful in toolchain files because they are allowed to set `CMAKE_GENERATOR_PLATFORM` and so `CMAKE_VS_PLATFORM_NAME` is not yet known. Of course the toolchain file author knows whether it will set `CMAKE_GENERATOR_PLATFORM`, and if not then `CMAKE_VS_PLATFORM_NAME_DEFAULT` provides the platform name that will be used. Fixes: #19177
* VS: Add Visual Studio 16 2019 generatorBrad King2019-01-111-2/+2
| | | | | | | | | | | | Add this generator *without* support for specifying the target architecture in the generator name. cmake-gui will be taught to provide a field for this, and command-line builds can use -A. Also, teach this generator to select a default target architecture based on the host architecture. Fixes: #18689 Inspired-by: Egor Pugin <egor.pugin@gmail.com>
* VS15: Add Visual Studio 15 generatorBrad King2016-09-071-2/+2
| | | | | | | | | | | | | | | | Call the generator "Visual Studio 15" without any year because the preview version of VS 15 does not provide a year in the product name. Copy cmGlobalVisualStudio14Generator to cmGlobalVisualStudio15Generator and update version numbers accordingly. Add the VS15 enumeration value. Note that we do not need to add a MSVC15 variable or v150 toolset because Visual Studio 15 comes with an updated version of the v140 toolset and remains ABI-compatible. Teach tests VSExternalInclude, RunCMake.GeneratorPlatform, and RunCMake.GeneratorToolset to treat VS 15 as they do VS 10-14. Closes: #16143
* Tests: Test setting a generator platform in a toolchain fileBrad King2014-09-159-0/+50
| | | | | Teach the RunCMake.GeneratorPlatform test to cover setting CMAKE_GENERATOR_PLATFORM in a file loaded by CMAKE_TOOLCHAIN_FILE.
* cmake: Add -A option to specify a generator platformBrad King2014-09-154-0/+9
| | | | | | | | | | | | Define the 'cmake -A' option to set CMAKE_GENERATOR_PLATFORM without having to spell out the whole variable name. We choose the name '-A' for "platform" because '-P' is already taken, and in the common use case the "platform" is actually an architecture (e.g. x64). Teach the RunCMake test infrastructure to use -A to pass the generator platform. Extend the RunCMake.GeneratorPlatform test with a case to verify that the -A option cannot be repeated.
* Tests: Add generator platform supportBrad King2014-09-101-4/+3
| | | | | Propagate CMAKE_GENERATOR_PLATFORM through the test hierarchy so that all tests can build with the selected generator platform, if any.
* VS: Implement CMAKE_GENERATOR_PLATFORM for VS >= 8Brad King2014-09-053-3/+18
| | | | | | | | | For VS generator names that do not specify the platform name, read CMAKE_GENERATOR_PLATFORM to get it. Extend the RunCMake.GeneratorPlatform test with a case covering use of the x64 platform when the test generator is a Visual Studio generator whose name does not specify a platform.
* CMake: Add CMAKE_GENERATOR_PLATFORM optionBrad King2014-09-058-0/+34
Reject the option by default. It will be implemented on a per-generator basis. Pass the setting into try_compile project generation. Add cache entry CMAKE_GENERATOR_PLATFORM and associated variable documentation to hold the value persistently. Add a RunCMake.GeneratorPlatform test to cover basic use cases for the option. Verify that CMAKE_GENERATOR_PLATFORM is empty by default, and that it is rejected when the generator does not support a user setting.