Zane Shelley | ad103b9 | 2019-07-31 15:57:54 -0500 | [diff] [blame] | 1 | # build simulator |
| 2 | subdir('simulator') |
| 3 | |
Ben Tyner | a8126fd | 2019-08-01 19:40:07 -0500 | [diff] [blame] | 4 | # supporting files that need compiled/linked |
Ben Tyner | 032bf9e | 2020-05-06 21:27:54 -0500 | [diff] [blame] | 5 | test_src = ['../src/util/hei_bit_string.cpp', |
Zane Shelley | 7649b8b | 2020-05-08 20:12:35 -0500 | [diff] [blame] | 6 | 'sim_tracing.cpp'] |
Ben Tyner | a8126fd | 2019-08-01 19:40:07 -0500 | [diff] [blame] | 7 | |
| 8 | # build g-test framework unit tests |
Zane Shelley | 200c345 | 2019-09-26 11:46:30 -0500 | [diff] [blame] | 9 | gtests = [ |
| 10 | 'bit_string_test', |
Zane Shelley | 6eb6190 | 2020-05-15 22:25:58 -0500 | [diff] [blame] | 11 | 'flyweight_test', |
| 12 | 'operator_register_test', |
Zane Shelley | 200c345 | 2019-09-26 11:46:30 -0500 | [diff] [blame] | 13 | ] |
Ben Tyner | a8126fd | 2019-08-01 19:40:07 -0500 | [diff] [blame] | 14 | |
| 15 | gtest = dependency('gtest', main : true, required : false, method : 'system') |
| 16 | |
| 17 | if gtest.found() |
| 18 | foreach g : gtests |
| 19 | test(g, executable(g.underscorify(), g + '.cpp', test_src, \ |
| 20 | dependencies : gtest, \ |
| 21 | include_directories : incdir)) |
| 22 | endforeach |
| 23 | endif |
Paul Greenwood | dc47e0a | 2019-11-01 16:22:57 -0500 | [diff] [blame] | 24 | |