Explorar o código

BUG: better setup of properties for loaded commands

Ken Martin %!s(int64=18) %!d(string=hai) anos
pai
achega
e4ac63fa72
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      Source/cmCPluginAPI.cxx

+ 4 - 2
Source/cmCPluginAPI.cxx

@@ -529,8 +529,10 @@ void * CCONV cmCreateSourceFile()
 
 void * CCONV cmCreateNewSourceFile(void *arg)
 {
-  (void)arg; // no longer needed
-  return (void*)new cmCPluginAPISourceFile;
+  cmMakefile *mf = static_cast<cmMakefile *>(arg);
+  cmCPluginAPISourceFile *sf = new cmCPluginAPISourceFile;
+  sf->Properties.SetCMakeInstance(mf->GetCMakeInstance());
+  return (void*)sf;
 }
 
 void CCONV cmDestroySourceFile(void *arg)