Empty projects no longer ignore platform toolset when there are no "cpp" files present. Fixes #93
This commit is contained in:
parent
f1f0b55639
commit
0c497da65e
@ -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
|
||||
|
||||
|
@ -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.
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user