1
0
Эх сурвалжийг харах

BUG: Fix Bug #445 - Same library in multiple projects can cause problems

Andy Cedilnik 22 жил өмнө
parent
commit
72d8bd1e41

+ 1 - 1
Source/cmGlobalCodeWarriorGenerator.cxx

@@ -229,7 +229,7 @@ void cmGlobalCodeWarriorGenerator::ComputeTargetOrder(
       std::string libPath = j->first + "_CMAKE_PATH";
       const char* cacheValue
         = m_CMakeInstance->GetCacheDefinition(libPath.c_str());
-      if(cacheValue)
+      if(cacheValue && *cacheValue)
         {
         // so add it to the tgtOrder vector if it isn't already there
         // to do this we need the actual target

+ 1 - 1
Source/cmGlobalVisualStudio6Generator.cxx

@@ -452,7 +452,7 @@ void cmGlobalVisualStudio6Generator::WriteProject(std::ostream& fout,
         std::string libPath = j->first + "_CMAKE_PATH";
         const char* cacheValue
           = m_CMakeInstance->GetCacheDefinition(libPath.c_str());
-        if(cacheValue)
+        if(cacheValue && *cacheValue)
           {
           fout << "Begin Project Dependency\n";
           fout << "Project_Dep_Name " << j->first << "\n";

+ 1 - 1
Source/cmGlobalVisualStudio71Generator.cxx

@@ -248,7 +248,7 @@ void cmGlobalVisualStudio71Generator::WriteProjectDepends(std::ostream& fout,
         std::string libPath = j->first + "_CMAKE_PATH";
         const char* cacheValue
           = m_CMakeInstance->GetCacheDefinition(libPath.c_str());
-        if(cacheValue)
+        if(cacheValue && *cacheValue)
           {
           fout << "\t\t{" << this->CreateGUID(j->first.c_str()) << "} = {"
                << this->CreateGUID(j->first.c_str()) << "}\n";

+ 1 - 1
Source/cmGlobalVisualStudio7Generator.cxx

@@ -534,7 +534,7 @@ void cmGlobalVisualStudio7Generator::WriteProjectDepends(std::ostream& fout,
         std::string libPath = j->first + "_CMAKE_PATH";
         const char* cacheValue
           = m_CMakeInstance->GetCacheDefinition(libPath.c_str());
-        if(cacheValue)
+        if(cacheValue && *cacheValue)
           {
           fout << "\t\t{" << this->CreateGUID(dspname) << "}." << depcount << " = {"
                << this->CreateGUID(j->first.c_str()) << "}\n";

+ 4 - 4
Source/cmLocalCodeWarriorGenerator.cxx

@@ -189,7 +189,7 @@ void cmLocalCodeWarriorGenerator::WriteSettingList(std::ostream& fout,
       = GetGlobalGenerator()->GetCMakeInstance()
       ->GetCacheDefinition(libPath.c_str());
 
-    if( cacheValue )
+    if( cacheValue && *cacheValue )
       {
       // just tack it on
       fout << "<SETTING>\n";
@@ -585,7 +585,7 @@ void cmLocalCodeWarriorGenerator::WriteFileList(std::ostream& fout,
       = GetGlobalGenerator()->GetCMakeInstance()
       ->GetCacheDefinition(libPath.c_str());
 
-    if( cacheValue )
+    if( cacheValue && *cacheValue )
       {
       // just tack it on
       fout << "<FILE>\n";
@@ -718,7 +718,7 @@ void cmLocalCodeWarriorGenerator::WriteLinkOrder(std::ostream& fout,
       = GetGlobalGenerator()->GetCMakeInstance()
       ->GetCacheDefinition(libPath.c_str());
 
-    if( cacheValue )
+    if( cacheValue && *cacheValue ) 
       {
       // just tack it on
       fout << "<FILEREF>\n";
@@ -988,7 +988,7 @@ void cmLocalCodeWarriorGenerator::WriteGroup(std::ostream& fout,
       = GetGlobalGenerator()->GetCMakeInstance()
       ->GetCacheDefinition(libPath.c_str());
 
-    if( cacheValue )
+    if( cacheValue && *cacheValue )
       {
       // this is a subtarget reference, it will be taken care of later
       continue;

+ 2 - 2
Source/cmLocalVisualStudio6Generator.cxx

@@ -471,7 +471,7 @@ void cmLocalVisualStudio6Generator::WriteCustomRule(std::ostream& fout,
         }
       std::string libPath = dep + "_CMAKE_PATH";
       const char* cacheValue = m_Makefile->GetDefinition(libPath.c_str());
-      if (cacheValue)
+      if (cacheValue && *cacheValue)
         {
         std::string exePath = "";
         if (m_Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH"))
@@ -877,7 +877,7 @@ void cmLocalVisualStudio6Generator::WriteDSPHeader(std::ostream& fout, const cha
       const char* cacheValue
         = m_GlobalGenerator->GetCMakeInstance()->GetCacheDefinition(
           libPath.c_str());
-      if ( cacheValue && m_Makefile->GetDefinition("CMAKE_DEBUG_POSTFIX") )
+      if ( cacheValue && *cacheValue && m_Makefile->GetDefinition("CMAKE_DEBUG_POSTFIX") )
         { 
         libDebug += m_Makefile->GetDefinition("CMAKE_DEBUG_POSTFIX");
         }

+ 2 - 2
Source/cmLocalVisualStudio7Generator.cxx

@@ -685,7 +685,7 @@ void cmLocalVisualStudio7Generator::OutputLibraries(std::ostream& fout,
         std::string libPath = j->first + "_CMAKE_PATH";
         const char* cacheValue
           = m_GlobalGenerator->GetCMakeInstance()->GetCacheDefinition(libPath.c_str());
-        if(cacheValue && m_Makefile->GetDefinition("CMAKE_DEBUG_POSTFIX"))
+        if(cacheValue && *cacheValue && m_Makefile->GetDefinition("CMAKE_DEBUG_POSTFIX"))
           {
           debugPostfix = m_Makefile->GetDefinition("CMAKE_DEBUG_POSTFIX");
           }
@@ -956,7 +956,7 @@ WriteCustomRule(std::ostream& fout,
         }
       std::string libPath = dep + "_CMAKE_PATH";
       const char* cacheValue = m_Makefile->GetDefinition(libPath.c_str());
-      if (cacheValue)
+      if (cacheValue && *cacheValue)
         { 
         std::string exePath = "";
         if (m_Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH"))