[Cmake-commits] [cmake-commits] king committed cmMakefileExecutableTargetGenerator.cxx 1.56 1.57 cmMakefileLibraryTargetGenerator.cxx 1.72 1.73 cmMakefileTargetGenerator.cxx 1.119 1.120 cmMakefileTargetGenerator.h 1.30 1.31
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Jul 3 08:41:14 EDT 2009
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv31552/Source
Modified Files:
cmMakefileExecutableTargetGenerator.cxx
cmMakefileLibraryTargetGenerator.cxx
cmMakefileTargetGenerator.cxx cmMakefileTargetGenerator.h
Log Message:
ENH: Create cmMakefileTargetGenerator::ConfigName
This member stores the build configuration for which Makefiles are being
generated. It saves repeated lookup of the equivalent member from
cmLocalUnixMakefileGenerator3, making code shorter and more readable.
Index: cmMakefileLibraryTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileLibraryTargetGenerator.cxx,v
retrieving revision 1.72
retrieving revision 1.73
diff -C 2 -d -r1.72 -r1.73
*** cmMakefileLibraryTargetGenerator.cxx 1 May 2009 14:38:28 -0000 1.72
--- cmMakefileLibraryTargetGenerator.cxx 3 Jul 2009 12:41:06 -0000 1.73
***************
*** 35,40 ****
this->Target->GetLibraryNames(
this->TargetNameOut, this->TargetNameSO, this->TargetNameReal,
! this->TargetNameImport, this->TargetNamePDB,
! this->LocalGenerator->ConfigurationName.c_str());
if(this->Target->IsFrameworkOnApple())
--- 35,39 ----
this->Target->GetLibraryNames(
this->TargetNameOut, this->TargetNameSO, this->TargetNameReal,
! this->TargetNameImport, this->TargetNamePDB, this->ConfigName);
if(this->Target->IsFrameworkOnApple())
***************
*** 147,158 ****
(extraFlags, this->Target->GetProperty("LINK_FLAGS"));
std::string linkFlagsConfig = "LINK_FLAGS_";
! linkFlagsConfig +=
! cmSystemTools::UpperCase(this->LocalGenerator->ConfigurationName.c_str());
this->LocalGenerator->AppendFlags
(extraFlags, this->Target->GetProperty(linkFlagsConfig.c_str()));
this->LocalGenerator->AddConfigVariableFlags
! (extraFlags, "CMAKE_SHARED_LINKER_FLAGS",
! this->LocalGenerator->ConfigurationName.c_str());
if(this->Makefile->IsOn("WIN32") && !(this->Makefile->IsOn("CYGWIN")
|| this->Makefile->IsOn("MINGW")))
--- 146,155 ----
(extraFlags, this->Target->GetProperty("LINK_FLAGS"));
std::string linkFlagsConfig = "LINK_FLAGS_";
! linkFlagsConfig += cmSystemTools::UpperCase(this->ConfigName);
this->LocalGenerator->AppendFlags
(extraFlags, this->Target->GetProperty(linkFlagsConfig.c_str()));
this->LocalGenerator->AddConfigVariableFlags
! (extraFlags, "CMAKE_SHARED_LINKER_FLAGS", this->ConfigName);
if(this->Makefile->IsOn("WIN32") && !(this->Makefile->IsOn("CYGWIN")
|| this->Makefile->IsOn("MINGW")))
***************
*** 195,205 ****
this->Target->GetProperty("LINK_FLAGS"));
std::string linkFlagsConfig = "LINK_FLAGS_";
! linkFlagsConfig +=
! cmSystemTools::UpperCase(this->LocalGenerator->ConfigurationName.c_str());
this->LocalGenerator->AppendFlags
(extraFlags, this->Target->GetProperty(linkFlagsConfig.c_str()));
this->LocalGenerator->AddConfigVariableFlags
! (extraFlags, "CMAKE_MODULE_LINKER_FLAGS",
! this->LocalGenerator->ConfigurationName.c_str());
// TODO: .def files should be supported here also.
--- 192,200 ----
this->Target->GetProperty("LINK_FLAGS"));
std::string linkFlagsConfig = "LINK_FLAGS_";
! linkFlagsConfig += cmSystemTools::UpperCase(this->ConfigName);
this->LocalGenerator->AppendFlags
(extraFlags, this->Target->GetProperty(linkFlagsConfig.c_str()));
this->LocalGenerator->AddConfigVariableFlags
! (extraFlags, "CMAKE_MODULE_LINKER_FLAGS", this->ConfigName);
// TODO: .def files should be supported here also.
***************
*** 223,233 ****
this->Target->GetProperty("LINK_FLAGS"));
std::string linkFlagsConfig = "LINK_FLAGS_";
! linkFlagsConfig +=
! cmSystemTools::UpperCase(this->LocalGenerator->ConfigurationName.c_str());
this->LocalGenerator->AppendFlags
(extraFlags, this->Target->GetProperty(linkFlagsConfig.c_str()));
this->LocalGenerator->AddConfigVariableFlags
! (extraFlags, "CMAKE_MACOSX_FRAMEWORK_LINKER_FLAGS",
! this->LocalGenerator->ConfigurationName.c_str());
// TODO: .def files should be supported here also.
--- 218,226 ----
this->Target->GetProperty("LINK_FLAGS"));
std::string linkFlagsConfig = "LINK_FLAGS_";
! linkFlagsConfig += cmSystemTools::UpperCase(this->ConfigName);
this->LocalGenerator->AppendFlags
(extraFlags, this->Target->GetProperty(linkFlagsConfig.c_str()));
this->LocalGenerator->AddConfigVariableFlags
! (extraFlags, "CMAKE_MACOSX_FRAMEWORK_LINKER_FLAGS", this->ConfigName);
// TODO: .def files should be supported here also.
***************
*** 390,394 ****
this->Target->GetLibraryNames(
targetName, targetNameSO, targetNameReal, targetNameImport, targetNamePDB,
! this->LocalGenerator->ConfigurationName.c_str());
// Construct the full path version of the names.
--- 383,387 ----
this->Target->GetLibraryNames(
targetName, targetNameSO, targetNameReal, targetNameImport, targetNamePDB,
! this->ConfigName);
// Construct the full path version of the names.
***************
*** 686,691 ****
{
// Get the install_name directory for the build tree.
! const char* config = this->LocalGenerator->ConfigurationName.c_str();
! install_name_dir = this->Target->GetInstallNameDirForBuildTree(config);
// Set the rule variable replacement value.
--- 679,684 ----
{
// Get the install_name directory for the build tree.
! install_name_dir =
! this->Target->GetInstallNameDirForBuildTree(this->ConfigName);
// Set the rule variable replacement value.
***************
*** 706,711 ****
std::string langFlags;
this->LocalGenerator
! ->AddLanguageFlags(langFlags, linkLanguage,
! this->LocalGenerator->ConfigurationName.c_str());
// remove any language flags that might not work with the
// particular os
--- 699,703 ----
std::string langFlags;
this->LocalGenerator
! ->AddLanguageFlags(langFlags, linkLanguage, this->ConfigName);
// remove any language flags that might not work with the
// particular os
Index: cmMakefileTargetGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -C 2 -d -r1.30 -r1.31
*** cmMakefileTargetGenerator.h 25 Jun 2009 13:58:51 -0000 1.30
--- cmMakefileTargetGenerator.h 3 Jul 2009 12:41:10 -0000 1.31
***************
*** 156,159 ****
--- 156,160 ----
cmGlobalUnixMakefileGenerator3 *GlobalGenerator;
cmMakefile *Makefile;
+ const char *ConfigName;
enum CustomCommandDriveType { OnBuild, OnDepends, OnUtility };
Index: cmMakefileExecutableTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileExecutableTargetGenerator.cxx,v
retrieving revision 1.56
retrieving revision 1.57
diff -C 2 -d -r1.56 -r1.57
*** cmMakefileExecutableTargetGenerator.cxx 1 May 2009 14:39:13 -0000 1.56
--- cmMakefileExecutableTargetGenerator.cxx 3 Jul 2009 12:41:04 -0000 1.57
***************
*** 33,37 ****
this->Target->GetExecutableNames(
this->TargetNameOut, this->TargetNameReal, this->TargetNameImport,
! this->TargetNamePDB, this->LocalGenerator->ConfigurationName.c_str());
if(this->Target->IsAppBundleOnApple())
--- 33,37 ----
this->Target->GetExecutableNames(
this->TargetNameOut, this->TargetNameReal, this->TargetNameImport,
! this->TargetNamePDB, this->ConfigName);
if(this->Target->IsAppBundleOnApple())
***************
*** 124,128 ****
this->Target->GetExecutableNames
(targetName, targetNameReal, targetNameImport, targetNamePDB,
! this->LocalGenerator->ConfigurationName.c_str());
// Construct the full path version of the names.
--- 124,128 ----
this->Target->GetExecutableNames
(targetName, targetNameReal, targetNameImport, targetNamePDB,
! this->ConfigName);
// Construct the full path version of the names.
***************
*** 213,217 ****
this->LocalGenerator->
AddConfigVariableFlags(linkFlags, "CMAKE_EXE_LINKER_FLAGS",
! this->LocalGenerator->ConfigurationName.c_str());
--- 213,217 ----
this->LocalGenerator->
AddConfigVariableFlags(linkFlags, "CMAKE_EXE_LINKER_FLAGS",
! this->ConfigName);
***************
*** 239,244 ****
// Add language-specific flags.
this->LocalGenerator
! ->AddLanguageFlags(flags, linkLanguage,
! this->LocalGenerator->ConfigurationName.c_str());
// Add target-specific linker flags.
--- 239,243 ----
// Add language-specific flags.
this->LocalGenerator
! ->AddLanguageFlags(flags, linkLanguage, this->ConfigName);
// Add target-specific linker flags.
***************
*** 246,251 ****
(linkFlags, this->Target->GetProperty("LINK_FLAGS"));
std::string linkFlagsConfig = "LINK_FLAGS_";
! linkFlagsConfig +=
! cmSystemTools::UpperCase(this->LocalGenerator->ConfigurationName.c_str());
this->LocalGenerator->AppendFlags
(linkFlags, this->Target->GetProperty(linkFlagsConfig.c_str()));
--- 245,249 ----
(linkFlags, this->Target->GetProperty("LINK_FLAGS"));
std::string linkFlagsConfig = "LINK_FLAGS_";
! linkFlagsConfig += cmSystemTools::UpperCase(this->ConfigName);
this->LocalGenerator->AppendFlags
(linkFlags, this->Target->GetProperty(linkFlagsConfig.c_str()));
Index: cmMakefileTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.cxx,v
retrieving revision 1.119
retrieving revision 1.120
diff -C 2 -d -r1.119 -r1.120
*** cmMakefileTargetGenerator.cxx 25 Jun 2009 13:58:51 -0000 1.119
--- cmMakefileTargetGenerator.cxx 3 Jul 2009 12:41:08 -0000 1.120
***************
*** 44,47 ****
--- 44,48 ----
static_cast<cmLocalUnixMakefileGenerator3*>(
this->Makefile->GetLocalGenerator());
+ this->ConfigName = this->LocalGenerator->ConfigurationName.c_str();
this->GlobalGenerator =
static_cast<cmGlobalUnixMakefileGenerator3*>(
***************
*** 603,607 ****
{
std::string targetFullPathPDB;
- const char* configName = this->LocalGenerator->ConfigurationName.c_str();
if(this->Target->GetType() == cmTarget::EXECUTABLE ||
this->Target->GetType() == cmTarget::STATIC_LIBRARY ||
--- 604,607 ----
***************
*** 611,615 ****
targetFullPathPDB = this->Target->GetDirectory();
targetFullPathPDB += "/";
! targetFullPathPDB += this->Target->GetPDBName(configName);
}
targetOutPathPDB =
--- 611,615 ----
targetFullPathPDB = this->Target->GetDirectory();
targetFullPathPDB += "/";
! targetFullPathPDB += this->Target->GetPDBName(this->ConfigName);
}
targetOutPathPDB =
More information about the Cmake-commits
mailing list