diff options
author | Brad King <brad.king@kitware.com> | 2006-08-03 13:26:36 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2006-08-03 13:26:36 (GMT) |
commit | 24b55bfe11db52b37795b241272b0a1511e12bd5 (patch) | |
tree | b0e000d57245708d0a29fdf0789218e4a67a5888 /Source/cmLocalVisualStudioGenerator.cxx | |
parent | 88702ff4424478dac8efef80324437632584fbff (diff) | |
download | CMake-24b55bfe11db52b37795b241272b0a1511e12bd5.zip CMake-24b55bfe11db52b37795b241272b0a1511e12bd5.tar.gz CMake-24b55bfe11db52b37795b241272b0a1511e12bd5.tar.bz2 |
BUG: Make sure sources with unknown extensions are not compiled by VS.
Diffstat (limited to 'Source/cmLocalVisualStudioGenerator.cxx')
-rw-r--r-- | Source/cmLocalVisualStudioGenerator.cxx | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx index 5ff0966..16164d1 100644 --- a/Source/cmLocalVisualStudioGenerator.cxx +++ b/Source/cmLocalVisualStudioGenerator.cxx @@ -33,9 +33,19 @@ cmLocalVisualStudioGenerator::~cmLocalVisualStudioGenerator() //---------------------------------------------------------------------------- bool cmLocalVisualStudioGenerator::SourceFileCompiles(const cmSourceFile* sf) { - return (!sf->GetCustomCommand() && - !sf->GetPropertyAsBool("HEADER_FILE_ONLY") && - !sf->GetPropertyAsBool("EXTERNAL_OBJECT")); + // Identify the language of the source file. + if(const char* lang = this->GetSourceFileLanguage(*sf)) + { + // Check whether this source will actually be compiled. + return (!sf->GetCustomCommand() && + !sf->GetPropertyAsBool("HEADER_FILE_ONLY") && + !sf->GetPropertyAsBool("EXTERNAL_OBJECT")); + } + else + { + // Unknown source file language. Assume it will not be compiled. + return false; + } } //---------------------------------------------------------------------------- |