Преглед на файлове

BUG: fix bug where custom command generated .h files do not get the header_file_only flag set

Bill Hoffman преди 21 години
родител
ревизия
63e6237600
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 4 2
      Source/cmMakefile.cxx

+ 4 - 2
Source/cmMakefile.cxx

@@ -1968,8 +1968,10 @@ cmSourceFile* cmMakefile::GetOrCreateSource(const char* sourceName,
     if ( ext.length() && ext[0] == '.' )
       {
       ext = ext.substr(1);
-      }
-    file.SetName(name_no_ext.c_str(), path.c_str(), ext.c_str(), false);
+      } 
+    bool headerFile = !(std::find( m_HeaderFileExtensions.begin(), m_HeaderFileExtensions.end(), ext ) ==
+                        m_HeaderFileExtensions.end());
+    file.SetName(name_no_ext.c_str(), path.c_str(), ext.c_str(), headerFile);
     }
   else
     {