Empty projects no longer ignore platform toolset when there are no "cpp" files present. Fixes #93

This commit is contained in:
Sam Surtees 2015-08-24 20:56:44 +10:00
parent f1f0b55639
commit 0c497da65e
2 changed files with 9 additions and 16 deletions

View File

@ -143,6 +143,7 @@
if cfg.kind == p.UTILITY then
return {
m.configurationType,
m.platformToolset,
}
else
return {
@ -1515,13 +1516,16 @@
version = action.vstudio.platformToolset
end
if version then
-- should only be written if there is a C/C++ file in the config
if cfg.kind == p.NONE or cfg.kind == p.MAKEFILE then
for i = 1, #cfg.files do
if path.iscppfile(cfg.files[i]) then
m.element("PlatformToolset", nil, version)
break
end
end
else
m.element("PlatformToolset", nil, version)
end
end
end

View File

@ -56,17 +56,6 @@
end
--
-- Element should only be written if C++ files are present.
--
function suite.empty_onNoRelevantSources()
removefiles "hello.cpp"
prepare()
test.isemptycapture()
end
--
-- Check for overrides from project scripts.
--