summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Xcode: Add option to specify build system variantBrad King2020-09-181-0/+4
| | | | | | Extend the `-T <toolset>` option to support a `buildsystem=` field with the Xcode generator. Add a `CMAKE_XCODE_BUILD_SYSTEM` variable to inform project code about the selected build system variant.
* VS: Add support to override VCTargetsPath through toolsetAlexander Boczar2019-10-151-0/+2
| | | | Fixes: #19708
* cuda: Adapted tests to work with modified cuda toolsetBenjamin Wozniak2019-08-301-5/+7
| | | | | | | - cuda version is only recognized if it contains no other characters than "0123456789." - cuda path is only tested with dummy value . Otherwise a cuda toolkit must be copied to the integration test machine
* VS: Add support for explicit 32-bit toolset selection via host=x86Brad King2019-01-281-3/+5
| | | | | Generalize the ``host=x64`` option in `CMAKE_GENERATOR_TOOLSET` to also support ``host=x86``.
* VS: Add Visual Studio 16 2019 generatorBrad King2019-01-111-4/+4
| | | | | | | | | | | | 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>
* VS: Add option to select the version of the toolset used by VS 2017Basil Fierz2018-05-291-0/+12
| | | | | | | | Add new `version=` parameter in the toolset setting to select the version. Add variable `CMAKE_VS_PLATFORM_TOOLSET_VERSION` to hold the version, if one is set (blank indicates default). Fixes: #17549
* Xcode: Drop support for Xcode versions below 3Brad King2017-04-221-2/+2
|
* VS: Provide an option to specify CUDA toolset versionBrad King2017-03-101-0/+6
| | | | | | | | The NVIDIA CUDA Toolkit provides MSBuild toolset files for integration with Visual Studio. Multiple versions may be installed so we need a way to tell our VS generators which CUDA toolset to use. Extend the `CMAKE_GENERATOR_TOOLSET` specification to provide a `cuda=...` field specifying the version number.
* VS: Refactor generator toolset parsingBrad King2017-02-151-0/+4
| | | | | | | | | | | | | | | | | We parse `CMAKE_GENERATOR_TOOLSET` values of the forms: * `toolset` * `toolset,host=x64` * `host=x64` Generalize the parsing to support the forms: * `toolset` * `toolset[,key=value]*` * `key=value[,key=value]*` Disallow duplicate keys. Require all but the first field to be of `key=value` form.
* Tests: Split out RunCMake.GeneratorToolset Xcode checksBrad King2017-02-151-1/+6
| | | | This will allow the behavior of VS and Xcode generators to differ.
* VS: Provide an option to use x64 host toolsBrad King2016-10-141-0/+15
| | | | | | | | | | Visual Studio provides toolchains that are themselves built for 32-bit or 64-bit host architectures. By default it uses the 32-bit tools, but it can be told to prefer the 64-bit tools on 64-bit hosts. Extend the `CMAKE_GENERATOR_TOOLSET` specification to provide a way to request use of the 64-bit host tools. Closes: #15622
* 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
* VS14: Add Visual Studio 14 generator (#14982)Brad King2014-06-251-2/+2
| | | | | | | | | | | | | | | | Call the generator "Visual Studio 14" without any year because this version of VS does not provide a year in the product name. Copy cmGlobalVisualStudio12Generator to cmGlobalVisualStudio14Generator and update version numbers accordingly. Add the VS14 enumeration value. Teach the platform module Windows-MSVC to set MSVC14 and document the variable. Teach module InstallRequiredSystemLibraries to look for the VS 14 runtime libraries. Teach tests CheckCompilerRelatedVariables, VSExternalInclude, and RunCMake.GeneratorToolset to treat VS 14 as they do VS 10, 11, and 12. Co-Author: Pawel Stopinski <diokhan@go2.pl>
* Allow a toolchain file to specify a generator toolsetBrad King2014-06-041-0/+11
| | | | | | | | | | | | | | | | | | | | Delay use of CMAKE_GENERATOR_TOOLSET until the CMakeSystem.cmake file has been configured and loaded during the first project() or enable_language() command. This gives the toolchain file named by CMAKE_TOOLCHAIN_FILE a chance to set CMAKE_GENERATOR_TOOLSET. This point is still early enough to set the generator toolset prior to the initialization of any languages that might use the toolset. The cmake::GeneratorToolset member variable remains an indication of what was specified by the -T option or loaded from the cache. It does not need to be updated based on the toolchain file setting. The cmMakefile::TryCompile can still pass cmake::GeneratorToolset into the inner instance because the try-compiled project will do platform and language initialization using the CMakeSystem module configured for the outer project. Extend the RunCMake.GeneratorToolset test with cases that use a toolchain file to set CMAKE_GENERATOR_TOOLSET.
* VS12: Add Visual Studio 12 generator (#14251)Brad King2013-06-281-1/+1
| | | | | | | | | | | | | | Copy cmGlobalVisualStudio11Generator to cmGlobalVisualStudio12Generator and update version numbers accordingly. Add the VS12 enumeration value. Add module CMakeVS12FindMake to find MSBuild. Look for MSBuild in its now-dedicated Windows Registry entry. Teach the platform module Windows-MSVC to set MSVC12 and document the variable. Teach module InstallRequiredSystemLibraries to look for the VS 12 runtime libraries. Teach tests CheckCompilerRelatedVariables, Preprocess, VSExternalInclude, and RunCMake.GeneratorToolset to treat VS 12 as they do VS 10 and 11. Inspired-by: Minmin Gong <minmin.gong@gmail.com>
* Tests: Add generator toolset supportBrad King2013-02-071-5/+5
| | | | | Propagate CMAKE_GENERATOR_TOOLSET through the test hierarchy so that all tests can build with the selected generator toolset, if any.
* Xcode: Implement generator toolset selection (#9831, #13802)Brad King2013-02-071-1/+1
| | | | | Implement generator toolset selection (cmake -T) for Xcode > 2.0 by adding the GCC_VERSION build setting to project files.
* VS: Implement generator toolset selection (#10722, #13774)Brad King2013-02-071-3/+9
| | | | | | | | | | | | Implement generator toolset selection (cmake -T) for VS >= 10 by setting the PlatformToolset. Extend the RunCMake.GeneratorToolset test case to verify CMAKE_GENERATOR_TOOLSET when the generator supports -T. Since commit 485a940e (VS: Simplify MSVC version reporting, 2012-08-23) all MSVC version information is detected during the compiler id step from the actual compiler invoked by generated build systems rather than hard-coded in VS generators. Therefore we can set the PlatformToolset in VS >= 10 project files and support toolsets from other VS versions.
* CMake: Add -T option to choose a generator toolsetBrad King2013-02-071-0/+11
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_TOOLSET and associated variable documentation to hold the value persistently. Add a RunCMake.GeneratorToolset test to cover basic "-T" option cases. Verify that CMAKE_GENERATOR_TOOLSET is empty without -T, that -T is rejected when the generator doesn't support it, and that two -T options are always rejected.