소스 검색

BUG: better setup of properties for loaded commands

Ken Martin 18 년 전
부모
커밋
e4ac63fa72
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      Source/cmCPluginAPI.cxx

+ 4 - 2
Source/cmCPluginAPI.cxx

@@ -529,8 +529,10 @@ void * CCONV cmCreateSourceFile()
 
 
 void * CCONV cmCreateNewSourceFile(void *arg)
 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)
 void CCONV cmDestroySourceFile(void *arg)