[Cmake-commits] [cmake-commits] hoffman committed cmGlobalGenerator.cxx 1.227.2.4 1.227.2.5 cmGlobalGenerator.h 1.107.2.4 1.107.2.5
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Jul 17 10:14:27 EDT 2008
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv24347/Source
Modified Files:
Tag: CMake-2-6
cmGlobalGenerator.cxx cmGlobalGenerator.h
Log Message:
ENH: merge in two bug fixes to 26
Index: cmGlobalGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.h,v
retrieving revision 1.107.2.4
retrieving revision 1.107.2.5
diff -C 2 -d -r1.107.2.4 -r1.107.2.5
*** cmGlobalGenerator.h 13 Jul 2008 21:55:23 -0000 1.107.2.4
--- cmGlobalGenerator.h 17 Jul 2008 14:14:25 -0000 1.107.2.5
***************
*** 265,268 ****
--- 265,269 ----
void SetLanguageEnabledFlag(const char* l, cmMakefile* mf);
void SetLanguageEnabledMaps(const char* l, cmMakefile* mf);
+ void FillExtensionToLanguageMap(const char* l, cmMakefile* mf);
virtual bool CheckALLOW_DUPLICATE_CUSTOM_TARGETS();
Index: cmGlobalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.cxx,v
retrieving revision 1.227.2.4
retrieving revision 1.227.2.5
diff -C 2 -d -r1.227.2.4 -r1.227.2.5
*** cmGlobalGenerator.cxx 13 Jun 2008 12:55:17 -0000 1.227.2.4
--- cmGlobalGenerator.cxx 17 Jul 2008 14:14:25 -0000 1.227.2.5
***************
*** 560,563 ****
--- 560,568 ----
internal maps, this is done in SetLanguageEnabledMaps() which is called
after the system- and compiler specific files have been loaded.
+
+ This split was done originally so that compiler-specific configuration
+ files could change the object file extension
+ (CMAKE_<LANG>_OUTPUT_EXTENSION) before the CMake variables were copied
+ to the C++ maps.
*/
void cmGlobalGenerator::SetLanguageEnabled(const char* l, cmMakefile* mf)
***************
*** 567,573 ****
}
! void cmGlobalGenerator::SetLanguageEnabledFlag(const char* l, cmMakefile*)
{
this->LanguageEnabled[l] = true;
}
--- 572,585 ----
}
! void cmGlobalGenerator::SetLanguageEnabledFlag(const char* l, cmMakefile* mf)
{
this->LanguageEnabled[l] = true;
+
+ // Fill the language-to-extension map with the current variable
+ // settings to make sure it is available for the try_compile()
+ // command source file signature. In SetLanguageEnabledMaps this
+ // will be done again to account for any compiler- or
+ // platform-specific entries.
+ this->FillExtensionToLanguageMap(l, mf);
}
***************
*** 628,651 ****
}
! std::string extensionsVar = std::string("CMAKE_") +
! std::string(l) + std::string("_SOURCE_FILE_EXTENSIONS");
std::string ignoreExtensionsVar = std::string("CMAKE_") +
std::string(l) + std::string("_IGNORE_EXTENSIONS");
std::string ignoreExts = mf->GetSafeDefinition(ignoreExtensionsVar.c_str());
- std::string exts = mf->GetSafeDefinition(extensionsVar.c_str());
std::vector<std::string> extensionList;
! cmSystemTools::ExpandListArgument(exts, extensionList);
for(std::vector<std::string>::iterator i = extensionList.begin();
i != extensionList.end(); ++i)
{
! this->ExtensionToLanguage[*i] = l;
}
! cmSystemTools::ExpandListArgument(ignoreExts, extensionList);
for(std::vector<std::string>::iterator i = extensionList.begin();
i != extensionList.end(); ++i)
{
! this->IgnoreExtensions[*i] = true;
}
-
}
--- 640,674 ----
}
! // The map was originally filled by SetLanguageEnabledFlag, but
! // since then the compiler- and platform-specific files have been
! // loaded which might have added more entries.
! this->FillExtensionToLanguageMap(l, mf);
!
std::string ignoreExtensionsVar = std::string("CMAKE_") +
std::string(l) + std::string("_IGNORE_EXTENSIONS");
std::string ignoreExts = mf->GetSafeDefinition(ignoreExtensionsVar.c_str());
std::vector<std::string> extensionList;
! cmSystemTools::ExpandListArgument(ignoreExts, extensionList);
for(std::vector<std::string>::iterator i = extensionList.begin();
i != extensionList.end(); ++i)
{
! this->IgnoreExtensions[*i] = true;
}
!
! }
!
! void cmGlobalGenerator::FillExtensionToLanguageMap(const char* l,
! cmMakefile* mf)
! {
! std::string extensionsVar = std::string("CMAKE_") +
! std::string(l) + std::string("_SOURCE_FILE_EXTENSIONS");
! std::string exts = mf->GetSafeDefinition(extensionsVar.c_str());
! std::vector<std::string> extensionList;
! cmSystemTools::ExpandListArgument(exts, extensionList);
for(std::vector<std::string>::iterator i = extensionList.begin();
i != extensionList.end(); ++i)
{
! this->ExtensionToLanguage[*i] = l;
}
}
More information about the Cmake-commits
mailing list