project('librin', 'c', license : 'LGPL2.1', version : '0.0.3', default_options : ['c_std=gnu89', 'buildtype=release']) inc = include_directories('include') pkg = import('pkgconfig') subdir('include') subdir('src') if ((not get_option('static')) and (not get_option('shared'))) librin = library('rin', sources, version : '0.0.0', include_directories : inc, install : true) endif if get_option('static') librin = static_library('rin', sources, version : '0.0.0', include_directories : inc, install : true) endif if get_option('shared') librin = shared_library('rin', sources, version : '0.0.0', include_directories : inc, install : true) endif pkg.generate(librin) if get_option('tests') subdir('test') test_e = executable('test executable', test_sources, include_directories : inc, link_with : librin) test('float sign', test_e, args : ['float', 'signbitf']) test('double sign', test_e, args : ['float', 'signbitd']) test('flaot to string', test_e, args : ['float', 'floattohexstring']) test('double to string', test_e, args : ['float', 'doubletohexstring']) test('compare floats', test_e, args : ['float', 'comparefloat']) test('compare doubles', test_e, args : ['float', 'comparedouble']) test('diagnostic', test_e, args : ['diagnostic', 'none']) test('time add', test_e, args : ['time', 'add']) test('time subtract', test_e, args : ['time', 'sub']) test('time normalize', test_e, args : ['time', 'normalize']) test('time compare less', test_e, args : ['time', 'cmpless']) test('time compare more', test_e, args : ['time', 'cmpmore']) test('time compare less or equal', test_e, args : ['time', 'cmplessequal']) test('time compare more or equal', test_e, args : ['time', 'cmpmoreequal']) test('time compare equal', test_e, args : ['time', 'cmpequal']) test('time compare nonequal', test_e, args : ['time', 'cmpnonequal']) endif