Bläddra i källkod

BUG: Reverting previous change. It did not account for the possibility that the loaded command was built with a different compiler.

Brad King 18 år sedan
förälder
incheckning
0b0258c548
1 ändrade filer med 8 tillägg och 1 borttagningar
  1. 8 1
      Source/cmLoadCommandCommand.cxx

+ 8 - 1
Source/cmLoadCommandCommand.cxx

@@ -290,7 +290,14 @@ bool cmLoadCommandCommand::InitialPass(std::vector<std::string> const& args)
   CM_INIT_FUNCTION initFunction
   CM_INIT_FUNCTION initFunction
     = (CM_INIT_FUNCTION)
     = (CM_INIT_FUNCTION)
     cmsys::DynamicLoader::GetSymbolAddress(lib, initFuncName.c_str());
     cmsys::DynamicLoader::GetSymbolAddress(lib, initFuncName.c_str());
-
+  if ( !initFunction )
+    {
+    initFuncName = "_";
+    initFuncName += args[0];
+    initFuncName += "Init";
+    initFunction = (CM_INIT_FUNCTION)(
+      cmsys::DynamicLoader::GetSymbolAddress(lib, initFuncName.c_str()));
+    }
   // if the symbol is found call it to set the name on the 
   // if the symbol is found call it to set the name on the 
   // function blocker
   // function blocker
   if(initFunction)
   if(initFunction)