summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudioGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-03-07 19:04:33 (GMT)
committerBrad King <brad.king@kitware.com>2012-03-09 20:16:02 (GMT)
commitd57047de33e096eac6fc84976c733b7941c9add3 (patch)
treed1c9a84831140591d95919bea4683d9408a0a611 /Source/cmLocalVisualStudioGenerator.cxx
parent3baaf6ccecb9117b613fc89cd37206960298dfaa (diff)
downloadCMake-d57047de33e096eac6fc84976c733b7941c9add3.zip
CMake-d57047de33e096eac6fc84976c733b7941c9add3.tar.gz
CMake-d57047de33e096eac6fc84976c733b7941c9add3.tar.bz2
Pre-compute object file names before VS project generation
Implement cmGlobalGenerator::ComputeTargetObjects in the VS generator to pre-compute all the object file names. Use the results during generation instead of re-computing it later.
Diffstat (limited to 'Source/cmLocalVisualStudioGenerator.cxx')
-rw-r--r--Source/cmLocalVisualStudioGenerator.cxx63
1 files changed, 0 insertions, 63 deletions
diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx
index f389b35..4bcf4de 100644
--- a/Source/cmLocalVisualStudioGenerator.cxx
+++ b/Source/cmLocalVisualStudioGenerator.cxx
@@ -65,69 +65,6 @@ cmLocalVisualStudioGenerator::MaybeCreateImplibDir(cmTarget& target,
}
//----------------------------------------------------------------------------
-bool cmLocalVisualStudioGenerator::SourceFileCompiles(const cmSourceFile* sf)
-{
- // 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;
- }
-}
-
-//----------------------------------------------------------------------------
-void
-cmLocalVisualStudioGenerator::ComputeObjectNameRequirements(
- std::vector<cmSourceFile*> const& sources
- )
-{
- // Clear the current set of requirements.
- this->NeedObjectName.clear();
-
- // Count the number of object files with each name. Note that
- // windows file names are not case sensitive.
- std::map<cmStdString, int> counts;
- for(std::vector<cmSourceFile*>::const_iterator s = sources.begin();
- s != sources.end(); ++s)
- {
- const cmSourceFile* sf = *s;
- if(this->SourceFileCompiles(sf))
- {
- std::string objectName = cmSystemTools::LowerCase(
- cmSystemTools::GetFilenameWithoutLastExtension(
- sf->GetFullPath()));
- objectName += ".obj";
- counts[objectName] += 1;
- }
- }
-
- // For all source files producing duplicate names we need unique
- // object name computation.
- for(std::vector<cmSourceFile*>::const_iterator s = sources.begin();
- s != sources.end(); ++s)
- {
- const cmSourceFile* sf = *s;
- if(this->SourceFileCompiles(sf))
- {
- std::string objectName = cmSystemTools::LowerCase(
- cmSystemTools::GetFilenameWithoutLastExtension(sf->GetFullPath()));
- objectName += ".obj";
- if(counts[objectName] > 1)
- {
- this->NeedObjectName.insert(sf);
- }
- }
- }
-}
-
-//----------------------------------------------------------------------------
const char* cmLocalVisualStudioGenerator::ReportErrorLabel() const
{
return ":VCReportError";