summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2010-12-20 20:25:16 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2010-12-20 20:25:16 (GMT)
commitf578381e6624b83843a1b9ff079a8073f7bc210f (patch)
tree36dd32e852db797d07137ab2b33ed257198d165c /Source/cmVisualStudio10TargetGenerator.cxx
parent34a2dee75d80afe175bd041e26be10da9c09a74f (diff)
downloadCMake-f578381e6624b83843a1b9ff079a8073f7bc210f.zip
CMake-f578381e6624b83843a1b9ff079a8073f7bc210f.tar.gz
CMake-f578381e6624b83843a1b9ff079a8073f7bc210f.tar.bz2
Fix vs2010 project generation error when HEADER_FILE_ONLY is set.
In vs2010 a bad project file could be generated if a .c or .cxx file was marked with HEADER_FILE_ONLY, if it was in a library that contained both c and c++ code. This fixes the error in the code, and adds a test for this case.
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index f78aeec..8d3416a 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -700,7 +700,7 @@ void cmVisualStudio10TargetGenerator::WriteCLSources()
}
(*this->BuildFileStream ) << sourceFile << "\"";
// ouput any flags specific to this source file
- if(cl && this->OutputSourceSpecificFlags(*source))
+ if(!header && cl && this->OutputSourceSpecificFlags(*source))
{
// if the source file has specific flags the tag
// is ended on a new line