[Cmake-commits] [cmake-commits] king committed cmLocalVisualStudio6Generator.cxx 1.161 1.162

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Oct 28 12:18:56 EDT 2009


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv22556/Source

Modified Files:
	cmLocalVisualStudio6Generator.cxx 
Log Message:
Use per-config output dir in VS 6 templates

This commit removes use of configuration-less cmTarget::GetDirectory()
by the VS 6 generator (except for compatibility with user templates).
We replace OUTPUT_DIRECTORY_<CONFIG> tokens in the templates using the
per-configuration result of cmTarget::GetDirectory(config).


Index: cmLocalVisualStudio6Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio6Generator.cxx,v
retrieving revision 1.161
retrieving revision 1.162
diff -C 2 -d -r1.161 -r1.162
*** cmLocalVisualStudio6Generator.cxx	30 Sep 2009 20:03:08 -0000	1.161
--- cmLocalVisualStudio6Generator.cxx	28 Oct 2009 16:18:52 -0000	1.162
***************
*** 1194,1197 ****
--- 1194,1221 ----
      }
  
+   // Compute the output directory for the target.
+   std::string outputDirDebug;
+   std::string outputDirRelease;
+   std::string outputDirMinSizeRel;
+   std::string outputDirRelWithDebInfo;
+   if(target.GetType() == cmTarget::EXECUTABLE ||
+      target.GetType() == cmTarget::STATIC_LIBRARY ||
+      target.GetType() == cmTarget::SHARED_LIBRARY ||
+      target.GetType() == cmTarget::MODULE_LIBRARY)
+     {
+     outputDirDebug =
+         removeQuotes(this->ConvertToOptionallyRelativeOutputPath(
+                        target.GetDirectory("Debug").c_str()));
+     outputDirRelease =
+         removeQuotes(this->ConvertToOptionallyRelativeOutputPath(
+                  target.GetDirectory("Release").c_str()));
+     outputDirMinSizeRel =
+         removeQuotes(this->ConvertToOptionallyRelativeOutputPath(
+                  target.GetDirectory("MinSizeRel").c_str()));
+     outputDirRelWithDebInfo =
+         removeQuotes(this->ConvertToOptionallyRelativeOutputPath(
+                  target.GetDirectory("RelWithDebInfo").c_str()));
+     }
+ 
    // Compute the proper link information for the target.
    std::string optionsDebug;
***************
*** 1413,1416 ****
--- 1437,1449 ----
      if(targetBuilds)
        {
+       cmSystemTools::ReplaceString(line, "OUTPUT_DIRECTORY_DEBUG",
+                                    outputDirDebug.c_str());
+       cmSystemTools::ReplaceString(line, "OUTPUT_DIRECTORY_RELEASE",
+                                    outputDirRelease.c_str());
+       cmSystemTools::ReplaceString(line, "OUTPUT_DIRECTORY_MINSIZEREL",
+                                    outputDirMinSizeRel.c_str());
+       cmSystemTools::ReplaceString(line, "OUTPUT_DIRECTORY_RELWITHDEBINFO",
+                                    outputDirRelWithDebInfo.c_str());
+ #ifdef CM_USE_OLD_VS6
        std::string outPath = target.GetDirectory();
        cmSystemTools::ReplaceString
***************
*** 1418,1421 ****
--- 1451,1455 ----
           removeQuotes(this->ConvertToOptionallyRelativeOutputPath
                        (outPath.c_str())).c_str());
+ #endif
        }
  



More information about the Cmake-commits mailing list