diff --git a/modules/vstudio/tests/vc2010/test_files.lua b/modules/vstudio/tests/vc2010/test_files.lua index b59888fbd..28e6e532e 100644 --- a/modules/vstudio/tests/vc2010/test_files.lua +++ b/modules/vstudio/tests/vc2010/test_files.lua @@ -657,6 +657,18 @@ ]] end + function suite.onCompileAsExt() + files { "hello.unknown_ext" } + filter "files:hello.unknown_ext" + compileas "C++" + prepare() + test.capture [[ + + + CompileAsCpp + ]] + end + -- -- Check handling of per-file cdialect. -- diff --git a/modules/vstudio/vs2010_vcxproj.lua b/modules/vstudio/vs2010_vcxproj.lua index b31640325..e9ec8525e 100644 --- a/modules/vstudio/vs2010_vcxproj.lua +++ b/modules/vstudio/vs2010_vcxproj.lua @@ -1360,6 +1360,10 @@ if fcfg.buildaction then return m.categories[fcfg.buildaction] or m.categories.None end + + if fcfg.compileas ~= nil and fcfg.compileas ~= "Default" then + return m.categories.ClCompile + end end end