[Cmake-commits] [cmake-commits] king committed cmGlobalGenerator.cxx 1.254 1.255 cmGlobalGenerator.h 1.123 1.124
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Aug 3 13:37:38 EDT 2009
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv32431/Source
Modified Files:
cmGlobalGenerator.cxx cmGlobalGenerator.h
Log Message:
Fix recursive try_compile calls
When building an entire source tree with try_compile instead of just a
single source file, it is possible that the CMakeLists.txt file in the
try-compiled project invokes try_compile. This commit fixes propagation
of language-initialization results from the outer-most project into any
number of try-compile levels.
Index: cmGlobalGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.h,v
retrieving revision 1.123
retrieving revision 1.124
diff -C 2 -d -r1.123 -r1.124
*** cmGlobalGenerator.h 17 Jul 2009 14:05:52 -0000 1.123
--- cmGlobalGenerator.h 3 Aug 2009 17:37:36 -0000 1.124
***************
*** 124,128 ****
cmake *GetCMakeInstance() { return this->CMakeInstance; };
! void SetConfiguredFilesPath(const char* s){this->ConfiguredFilesPath = s;}
const std::vector<cmLocalGenerator *>& GetLocalGenerators() const {
return this->LocalGenerators;}
--- 124,128 ----
cmake *GetCMakeInstance() { return this->CMakeInstance; };
! void SetConfiguredFilesPath(cmGlobalGenerator* gen);
const std::vector<cmLocalGenerator *>& GetLocalGenerators() const {
return this->LocalGenerators;}
Index: cmGlobalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.cxx,v
retrieving revision 1.254
retrieving revision 1.255
diff -C 2 -d -r1.254 -r1.255
*** cmGlobalGenerator.cxx 25 Jun 2009 20:41:55 -0000 1.254
--- cmGlobalGenerator.cxx 3 Aug 2009 17:37:35 -0000 1.255
***************
*** 1344,1350 ****
void cmGlobalGenerator::EnableLanguagesFromGenerator(cmGlobalGenerator *gen )
{
! std::string cfp = gen->GetCMakeInstance()->GetHomeOutputDirectory();
! cfp += cmake::GetCMakeFilesDirectory();
! this->SetConfiguredFilesPath(cfp.c_str());
const char* make =
gen->GetCMakeInstance()->GetCacheDefinition("CMAKE_MAKE_PROGRAM");
--- 1344,1348 ----
void cmGlobalGenerator::EnableLanguagesFromGenerator(cmGlobalGenerator *gen )
{
! this->SetConfiguredFilesPath(gen);
const char* make =
gen->GetCMakeInstance()->GetCacheDefinition("CMAKE_MAKE_PROGRAM");
***************
*** 1362,1365 ****
--- 1360,1377 ----
//----------------------------------------------------------------------------
+ void cmGlobalGenerator::SetConfiguredFilesPath(cmGlobalGenerator* gen)
+ {
+ if(!gen->ConfiguredFilesPath.empty())
+ {
+ this->ConfiguredFilesPath = gen->ConfiguredFilesPath;
+ }
+ else
+ {
+ this->ConfiguredFilesPath = gen->CMakeInstance->GetHomeOutputDirectory();
+ this->ConfiguredFilesPath += cmake::GetCMakeFilesDirectory();
+ }
+ }
+
+ //----------------------------------------------------------------------------
void cmGlobalGenerator::GetDocumentation(cmDocumentationEntry& entry) const
{
More information about the Cmake-commits
mailing list