summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2009-10-23 21:02:27 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2009-10-23 21:02:27 (GMT)
commit7963046350f05c2ccf296c6a4c05b41d7d5356aa (patch)
treeaab390d08074b897108f68723b5da4770a7232d8 /Source
parent8ae66bf456e1496113c576595639c111baee6471 (diff)
downloadCMake-7963046350f05c2ccf296c6a4c05b41d7d5356aa.zip
CMake-7963046350f05c2ccf296c6a4c05b41d7d5356aa.tar.gz
CMake-7963046350f05c2ccf296c6a4c05b41d7d5356aa.tar.bz2
Fix the showing of non-cpp files in the IDE
Diffstat (limited to 'Source')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index f0ce049..52981f3 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -567,7 +567,7 @@ void cmVisualStudio10TargetGenerator::WriteCLSources()
|| this->GlobalGenerator->IgnoreFile
((*source)->GetExtension().c_str());
const char* lang = (*source)->GetLanguage();
- if(header || lang && (strcmp(lang, "C") == 0 || strcmp(lang, "CXX") ==0))
+ bool cl = lang && (strcmp(lang, "C") == 0 || strcmp(lang, "CXX") ==0);
{
std::string sourceFile = (*source)->GetFullPath();
sourceFile = cmSystemTools::RelativePath(
@@ -579,13 +579,17 @@ void cmVisualStudio10TargetGenerator::WriteCLSources()
{
this->WriteString("<ClInclude Include=\"", 2);
}
- else
+ else if(cl)
{
this->WriteString("<ClCompile Include=\"", 2);
}
+ else
+ {
+ this->WriteString("<None Include=\"", 2);
+ }
(*this->BuildFileStream ) << sourceFile << "\"";
// ouput any flags specific to this source file
- if(this->OutputSourceSpecificFlags(*source))
+ if(cl && this->OutputSourceSpecificFlags(*source))
{
// if the source file has specific flags the tag
// is ended on a new line