Assure a default toolset is always set.

This commit is contained in:
Tom van Dijck 2017-05-02 10:21:11 -07:00
parent 9dc4da43ed
commit 4d95798a8e
12 changed files with 17 additions and 8 deletions

View File

@ -18,6 +18,7 @@
trigger = "codelite", trigger = "codelite",
shortname = "CodeLite", shortname = "CodeLite",
description = "Generate CodeLite project files", description = "Generate CodeLite project files",
toolset = "clang",
-- The capabilities of this action -- The capabilities of this action

View File

@ -15,6 +15,7 @@
trigger = "gmake", trigger = "gmake",
shortname = "GNU Make", shortname = "GNU Make",
description = "Generate GNU makefiles for POSIX, MinGW, and Cygwin", description = "Generate GNU makefiles for POSIX, MinGW, and Cygwin",
toolset = "gcc",
valid_kinds = { "ConsoleApp", "WindowedApp", "StaticLib", "SharedLib", "Utility", "Makefile" }, valid_kinds = { "ConsoleApp", "WindowedApp", "StaticLib", "SharedLib", "Utility", "Makefile" },
valid_languages = { "C", "C++", "C#" }, valid_languages = { "C", "C++", "C#" },

View File

@ -38,6 +38,7 @@
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup> </PropertyGroup>
]] ]]
end end
@ -270,6 +271,7 @@
test.capture [[ test.capture [[
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType> <ConfigurationType>Utility</ConfigurationType>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup> </PropertyGroup>
]] ]]
end end
@ -286,6 +288,7 @@
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
]] ]]
end end

View File

@ -35,7 +35,9 @@
function suite.correctDefault_onVS2010() function suite.correctDefault_onVS2010()
p.action.set("vs2010") p.action.set("vs2010")
prepare() prepare()
test.isemptycapture() test.capture [[
<PlatformToolset>v100</PlatformToolset>
]]
end end

View File

@ -131,6 +131,7 @@
-- Visual Studio always uses Windows path and naming conventions -- Visual Studio always uses Windows path and naming conventions
targetos = "windows", targetos = "windows",
toolset = "msc-v100",
-- The capabilities of this action -- The capabilities of this action

View File

@ -1929,8 +1929,8 @@
function m.platformToolset(cfg) function m.platformToolset(cfg)
local tool, version = p.config.toolset(cfg) local tool, version = p.config.toolset(cfg)
if not version then if not version then
local action = p.action.current() local value = p.action.current().toolset
version = action.vstudio.platformToolset tool, version = p.tools.canonical(value)
end end
if version then if version then
if cfg.kind == p.NONE or cfg.kind == p.MAKEFILE then if cfg.kind == p.NONE or cfg.kind == p.MAKEFILE then

View File

@ -21,6 +21,7 @@
-- Visual Studio always uses Windows path and naming conventions -- Visual Studio always uses Windows path and naming conventions
targetos = "windows", targetos = "windows",
toolset = "msc-v110",
-- The capabilities of this action -- The capabilities of this action
@ -62,6 +63,5 @@
versionName = "2012", versionName = "2012",
targetFramework = "4.5", targetFramework = "4.5",
toolsVersion = "4.0", toolsVersion = "4.0",
platformToolset = "v110"
} }
} }

View File

@ -21,6 +21,7 @@
-- Visual Studio always uses Windows path and naming conventions -- Visual Studio always uses Windows path and naming conventions
targetos = "windows", targetos = "windows",
toolset = "msc-v120",
-- The capabilities of this action -- The capabilities of this action
@ -63,6 +64,5 @@
targetFramework = "4.5", targetFramework = "4.5",
toolsVersion = "12.0", toolsVersion = "12.0",
filterToolsVersion = "4.0", filterToolsVersion = "4.0",
platformToolset = "v120"
} }
} }

View File

@ -21,6 +21,7 @@
-- Visual Studio always uses Windows path and naming conventions -- Visual Studio always uses Windows path and naming conventions
targetos = "windows", targetos = "windows",
toolset = "msc-v140",
-- The capabilities of this action -- The capabilities of this action
@ -63,6 +64,5 @@
targetFramework = "4.5", targetFramework = "4.5",
toolsVersion = "14.0", toolsVersion = "14.0",
filterToolsVersion = "4.0", filterToolsVersion = "4.0",
platformToolset = "v140"
} }
} }

View File

@ -21,6 +21,7 @@
-- Visual Studio always uses Windows path and naming conventions -- Visual Studio always uses Windows path and naming conventions
targetos = "windows", targetos = "windows",
toolset = "msc-v141",
-- The capabilities of this action -- The capabilities of this action
@ -63,6 +64,5 @@
targetFramework = "4.5.2", targetFramework = "4.5.2",
toolsVersion = "15.0", toolsVersion = "15.0",
filterToolsVersion = "4.0", filterToolsVersion = "4.0",
platformToolset = "v141"
} }
} }

View File

@ -36,6 +36,7 @@
-- Xcode always uses Mac OS X path and naming conventions -- Xcode always uses Mac OS X path and naming conventions
targetos = "macosx", targetos = "macosx",
toolset = "clang",
-- The capabilities of this action -- The capabilities of this action

View File

@ -531,7 +531,7 @@
local system = p.action.current().targetos or os.target() local system = p.action.current().targetos or os.target()
local architecture = nil local architecture = nil
local toolset = nil local toolset = p.action.current().toolset
if platform then if platform then
system = p.api.checkValue(p.fields.system, platform) or system system = p.api.checkValue(p.fields.system, platform) or system