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
|
if cfg.kind == p.UTILITY then
|
||||||
return {
|
return {
|
||||||
m.configurationType,
|
m.configurationType,
|
||||||
|
m.platformToolset,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return {
|
return {
|
||||||
@ -1515,13 +1516,16 @@
|
|||||||
version = action.vstudio.platformToolset
|
version = action.vstudio.platformToolset
|
||||||
end
|
end
|
||||||
if version then
|
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
|
for i = 1, #cfg.files do
|
||||||
if path.iscppfile(cfg.files[i]) then
|
if path.iscppfile(cfg.files[i]) then
|
||||||
m.element("PlatformToolset", nil, version)
|
m.element("PlatformToolset", nil, version)
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
m.element("PlatformToolset", nil, version)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -56,17 +56,6 @@
|
|||||||
end
|
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.
|
-- Check for overrides from project scripts.
|
||||||
--
|
--
|
||||||
|
Loading…
Reference in New Issue
Block a user