BUG: fix for bug 7222 manifest:no not working for makefiles
This commit is contained in:
parent
85b8534aea
commit
08b95e9cd8
|
@ -3890,25 +3890,40 @@ int cmake::VisualStudioLink(std::vector<std::string>& args, int type)
|
||||||
expandedArgs.push_back(*i);
|
expandedArgs.push_back(*i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// figure out if this is an incremental link or not and run the correct
|
bool hasIncremental = false;
|
||||||
// link function.
|
bool hasManifest = true;
|
||||||
for(std::vector<std::string>::iterator i = expandedArgs.begin();
|
for(std::vector<std::string>::iterator i = expandedArgs.begin();
|
||||||
i != expandedArgs.end(); ++i)
|
i != expandedArgs.end(); ++i)
|
||||||
{
|
{
|
||||||
if(cmSystemTools::Strucmp(i->c_str(), "/INCREMENTAL:YES") == 0)
|
if(cmSystemTools::Strucmp(i->c_str(), "/INCREMENTAL:YES") == 0)
|
||||||
|
{
|
||||||
|
hasIncremental = true;
|
||||||
|
}
|
||||||
|
if(cmSystemTools::Strucmp(i->c_str(), "/MANIFEST:NO") == 0)
|
||||||
|
{
|
||||||
|
hasManifest = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(hasIncremental && hasManifest)
|
||||||
{
|
{
|
||||||
if(verbose)
|
if(verbose)
|
||||||
{
|
{
|
||||||
std::cout << "Visual Studio Incremental Link\n";
|
std::cout << "Visual Studio Incremental Link with embeded manifests\n";
|
||||||
}
|
}
|
||||||
return cmake::VisualStudioLinkIncremental(expandedArgs, type, verbose);
|
return cmake::VisualStudioLinkIncremental(expandedArgs, type, verbose);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if(verbose)
|
if(verbose)
|
||||||
|
{
|
||||||
|
if(!hasIncremental)
|
||||||
{
|
{
|
||||||
std::cout << "Visual Studio Non-Incremental Link\n";
|
std::cout << "Visual Studio Non-Incremental Link\n";
|
||||||
}
|
}
|
||||||
return cmake::VisualStudioLinkNonIncremental(expandedArgs, type, verbose);
|
else
|
||||||
|
{
|
||||||
|
std::cout << "Visual Studio Incremental Link without manifests\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return cmake::VisualStudioLinkNonIncremental(expandedArgs, type, hasManifest, verbose);
|
||||||
}
|
}
|
||||||
|
|
||||||
int cmake::ParseVisualStudioLinkCommand(std::vector<std::string>& args,
|
int cmake::ParseVisualStudioLinkCommand(std::vector<std::string>& args,
|
||||||
|
@ -4113,6 +4128,7 @@ int cmake::VisualStudioLinkIncremental(std::vector<std::string>& args,
|
||||||
|
|
||||||
int cmake::VisualStudioLinkNonIncremental(std::vector<std::string>& args,
|
int cmake::VisualStudioLinkNonIncremental(std::vector<std::string>& args,
|
||||||
int type,
|
int type,
|
||||||
|
bool hasManifest,
|
||||||
bool verbose)
|
bool verbose)
|
||||||
{
|
{
|
||||||
std::vector<cmStdString> linkCommand;
|
std::vector<cmStdString> linkCommand;
|
||||||
|
@ -4126,6 +4142,10 @@ int cmake::VisualStudioLinkNonIncremental(std::vector<std::string>& args,
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
if(!hasManifest)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
std::vector<cmStdString> mtCommand;
|
std::vector<cmStdString> mtCommand;
|
||||||
mtCommand.push_back(cmSystemTools::FindProgram("mt.exe"));
|
mtCommand.push_back(cmSystemTools::FindProgram("mt.exe"));
|
||||||
mtCommand.push_back("/nologo");
|
mtCommand.push_back("/nologo");
|
||||||
|
|
|
@ -416,6 +416,7 @@ protected:
|
||||||
bool verbose);
|
bool verbose);
|
||||||
static int VisualStudioLinkNonIncremental(std::vector<std::string>& args,
|
static int VisualStudioLinkNonIncremental(std::vector<std::string>& args,
|
||||||
int type,
|
int type,
|
||||||
|
bool hasManifest,
|
||||||
bool verbose);
|
bool verbose);
|
||||||
static int ParseVisualStudioLinkCommand(std::vector<std::string>& args,
|
static int ParseVisualStudioLinkCommand(std::vector<std::string>& args,
|
||||||
std::vector<cmStdString>& command,
|
std::vector<cmStdString>& command,
|
||||||
|
@ -429,6 +430,8 @@ protected:
|
||||||
///! Find the full path to one of the cmake programs like ctest, cpack, etc.
|
///! Find the full path to one of the cmake programs like ctest, cpack, etc.
|
||||||
std::string FindCMakeProgram(const char* name) const;
|
std::string FindCMakeProgram(const char* name) const;
|
||||||
private:
|
private:
|
||||||
|
cmake(const cmake&); // Not implemented.
|
||||||
|
void operator=(const cmake&); // Not implemented.
|
||||||
ProgressCallbackType ProgressCallback;
|
ProgressCallbackType ProgressCallback;
|
||||||
void* ProgressCallbackClientData;
|
void* ProgressCallbackClientData;
|
||||||
bool Verbose;
|
bool Verbose;
|
||||||
|
|
Loading…
Reference in New Issue