mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-08 15:19:51 -05:00
CMake: Add -T option to choose a generator toolset
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.
This commit is contained in:
@@ -254,6 +254,14 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
|
||||
"for the respective IDE. This IDE project file generator is stored in "
|
||||
"CMAKE_EXTRA_GENERATOR (e.g. \"Eclipse CDT4\").",false,
|
||||
"Variables that Provide Information");
|
||||
cm->DefineProperty
|
||||
("CMAKE_GENERATOR_TOOLSET", cmProperty::VARIABLE,
|
||||
"Native build system toolset name specified by user.",
|
||||
"Some CMake generators support a toolset name to be given to the "
|
||||
"native build system to choose a compiler. "
|
||||
"If the user specifies a toolset name (e.g. via the cmake -T option) "
|
||||
"the value will be available in this variable.",false,
|
||||
"Variables that Provide Information");
|
||||
cm->DefineProperty
|
||||
("CMAKE_HOME_DIRECTORY", cmProperty::VARIABLE,
|
||||
"Path to top of source tree.",
|
||||
|
||||
Reference in New Issue
Block a user