parameters: (self)
docstring: Do everything that needs doing in the subdir 'lib' and 'include'.
          - add .cc and .h files
          - include them into CMakeLists.txt
          - check if C++ QA code is req'd
          - if yes, create qa_*.{cc,h} and add them to CMakeLists.txt
docstring_summary: Do everything that needs doing in the subdir 'lib' and 'include'.
          - add .cc and .h files
          - include them into CMakeLists.txt
          - check if C++ QA code is req'd
          - if yes, create qa_*.{cc,h} and add them to CMakeLists.txt
docstring_tokens: Do everything that needs doing in the subdir lib and include . - add . cc and . h files - include them into CMakeLists . txt - check if C ++ QA code is req d - if yes create qa_ * . { cc h } and add them to CMakeLists . txt
function: def _run_lib(self):
          """ Do everything that needs doing in the subdir 'lib' and 'include'.
          - add .cc and .h files
          - include them into CMakeLists.txt
          - check if C++ QA code is req'd
          - if yes, create qa_*.{cc,h} and add them to CMakeLists.txt
          """
          fname_cc = None
          fname_h = None
          if self.info['version'] in ('37', '38', '310'):
              fname_h = self.info['blockname'] + '.h'
              fname_cc = self.info['blockname'] + '.cc'
              if self.info['blocktype'] in ('source', 'sink', 'sync', 'decimator',
                                            'interpolator', 'general', 'hier', 'tagged_stream'):
                  fname_cc = self.info['blockname'] + '_impl.cc'
                  self._write_tpl('block_impl_h', 'lib',
                                  self.info['blockname'] + '_impl.h')
              self._write_tpl('block_impl_cpp', 'lib', fname_cc)
              self._write_tpl('block_def_h', self.info['includedir'], fname_h)
          else:  # Pre-3.7 or autotools
              fname_h = self.info['fullblockname'] + '.h'
              fname_cc = self.info['fullblockname'] + '.cc'
              self._write_tpl('block_h36', self.info['includedir'], fname_h)
              self._write_tpl('block_cpp36', 'lib', fname_cc)
          if self.add_cc_qa:
              if self.info['version'] in ['38', '310']:
                  self._run_cc_qa_boostutf()
              elif self.info['version'] == '37':
                  self._run_cc_qa()
              elif self.info['version'] == '36':
                  logger.warning(
                      "Warning: C++ QA files not supported for 3.6-style OOTs.")
              elif self.info['version'] == 'autofoo':
                  logger.warning(
                      "Warning: C++ QA files not supported for autotools.")
          if not self.skip_cmakefiles:
              ed = CMakeFileEditor(self._file['cmlib'])
              cmake_list_var = '[a-z]*_?' + self.info['modname'] + '_sources'
              if not ed.append_value('list', fname_cc, to_ignore_start='APPEND ' + cmake_list_var):
                  ed.append_value('add_library', fname_cc)
              ed.write()
              ed = CMakeFileEditor(self._file['cminclude'])
              ed.append_value('install', fname_h,
                              to_ignore_end='DESTINATION[^()]+')
              ed.write()
              self.scm.mark_files_updated(
                  (self._file['cminclude'], self._file['cmlib']))
function_tokens: def _run_lib ( self ) : fname_cc = None fname_h = None if self . info [ 'version' ] in ( '37' , '38' , '310' ) : fname_h = self . info [ 'blockname' ] + '.h' fname_cc = self . info [ 'blockname' ] + '.cc' if self . info [ 'blocktype' ] in ( 'source' , 'sink' , 'sync' , 'decimator' , 'interpolator' , 'general' , 'hier' , 'tagged_stream' ) : fname_cc = self . info [ 'blockname' ] + '_impl.cc' self . _write_tpl ( 'block_impl_h' , 'lib' , self . info [ 'blockname' ] + '_impl.h' ) self . _write_tpl ( 'block_impl_cpp' , 'lib' , fname_cc ) self . _write_tpl ( 'block_def_h' , self . info [ 'includedir' ] , fname_h ) else : # Pre-3.7 or autotools fname_h = self . info [ 'fullblockname' ] + '.h' fname_cc = self . info [ 'fullblockname' ] + '.cc' self . _write_tpl ( 'block_h36' , self . info [ 'includedir' ] , fname_h ) self . _write_tpl ( 'block_cpp36' , 'lib' , fname_cc ) if self . add_cc_qa : if self . info [ 'version' ] in [ '38' , '310' ] : self . _run_cc_qa_boostutf ( ) elif self . info [ 'version' ] == '37' : self . _run_cc_qa ( ) elif self . info [ 'version' ] == '36' : logger . warning ( "Warning: C++ QA files not supported for 3.6-style OOTs." ) elif self . info [ 'version' ] == 'autofoo' : logger . warning ( "Warning: C++ QA files not supported for autotools." ) if not self . skip_cmakefiles : ed = CMakeFileEditor ( self . _file [ 'cmlib' ] ) cmake_list_var = '[a-z]*_?' + self . info [ 'modname' ] + '_sources' if not ed . append_value ( 'list' , fname_cc , to_ignore_start = 'APPEND ' + cmake_list_var ) : ed . append_value ( 'add_library' , fname_cc ) ed . write ( ) ed = CMakeFileEditor ( self . _file [ 'cminclude' ] ) ed . append_value ( 'install' , fname_h , to_ignore_end = 'DESTINATION[^()]+' ) ed . write ( ) self . scm . mark_files_updated ( ( self . _file [ 'cminclude' ] , self . _file [ 'cmlib' ] ) )