diff options
author | Jason Perkins <starkos@industriousone.com> | 2011-10-21 23:32:18 +0400 |
---|---|---|
committer | Jason Perkins <starkos@industriousone.com> | 2011-10-21 23:32:18 +0400 |
commit | a9d58a40dcf7e41e4e1594cb4b93ea0459e8750d (patch) | |
tree | 04062134fb298220b4a220eae5ee9e01b16d365b /tests | |
parent | 6ddd47a765805af55a9a5fd91d8b840241b5e52c (diff) |
Patch 3317329: Support vstudio CompileAs for mixed-language projects (xpol)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/actions/vstudio/vc200x/files.lua | 73 | ||||
-rw-r--r-- | tests/actions/vstudio/vc200x/test_filters.lua | 6 |
2 files changed, 70 insertions, 9 deletions
diff --git a/tests/actions/vstudio/vc200x/files.lua b/tests/actions/vstudio/vc200x/files.lua index facb17d..4633674 100644 --- a/tests/actions/vstudio/vc200x/files.lua +++ b/tests/actions/vstudio/vc200x/files.lua @@ -32,18 +32,18 @@ -- function suite.SimpleSourceFile() - files { "hello.c" } + files { "hello.cpp" } prepare() test.capture [[ <File - RelativePath="hello.c" + RelativePath="hello.cpp" > </File> ]] end function suite.SingleFolderLevel() - files { "src/hello.c" } + files { "src/hello.cpp" } prepare() test.capture [[ <Filter @@ -51,7 +51,7 @@ Filter="" > <File - RelativePath="src\hello.c" + RelativePath="src\hello.cpp" > </File> </Filter> @@ -59,7 +59,7 @@ end function suite.MultipleFolderLevels() - files { "src/greetings/hello.c" } + files { "src/greetings/hello.cpp" } prepare() test.capture [[ <Filter @@ -71,7 +71,7 @@ Filter="" > <File - RelativePath="src\greetings\hello.c" + RelativePath="src\greetings\hello.cpp" > </File> </Filter> @@ -81,6 +81,67 @@ -- +-- Mixed language support +-- + + function suite.CompileAsC_InCppProject() + language "c++" + files { "hello.c" } + prepare() + test.capture [[ + <File + RelativePath="hello.c" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + CompileAs="1" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + CompileAs="1" + /> + </FileConfiguration> + </File> + ]] + end + + function suite.CompileAsCpp_InCProject() + language "c" + files { "hello.cpp" } + prepare() + test.capture [[ + <File + RelativePath="hello.cpp" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + CompileAs="2" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + CompileAs="2" + /> + </FileConfiguration> + </File> + ]] + end + + +-- -- PCH support -- diff --git a/tests/actions/vstudio/vc200x/test_filters.lua b/tests/actions/vstudio/vc200x/test_filters.lua index d2bb3cd..148dcd4 100644 --- a/tests/actions/vstudio/vc200x/test_filters.lua +++ b/tests/actions/vstudio/vc200x/test_filters.lua @@ -40,8 +40,8 @@ local vc200x = premake.vstudio.vc200x -- function suite.Filter_UsesVirtualForm_OnVpath() - files { "src/hello.c" } - vpaths { ["Source Files"] = "**.c" } + files { "src/hello.cpp" } + vpaths { ["Source Files"] = "**.cpp" } prepare() vc200x.Files(prj) test.capture [[ @@ -50,7 +50,7 @@ local vc200x = premake.vstudio.vc200x Filter="" > <File - RelativePath="src\hello.c" + RelativePath="src\hello.cpp" > </File> </Filter> |