|
@@ -17,6 +17,7 @@
|
|
#include "cmSystemTools.h"
|
|
#include "cmSystemTools.h"
|
|
#include "cmSourceFile.h"
|
|
#include "cmSourceFile.h"
|
|
#include "cmCacheManager.h"
|
|
#include "cmCacheManager.h"
|
|
|
|
+#include "cmGeneratorTarget.h"
|
|
#include "cmake.h"
|
|
#include "cmake.h"
|
|
|
|
|
|
#include "cmComputeLinkInformation.h"
|
|
#include "cmComputeLinkInformation.h"
|
|
@@ -1310,9 +1311,6 @@ void cmLocalVisualStudio7Generator::WriteVCProjFile(std::ostream& fout,
|
|
sourceGroup.AssignSource(*i);
|
|
sourceGroup.AssignSource(*i);
|
|
}
|
|
}
|
|
|
|
|
|
- // Compute which sources need unique object computation.
|
|
|
|
- this->ComputeObjectNameRequirements(classes);
|
|
|
|
-
|
|
|
|
// open the project
|
|
// open the project
|
|
this->WriteProjectStart(fout, libName, target, sourceGroups);
|
|
this->WriteProjectStart(fout, libName, target, sourceGroups);
|
|
// write the configuration information
|
|
// write the configuration information
|
|
@@ -1352,8 +1350,7 @@ public:
|
|
cmLocalVisualStudio7GeneratorFCInfo(cmLocalVisualStudio7Generator* lg,
|
|
cmLocalVisualStudio7GeneratorFCInfo(cmLocalVisualStudio7Generator* lg,
|
|
cmTarget& target,
|
|
cmTarget& target,
|
|
cmSourceFile const& sf,
|
|
cmSourceFile const& sf,
|
|
- std::vector<std::string>* configs,
|
|
|
|
- std::string const& dir_max);
|
|
|
|
|
|
+ std::vector<std::string>* configs);
|
|
std::map<cmStdString, cmLVS7GFileConfig> FileConfigMap;
|
|
std::map<cmStdString, cmLVS7GFileConfig> FileConfigMap;
|
|
};
|
|
};
|
|
|
|
|
|
@@ -1361,13 +1358,14 @@ cmLocalVisualStudio7GeneratorFCInfo
|
|
::cmLocalVisualStudio7GeneratorFCInfo(cmLocalVisualStudio7Generator* lg,
|
|
::cmLocalVisualStudio7GeneratorFCInfo(cmLocalVisualStudio7Generator* lg,
|
|
cmTarget& target,
|
|
cmTarget& target,
|
|
cmSourceFile const& sf,
|
|
cmSourceFile const& sf,
|
|
- std::vector<std::string>* configs,
|
|
|
|
- std::string const& dir_max)
|
|
|
|
|
|
+ std::vector<std::string>* configs)
|
|
{
|
|
{
|
|
|
|
+ cmGeneratorTarget* gt =
|
|
|
|
+ lg->GetGlobalGenerator()->GetGeneratorTarget(&target);
|
|
std::string objectName;
|
|
std::string objectName;
|
|
- if(lg->NeedObjectName.find(&sf) != lg->NeedObjectName.end())
|
|
|
|
|
|
+ if(gt->ExplicitObjectName.find(&sf) != gt->ExplicitObjectName.end())
|
|
{
|
|
{
|
|
- objectName = lg->GetObjectFileNameWithoutTarget(sf, dir_max);
|
|
|
|
|
|
+ objectName = gt->Objects[&sf];
|
|
}
|
|
}
|
|
|
|
|
|
// Compute per-source, per-config information.
|
|
// Compute per-source, per-config information.
|
|
@@ -1478,11 +1476,11 @@ cmLocalVisualStudio7GeneratorFCInfo
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
-void cmLocalVisualStudio7Generator
|
|
|
|
-::ComputeMaxDirectoryLength(std::string& maxdir,
|
|
|
|
- cmTarget& target)
|
|
|
|
-{
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
|
+std::string
|
|
|
|
+cmLocalVisualStudio7Generator
|
|
|
|
+::ComputeLongestObjectDirectory(cmTarget& target) const
|
|
|
|
+{
|
|
std::vector<std::string> *configs =
|
|
std::vector<std::string> *configs =
|
|
static_cast<cmGlobalVisualStudio7Generator *>
|
|
static_cast<cmGlobalVisualStudio7Generator *>
|
|
(this->GlobalGenerator)->GetConfigurations();
|
|
(this->GlobalGenerator)->GetConfigurations();
|
|
@@ -1507,7 +1505,7 @@ void cmLocalVisualStudio7Generator
|
|
dir_max += "/";
|
|
dir_max += "/";
|
|
dir_max += config_max;
|
|
dir_max += config_max;
|
|
dir_max += "/";
|
|
dir_max += "/";
|
|
- maxdir = dir_max;
|
|
|
|
|
|
+ return dir_max;
|
|
}
|
|
}
|
|
|
|
|
|
void cmLocalVisualStudio7Generator
|
|
void cmLocalVisualStudio7Generator
|
|
@@ -1530,19 +1528,13 @@ void cmLocalVisualStudio7Generator
|
|
this->WriteVCProjBeginGroup(fout, name.c_str(), "");
|
|
this->WriteVCProjBeginGroup(fout, name.c_str(), "");
|
|
}
|
|
}
|
|
|
|
|
|
- // Compute the maximum length full path to the intermediate
|
|
|
|
- // files directory for any configuration. This is used to construct
|
|
|
|
- // object file names that do not produce paths that are too long.
|
|
|
|
- std::string dir_max;
|
|
|
|
- this->ComputeMaxDirectoryLength(dir_max, target);
|
|
|
|
-
|
|
|
|
// Loop through each source in the source group.
|
|
// Loop through each source in the source group.
|
|
std::string objectName;
|
|
std::string objectName;
|
|
for(std::vector<const cmSourceFile *>::const_iterator sf =
|
|
for(std::vector<const cmSourceFile *>::const_iterator sf =
|
|
sourceFiles.begin(); sf != sourceFiles.end(); ++sf)
|
|
sourceFiles.begin(); sf != sourceFiles.end(); ++sf)
|
|
{
|
|
{
|
|
std::string source = (*sf)->GetFullPath();
|
|
std::string source = (*sf)->GetFullPath();
|
|
- FCInfo fcinfo(this, target, *(*sf), configs, dir_max);
|
|
|
|
|
|
+ FCInfo fcinfo(this, target, *(*sf), configs);
|
|
|
|
|
|
if (source != libName || target.GetType() == cmTarget::UTILITY ||
|
|
if (source != libName || target.GetType() == cmTarget::UTILITY ||
|
|
target.GetType() == cmTarget::GLOBAL_TARGET )
|
|
target.GetType() == cmTarget::GLOBAL_TARGET )
|