Skip to content
Snippets Groups Projects
Select Git revision
  • 87cc50724cbb1af013a483847f7bfeb8c1fc29c4
  • master default protected
  • dev protected
  • replication_test
  • 551-init-broker-service-permissions
  • release-1.10 protected
  • 549-test-oai-pmh
  • 545-saving-multiple-times-breaks-pid-metadata
  • release-1.9 protected
  • 499-standalone-compute-service-2
  • 539-load-tests
  • hotfix/helm-chart
  • luca_ba_new_interface
  • 534-bug-when-adding-access-to-user-that-is-not-registered-at-dashboard-service
  • release-1.8 protected
  • 533-integrate-semantic-recommendation
  • feature/openshift
  • 518-spark-doesn-t-map-the-headers-correct
  • 485-fixity-checks
  • 530-various-schema-problems-with-subsets
  • release-1.7 protected
  • v1.10.1 protected
  • v1.10.0-rc13 protected
  • v1.10.0-rc12 protected
  • v1.10.0-rc11 protected
  • v1.10.0-rc10 protected
  • v1.10.0-rc9 protected
  • v1.10.0-rc8 protected
  • v1.10.0-rc7 protected
  • v1.10.0-rc6 protected
  • v1.10.0-rc5 protected
  • v1.10.0-rc4 protected
  • v1.10.0-rc3 protected
  • v1.10.0-rc2 protected
  • v1.10.0rc1 protected
  • v1.10.0rc0 protected
  • v1.10.0 protected
  • v1.9.3 protected
  • v1.9.2 protected
  • v1.9.2-rc0 protected
  • v1.9.1 protected
41 results

README.md

Blame
  • meson.build 1.68 KiB
    project('cmp_tool', 'c',
      version : '0.12',
      meson_version : '>= 0.63',
      license : 'GPL-2.0',
      default_options : [
        'warning_level=3',
        'c_std=gnu89'
      ]
    )
    
    cc = meson.get_compiler('c')
    
    # Built-in options
    use_debug = get_option('debug')
    
    # Custom options
    debug_level = get_option('debug_level')
    feature_argument_input_mode = get_option('argument_input_mode')
    
    
    # Compiler flags
    add_global_arguments('-Wno-long-long', language : 'c')
    cc_flags = ['-DDEBUGLEVEL=@0@'.format(debug_level)]
    if use_debug
      debug_flags = [
        '-Wstrict-aliasing',
        '-Wcast-align',
        '-Wredundant-decls',
        '-Wundef',
        '-Wshadow',
        '-Wdeclaration-after-statement',
        '-Wstrict-prototypes',
        '-Wpointer-arith',
        '-Wvla',
        '-Wformat=2',
        '-Winit-self',
        '-Wfloat-equal',
        '-Wwrite-strings',
        '-Wold-style-definition',
    #   '-Waggregate-return',
        '-Wmissing-declarations',
        '-Wmissing-include-dirs'
      ]
      cc_flags += cc.get_supported_arguments(debug_flags)
    endif
    add_project_arguments(cc_flags, language : 'c')
    
    if ['windows', 'cygwin'].contains(host_machine.system()) and cc.get_id() == 'gcc'
      # by default, MinGW on win32 behaves as if it ignores __attribute__((packed)),
      # you need to add -mno-ms-bitfields to make it work as expected.
      # See: https://wintermade.it/blog/posts/__attribute__packed-on-windows-is-ignored-with-mingw.html
      add_project_arguments('-mno-ms-bitfields', language : 'c')
      add_global_link_arguments('-static', language: 'c')
    endif
    
    if get_option('fuzzer').enabled()
      add_global_arguments('-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION', language: ['c', 'cpp'])
    endif
    
    # Subdirs
    subdir('lib')
    subdir('programs')
    subdir('test')
    subdir('doc/doxygen')
    subdir('examples')