Przeglądaj źródła

FIX: BuildName removes path to compiler and converts any illegal characters

Jim Miller 24 lat temu
rodzic
commit
c453f2fc7a
1 zmienionych plików z 7 dodań i 7 usunięć
  1. 7 7
      Source/cmBuildNameCommand.cxx

+ 7 - 7
Source/cmBuildNameCommand.cxx

@@ -68,18 +68,18 @@ bool cmBuildNameCommand::InitialPass(std::vector<std::string>& args)
       if(reg.find(buildname.c_str()))
       if(reg.find(buildname.c_str()))
 	{
 	{
 	buildname = reg.match(1) + "-" + reg.match(2);
 	buildname = reg.match(1) + "-" + reg.match(2);
-        cmSystemTools::ReplaceString(buildname,
-                                     "/", "_");
-        cmSystemTools::ReplaceString(buildname,
-                                     "(", "_");
-        cmSystemTools::ReplaceString(buildname,
-                                     ")", "_");
 	}
 	}
       }
       }
     }
     }
   std::string compiler = "-${CMAKE_CXX_COMPILER}";
   std::string compiler = "-${CMAKE_CXX_COMPILER}";
   m_Makefile->ExpandVariablesInString ( compiler );
   m_Makefile->ExpandVariablesInString ( compiler );
-  buildname += compiler;
+  buildname += cmSystemTools::GetFilenameName(compiler);
+  cmSystemTools::ReplaceString(buildname,
+                               "/", "_");
+  cmSystemTools::ReplaceString(buildname,
+                               "(", "_");
+  cmSystemTools::ReplaceString(buildname,
+                               ")", "_");
   
   
   cmCacheManager::GetInstance()->
   cmCacheManager::GetInstance()->
     AddCacheEntry("BUILDNAME",
     AddCacheEntry("BUILDNAME",