diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-06-20 20:25:02 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-06-20 20:25:02 (GMT) |
commit | 08b95e9cd89c4b44f58f46394792c4a974896ddf (patch) | |
tree | b75ff3b6aff6b7d8cf40838b7c1f0034758dfeea /Source | |
parent | 85b8534aead8d2c10a70f1e28ba8020e120616fd (diff) | |
download | CMake-08b95e9cd89c4b44f58f46394792c4a974896ddf.zip CMake-08b95e9cd89c4b44f58f46394792c4a974896ddf.tar.gz CMake-08b95e9cd89c4b44f58f46394792c4a974896ddf.tar.bz2 |
BUG: fix for bug 7222 manifest:no not working for makefiles
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmake.cxx | 38 | ||||
-rw-r--r-- | Source/cmake.h | 5 |
2 files changed, 33 insertions, 10 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 0a58904..5f933a1 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -3890,25 +3890,40 @@ int cmake::VisualStudioLink(std::vector<std::string>& args, int type) expandedArgs.push_back(*i); } } - // figure out if this is an incremental link or not and run the correct - // link function. + bool hasIncremental = false; + bool hasManifest = true; for(std::vector<std::string>::iterator i = expandedArgs.begin(); i != expandedArgs.end(); ++i) { if(cmSystemTools::Strucmp(i->c_str(), "/INCREMENTAL:YES") == 0) { - if(verbose) - { - std::cout << "Visual Studio Incremental Link\n"; - } - return cmake::VisualStudioLinkIncremental(expandedArgs, type, verbose); + hasIncremental = true; + } + if(cmSystemTools::Strucmp(i->c_str(), "/MANIFEST:NO") == 0) + { + hasManifest = false; + } + } + if(hasIncremental && hasManifest) + { + if(verbose) + { + std::cout << "Visual Studio Incremental Link with embeded manifests\n"; } + return cmake::VisualStudioLinkIncremental(expandedArgs, type, verbose); } if(verbose) { - std::cout << "Visual Studio Non-Incremental Link\n"; + if(!hasIncremental) + { + std::cout << "Visual Studio Non-Incremental Link\n"; + } + else + { + std::cout << "Visual Studio Incremental Link without manifests\n"; + } } - return cmake::VisualStudioLinkNonIncremental(expandedArgs, type, verbose); + return cmake::VisualStudioLinkNonIncremental(expandedArgs, type, hasManifest, verbose); } 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 type, + bool hasManifest, bool verbose) { std::vector<cmStdString> linkCommand; @@ -4126,6 +4142,10 @@ int cmake::VisualStudioLinkNonIncremental(std::vector<std::string>& args, { return -1; } + if(!hasManifest) + { + return 0; + } std::vector<cmStdString> mtCommand; mtCommand.push_back(cmSystemTools::FindProgram("mt.exe")); mtCommand.push_back("/nologo"); diff --git a/Source/cmake.h b/Source/cmake.h index 8dd5ad1..1c4351a 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -416,6 +416,7 @@ protected: bool verbose); static int VisualStudioLinkNonIncremental(std::vector<std::string>& args, int type, + bool hasManifest, bool verbose); static int ParseVisualStudioLinkCommand(std::vector<std::string>& args, std::vector<cmStdString>& command, @@ -428,7 +429,9 @@ protected: ///! Find the full path to one of the cmake programs like ctest, cpack, etc. std::string FindCMakeProgram(const char* name) const; -private: +private: + cmake(const cmake&); // Not implemented. + void operator=(const cmake&); // Not implemented. ProgressCallbackType ProgressCallback; void* ProgressCallbackClientData; bool Verbose; |