[cmake-commits] alex committed cmLocalVisualStudio6Generator.cxx
1.120.4.2 1.120.4.3
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon May 7 08:48:14 EDT 2007
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv22158/Source
Modified Files:
Tag: CMake-ACC-TargetUsedAsCommand
cmLocalVisualStudio6Generator.cxx
Log Message:
ENH: also support target-as-command with the MSVC6 generator
Alex
Index: cmLocalVisualStudio6Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio6Generator.cxx,v
retrieving revision 1.120.4.2
retrieving revision 1.120.4.3
diff -u -d -r1.120.4.2 -r1.120.4.3
--- cmLocalVisualStudio6Generator.cxx 4 May 2007 21:17:34 -0000 1.120.4.2
+++ cmLocalVisualStudio6Generator.cxx 7 May 2007 12:48:12 -0000 1.120.4.3
@@ -1279,7 +1279,14 @@
// are there any custom rules on the target itself
// only if the target is a lib or exe
- std::string customRuleCode = this->CreateTargetRules(target, 0, libName);
+ std::string customRuleCodeRelease
+ = this->CreateTargetRules(target, "RELEASE", libName);
+ std::string customRuleCodeDebug
+ = this->CreateTargetRules(target, "DEBUG", libName);
+ std::string customRuleCodeMinSizeRel
+ = this->CreateTargetRules(target, "MINSIZEREL", libName);
+ std::string customRuleCodeRelWithDebInfo
+ = this->CreateTargetRules(target, "RELWITHDEBINFO", libName);
std::ifstream fin(this->DSPHeaderTemplate.c_str());
if(!fin)
@@ -1312,8 +1319,6 @@
}
cmSystemTools::ReplaceString(line, "OUTPUT_LIBNAME_EXPORTS",
exportSymbol.c_str());
- cmSystemTools::ReplaceString(line, "CMAKE_CUSTOM_RULE_CODE",
- customRuleCode.c_str());
cmSystemTools::ReplaceString(line, "CMAKE_MFC_FLAG",
mfcFlag);
if(target.GetType() == cmTarget::STATIC_LIBRARY )
@@ -1342,6 +1347,18 @@
cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIMIZED_LIBRARIES",
libMultiLineOptimizedOptions.c_str());
#endif
+
+ // Substitute the rules for custom command. When specifying just the
+ // target name for the command the command can be different for
+ // different configs
+ cmSystemTools::ReplaceString(line, "CMAKE_CUSTOM_RULE_CODE_RELEASE",
+ customRuleCodeRelease.c_str());
+ cmSystemTools::ReplaceString(line, "CMAKE_CUSTOM_RULE_CODE_DEBUG",
+ customRuleCodeDebug.c_str());
+ cmSystemTools::ReplaceString(line, "CMAKE_CUSTOM_RULE_CODE_MINSIZEREL",
+ customRuleCodeMinSizeRel.c_str());
+ cmSystemTools::ReplaceString(line, "CMAKE_CUSTOM_RULE_CODE_RELWITHDEBINFO",
+ customRuleCodeRelWithDebInfo.c_str());
// Substitute the real output name into the template.
cmSystemTools::ReplaceString(line, "OUTPUT_NAME_DEBUG",
More information about the Cmake-commits
mailing list