Skip to content
Snippets Groups Projects
Select Git revision
  • 87fd09081b9f45e960f4aec5a25e05de87d2b380
  • master default protected
  • 6.x protected
  • madysson
  • 5.x protected
  • asm
  • time-varying-information-set
  • 4.6 protected
  • dynare_minreal
  • dragonfly
  • various_fixes
  • 4.5 protected
  • clang+openmp
  • exo_steady_state
  • declare_vars_in_model_block
  • julia
  • error_msg_undeclared_model_vars
  • static_aux_vars
  • slice
  • aux_func
  • penalty
  • 6.4 protected
  • 6.3 protected
  • 6.2 protected
  • 6.1 protected
  • 6.0 protected
  • 6-beta2 protected
  • 6-beta1 protected
  • 5.5 protected
  • 5.4 protected
  • 5.3 protected
  • 5.2 protected
  • 5.1 protected
  • 5.0 protected
  • 5.0-rc1 protected
  • 4.7-beta3 protected
  • 4.7-beta2 protected
  • 4.7-beta1 protected
  • 4.6.4 protected
  • 4.6.3 protected
  • 4.6.2 protected
41 results

reporting.rst

Blame
  • meson.build 3.16 KiB
    boost_dep = dependency('boost')
    
    ## Flex stuff
    flex_exe = find_program('flex')
    # The -Ca flag comes from hitting a hard-coded size limit.
    # Partial explanation: https://www.owlfolio.org/possibly-useful/flex-input-scanner-rules-are-too-complicated
    # There is a Debian bug report about this: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=642040
    flex_gen = generator(flex_exe, output : '@BASENAME@.cc',
                         arguments : ['-Ca', '-o', '@OUTPUT@', '@INPUT@'])
    flex_src = flex_gen.process('macro/Tokenizer.ll', 'DynareFlex.ll')
    # If FlexLexer.h is not found by the compiler, copy it to the build directory
    # (adding an include directory could create problems for cross-compilation, because
    # flex is typically provided by the system of the build machine)
    if not cpp_compiler.has_header('FlexLexer.h')
      message('FlexLexer.h cannot be found by the compiler, it will be manually copied to the build directory')
      fs = import('fs')
      flexlexer_h = fs.copyfile(fs.parent(fs.parent(flex_exe.full_path())) / 'include' / 'FlexLexer.h', 'FlexLexer.h')
    else
      flexlexer_h = []
    endif
    
    ## Bison stuff
    bison_exe = find_program('bison')
    # By convention, all our Bison source files define the api.location.file variable
    # so that the generated location file follows the @BASENAME@Location.hh pattern
    bison_gen = generator(bison_exe, output : ['@BASENAME@.cc', '@BASENAME@.hh', '@BASENAME@Location.hh'],
                          arguments : ['-W', '-o', '@OUTPUT0@', '@INPUT@'])
    bison_src = bison_gen.process('macro/Parser.yy', 'DynareBison.yy')
    
    preprocessor_incdir = include_directories('.', 'macro')
    
    preprocessor_src = [ 'ComputingTasks.cc',
    	             'EquationTags.cc',
    	             'ModelTree.cc',
    	             'StaticModel.cc',
    	             'DynamicModel.cc',
    	             'NumericalConstants.cc',
    	             'NumericalInitialization.cc',
    	             'Shocks.cc',
    	             'SymbolTable.cc',
    	             'SymbolList.cc',
    	             'ParsingDriver.cc',
    	             'DataTree.cc',
    	             'ModFile.cc',
    	             'Configuration.cc',
    	             'Statement.cc',
    	             'ExprNode.cc',
    	             'VariableDependencyGraph.cc',
    	             'DynareMain.cc',
    	             'MacroExpandModFile.cc',
    	             'Bytecode.cc',
    	             'ExternalFunctionsTable.cc',
    	             'ModelEquationBlock.cc',
    	             'WarningConsolidation.cc',
    	             'SubModel.cc',
                         'macro/Driver.cc',
    	             'macro/Environment.cc',
    	             'macro/Expressions.cc',
    	             'macro/Directives.cc' ]
    
    if get_option('prefer_static')
      preprocessor_link_args = [ '-static-libgcc', '-static-libstdc++' ]
      if host_machine.system() == 'windows'
        # See comment in rules for MEX files
        preprocessor_link_args += [ '-Wl,-Bstatic', '-lssp', '-Wl,-Bdynamic',
                                    '-Wl,-Bstatic,--whole-archive', '-lwinpthread', '-Wl,-Bdynamic,--no-whole-archive' ]
      endif
    else
      preprocessor_link_args = []
    endif
    
    executable('dynare-preprocessor', preprocessor_src, flex_src, flexlexer_h, bison_src,
               include_directories : preprocessor_incdir, dependencies : boost_dep,
               link_args : preprocessor_link_args,
               install : true)