|
|
@@ -1142,6 +1142,10 @@ void cmLocalVisualStudio6Generator
|
|
|
|
|
|
// Get extra linker options for this target type.
|
|
|
std::string extraLinkOptions;
|
|
|
+ std::string extraLinkOptionsDebug;
|
|
|
+ std::string extraLinkOptionsRelease;
|
|
|
+ std::string extraLinkOptionsMinSizeRel;
|
|
|
+ std::string extraLinkOptionsRelWithDebInfo;
|
|
|
if(target.GetType() == cmTarget::EXECUTABLE)
|
|
|
{
|
|
|
extraLinkOptions =
|
|
|
@@ -1165,6 +1169,33 @@ void cmLocalVisualStudio6Generator
|
|
|
extraLinkOptions += targetLinkFlags;
|
|
|
}
|
|
|
|
|
|
+ if(const char* targetLinkFlags = target.GetProperty("LINK_FLAGS_DEBUG"))
|
|
|
+ {
|
|
|
+ extraLinkOptionsDebug += " ";
|
|
|
+ extraLinkOptionsDebug += targetLinkFlags;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(const char* targetLinkFlags = target.GetProperty("LINK_FLAGS_RELEASE"))
|
|
|
+ {
|
|
|
+ extraLinkOptionsRelease += " ";
|
|
|
+ extraLinkOptionsRelease += targetLinkFlags;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(const char* targetLinkFlags = target.GetProperty("LINK_FLAGS_MINSIZEREL"))
|
|
|
+ {
|
|
|
+ extraLinkOptionsMinSizeRel += " ";
|
|
|
+ extraLinkOptionsMinSizeRel += targetLinkFlags;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(const char* targetLinkFlags = target.GetProperty("LINK_FLAGS_RELWITHDEBINFO"))
|
|
|
+ {
|
|
|
+ extraLinkOptionsRelWithDebInfo += " ";
|
|
|
+ extraLinkOptionsRelWithDebInfo += targetLinkFlags;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
// Get standard libraries for this language.
|
|
|
if(targetBuilds)
|
|
|
{
|
|
|
@@ -1259,13 +1290,21 @@ void cmLocalVisualStudio6Generator
|
|
|
target.GetType() == cmTarget::SHARED_LIBRARY ||
|
|
|
target.GetType() == cmTarget::MODULE_LIBRARY)
|
|
|
{
|
|
|
- this->ComputeLinkOptions(target, "Debug", extraLinkOptions,
|
|
|
+ extraLinkOptionsDebug =
|
|
|
+ extraLinkOptions + " " + extraLinkOptionsDebug;
|
|
|
+ extraLinkOptionsRelease =
|
|
|
+ extraLinkOptions + " " + extraLinkOptionsRelease;
|
|
|
+ extraLinkOptionsMinSizeRel =
|
|
|
+ extraLinkOptions + " " + extraLinkOptionsMinSizeRel;
|
|
|
+ extraLinkOptionsRelWithDebInfo =
|
|
|
+ extraLinkOptions + " " + extraLinkOptionsRelWithDebInfo;
|
|
|
+ this->ComputeLinkOptions(target, "Debug", extraLinkOptionsDebug,
|
|
|
optionsDebug);
|
|
|
- this->ComputeLinkOptions(target, "Release", extraLinkOptions,
|
|
|
+ this->ComputeLinkOptions(target, "Release", extraLinkOptionsRelease,
|
|
|
optionsRelease);
|
|
|
- this->ComputeLinkOptions(target, "MinSizeRel", extraLinkOptions,
|
|
|
+ this->ComputeLinkOptions(target, "MinSizeRel", extraLinkOptionsMinSizeRel,
|
|
|
optionsMinSizeRel);
|
|
|
- this->ComputeLinkOptions(target, "RelWithDebInfo", extraLinkOptions,
|
|
|
+ this->ComputeLinkOptions(target, "RelWithDebInfo", extraLinkOptionsRelWithDebInfo,
|
|
|
optionsRelWithDebInfo);
|
|
|
}
|
|
|
|
|
|
@@ -1342,11 +1381,43 @@ void cmLocalVisualStudio6Generator
|
|
|
cmSystemTools::Error("Error Reading ", this->DSPHeaderTemplate.c_str());
|
|
|
}
|
|
|
std::string staticLibOptions;
|
|
|
+ std::string staticLibOptionsDebug;
|
|
|
+ std::string staticLibOptionsRelease;
|
|
|
+ std::string staticLibOptionsMinSizeRel;
|
|
|
+ std::string staticLibOptionsRelWithDebInfo;
|
|
|
if(target.GetType() == cmTarget::STATIC_LIBRARY )
|
|
|
{
|
|
|
if(const char* libflags = target.GetProperty("STATIC_LIBRARY_FLAGS"))
|
|
|
{
|
|
|
staticLibOptions = libflags;
|
|
|
+ staticLibOptionsDebug = libflags;
|
|
|
+ staticLibOptionsRelease = libflags;
|
|
|
+ staticLibOptionsMinSizeRel = libflags;
|
|
|
+ staticLibOptionsRelWithDebInfo = libflags;
|
|
|
+ }
|
|
|
+ if(const char* libflagsDebug =
|
|
|
+ target.GetProperty("STATIC_LIBRARY_FLAGS_DEBUG"))
|
|
|
+ {
|
|
|
+ staticLibOptionsDebug += " ";
|
|
|
+ staticLibOptionsDebug = libflagsDebug;
|
|
|
+ }
|
|
|
+ if(const char* libflagsRelease =
|
|
|
+ target.GetProperty("STATIC_LIBRARY_FLAGS_RELEASE"))
|
|
|
+ {
|
|
|
+ staticLibOptionsRelease += " ";
|
|
|
+ staticLibOptionsRelease = libflagsRelease;
|
|
|
+ }
|
|
|
+ if(const char* libflagsMinSizeRel =
|
|
|
+ target.GetProperty("STATIC_LIBRARY_FLAGS_MINSIZEREL"))
|
|
|
+ {
|
|
|
+ staticLibOptionsMinSizeRel += " ";
|
|
|
+ staticLibOptionsMinSizeRel = libflagsMinSizeRel;
|
|
|
+ }
|
|
|
+ if(const char* libflagsRelWithDebInfo =
|
|
|
+ target.GetProperty("STATIC_LIBRARY_FLAGS_RELWITHDEBINFO"))
|
|
|
+ {
|
|
|
+ staticLibOptionsRelWithDebInfo += " ";
|
|
|
+ staticLibOptionsRelWithDebInfo = libflagsRelWithDebInfo;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -1378,6 +1449,14 @@ void cmLocalVisualStudio6Generator
|
|
|
mfcFlag);
|
|
|
if(target.GetType() == cmTarget::STATIC_LIBRARY )
|
|
|
{
|
|
|
+ cmSystemTools::ReplaceString(line, "CM_STATIC_LIB_ARGS_DEBUG",
|
|
|
+ staticLibOptionsDebug.c_str());
|
|
|
+ cmSystemTools::ReplaceString(line, "CM_STATIC_LIB_ARGS_RELEASE",
|
|
|
+ staticLibOptionsRelease.c_str());
|
|
|
+ cmSystemTools::ReplaceString(line, "CM_STATIC_LIB_ARGS_MINSIZEREL",
|
|
|
+ staticLibOptionsMinSizeRel.c_str());
|
|
|
+ cmSystemTools::ReplaceString(line, "CM_STATIC_LIB_ARGS_RELWITHDEBINFO",
|
|
|
+ staticLibOptionsRelWithDebInfo.c_str());
|
|
|
cmSystemTools::ReplaceString(line, "CM_STATIC_LIB_ARGS",
|
|
|
staticLibOptions.c_str());
|
|
|
}
|
|
|
@@ -1519,41 +1598,18 @@ void cmLocalVisualStudio6Generator
|
|
|
std::string flagVar = baseFlagVar + "_RELEASE";
|
|
|
flagsRelease = this->Makefile->GetSafeDefinition(flagVar.c_str());
|
|
|
flagsRelease += " -DCMAKE_INTDIR=\\\"Release\\\" ";
|
|
|
- if(const char* targetLinkFlags =
|
|
|
- target.GetProperty("LINK_FLAGS_RELEASE"))
|
|
|
- {
|
|
|
- flagsRelease += targetLinkFlags;
|
|
|
- flagsRelease += " ";
|
|
|
- }
|
|
|
+
|
|
|
flagVar = baseFlagVar + "_MINSIZEREL";
|
|
|
flagsMinSize = this->Makefile->GetSafeDefinition(flagVar.c_str());
|
|
|
flagsMinSize += " -DCMAKE_INTDIR=\\\"MinSizeRel\\\" ";
|
|
|
- if(const char* targetLinkFlags =
|
|
|
- target.GetProperty("LINK_FLAGS_MINSIZEREL"))
|
|
|
- {
|
|
|
- flagsMinSize += targetLinkFlags;
|
|
|
- flagsMinSize += " ";
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
flagVar = baseFlagVar + "_DEBUG";
|
|
|
flagsDebug = this->Makefile->GetSafeDefinition(flagVar.c_str());
|
|
|
flagsDebug += " -DCMAKE_INTDIR=\\\"Debug\\\" ";
|
|
|
- if(const char* targetLinkFlags = target.GetProperty("LINK_FLAGS_DEBUG"))
|
|
|
- {
|
|
|
- flagsDebug += targetLinkFlags;
|
|
|
- flagsDebug += " ";
|
|
|
- }
|
|
|
|
|
|
flagVar = baseFlagVar + "_RELWITHDEBINFO";
|
|
|
flagsDebugRel = this->Makefile->GetSafeDefinition(flagVar.c_str());
|
|
|
flagsDebugRel += " -DCMAKE_INTDIR=\\\"RelWithDebInfo\\\" ";
|
|
|
- if(const char* targetLinkFlags =
|
|
|
- target.GetProperty("LINK_FLAGS_RELWITHDEBINFO"))
|
|
|
- {
|
|
|
- flagsDebugRel += targetLinkFlags;
|
|
|
- flagsDebugRel += " ";
|
|
|
- }
|
|
|
-
|
|
|
}
|
|
|
|
|
|
// if unicode is not found, then add -D_MBCS
|