project( 'yggm', ['cpp', 'cuda'], version: '20.08.2025', default_options: ['cpp_std=c++20'], ) cpp = meson.get_compiler('cpp') cuda = meson.get_compiler('cuda') common_cpp_flags = [ '-march=native', '-ffast-math', '-pipe', '-funroll-loops', '-Wpedantic', '-Wconversion', '-Wuninitialized', '-Wsign-conversion', '-masm=intel', '-I../libs/', ] common_cuda_flags = [ '-rdc=true', '-Xptxas', '-O3', '-use_fast_math', '-ftz=true', '-prec-div=false', '-prec-sqrt=false', '-gencode', 'arch=compute_75,code=sm_75', '-Wno-deprecated-gpu-targets', '--expt-relaxed-constexpr', '-I../libs/', ] add_project_arguments(common_cpp_flags, language: 'cpp') add_project_arguments(common_cuda_flags, language: 'cuda') if get_option('buildtype') == 'release' add_project_arguments(['-DRELEASE'], language: ['cpp', 'cuda']) elif get_option('buildtype') == 'debug' add_project_arguments(['-DDEBUG'], language: ['cpp', 'cuda']) endif cpp_sources = ['sources/main.cpp'] + files(run_command('find', 'libs', '-name','*.h').stdout().split()) cuda_sources = ['sources/main.cu'] + files(run_command('find', 'libs', '-name', '*.cu').stdout().split()) executable( 'yggmcu', sources: cuda_sources, link_args: ['-lcudart', '-L/usr/local/cuda/lib64'], ) executable( 'yggmc', sources: cpp_sources, dependencies: dependency('libsodium'), )