Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions/vstudio/vs200x_vcproj.lua')
-rw-r--r--src/actions/vstudio/vs200x_vcproj.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/actions/vstudio/vs200x_vcproj.lua b/src/actions/vstudio/vs200x_vcproj.lua
index d79c4bf..f90533a 100644
--- a/src/actions/vstudio/vs200x_vcproj.lua
+++ b/src/actions/vstudio/vs200x_vcproj.lua
@@ -136,9 +136,10 @@
local cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)
local usePCH = (not prj.flags.NoPCH and prj.pchsource == node.cfg.name)
- local useCompileAs = (path.iscfile(fname) ~= premake.project.iscproject(prj))
+ local isSourceCode = path.iscppfile(fname)
+ local needsCompileAs = (path.iscfile(fname) ~= premake.project.iscproject(prj))
- if usePCH or useCompileAs then
+ if usePCH or (isSourceCode and needsCompileAs) then
_p(depth, '<FileConfiguration')
_p(depth, '\tName="%s"', cfginfo.name)
_p(depth, '\t>')
@@ -146,8 +147,7 @@
_p(depth, '\t\tName="%s"', iif(cfg.system == "Xbox360",
"VCCLX360CompilerTool",
"VCCLCompilerTool"))
-
- if useCompileAs then
+ if needsCompileAs then
_p(depth, '\t\tCompileAs="%s"', iif(path.iscfile(fname), 1, 2))
end