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:
authorLiam Devine <dmail00@gmail.com>2011-09-08 17:30:10 +0400
committerLiam Devine <dmail00@gmail.com>2011-09-08 17:30:10 +0400
commit363a445f72d639db58f39d021b2ec4e4af8e27c4 (patch)
treea6a320950880cd7a50ec219aabdc16395ac2b290
parentf4aad44cf4edb864192497fca55a6605cf6ed417 (diff)
* Bug 3381149: Path of PCH source file in VS10 not being translated (intyuh)
Re- added unit test removed in 53abc69ab87c Applied patch from intyuh
-rw-r--r--CHANGES.txt1
-rw-r--r--src/actions/vstudio/vs2010_vcxproj.lua5
-rw-r--r--tests/actions/vstudio/test_vs2010_vcxproj.lua8
3 files changed, 11 insertions, 3 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 353ae86..05224d5 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -28,6 +28,7 @@
* Bug 3308203: Incorrect relative paths for gmake sibling static libraries (Adam)
* Bug 3277343: SM_SERVERR2 is not always defined by default (Martin Ridgers)
* Added os.stat
+* Bug 3381149: Path of PCH source file in VS10 not being translated (intyuh)
-------
4.3
diff --git a/src/actions/vstudio/vs2010_vcxproj.lua b/src/actions/vstudio/vs2010_vcxproj.lua
index f9b4c60..d13b472 100644
--- a/src/actions/vstudio/vs2010_vcxproj.lua
+++ b/src/actions/vstudio/vs2010_vcxproj.lua
@@ -515,9 +515,10 @@
_p(1,'<ItemGroup>')
for _, file in ipairs(files) do
- _p(2,'<ClCompile Include=\"%s\">', path.translate(file.name, "\\"))
+ local translatedpath = path.translate(file.name, "\\")
+ _p(2,'<ClCompile Include=\"%s\">', translatedpath)
for _, cfginfo in ipairs(configs) do
- if config_mappings[cfginfo] and file.name == config_mappings[cfginfo] then
+ if config_mappings[cfginfo] and translatedpath == config_mappings[cfginfo] then
_p(3,'<PrecompiledHeader '.. if_config_and_platform() .. '>Create</PrecompiledHeader>', premake.esc(cfginfo.name))
config_mappings[cfginfo] = nil --only one source file per pch
end
diff --git a/tests/actions/vstudio/test_vs2010_vcxproj.lua b/tests/actions/vstudio/test_vs2010_vcxproj.lua
index c28402f..d5de698 100644
--- a/tests/actions/vstudio/test_vs2010_vcxproj.lua
+++ b/tests/actions/vstudio/test_vs2010_vcxproj.lua
@@ -334,7 +334,13 @@
local buffer = get_buffer()
test.string_does_not_contain(buffer,debug_config_pch_string)
end
-
+ function vs10_vcxproj.pchHeaderAndPchSourceSet_bufferContainPchCreate()
+ configuration("Debug")
+ pchheader "foo/dummyHeader.h"
+ pchsource "foo/dummySource.cpp"
+ local buffer = get_buffer()
+ test.string_contains(buffer,debug_config_pch_string)
+ end
function vs10_vcxproj.wholeProgramOptimizationIsNotSetByDefault_bufferDoesNotContainWholeProgramOptimization()
local buffer = get_buffer()