1# Copyright 2020 The libgav1 Authors 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15if(LIBGAV1_LIBGAV1_TESTS_CMAKE_) 16 return() 17endif() # LIBGAV1_LIBGAV1_TESTS_CMAKE_ 18set(LIBGAV1_LIBGAV1_TESTS_CMAKE_ 1) 19 20set(libgav1_googletest "${libgav1_root}/third_party/googletest") 21if(NOT LIBGAV1_ENABLE_TESTS OR NOT EXISTS "${libgav1_googletest}") 22 macro(libgav1_add_tests_targets) 23 24 endmacro() 25 26 if(LIBGAV1_ENABLE_TESTS AND NOT EXISTS "${libgav1_googletest}") 27 message( 28 "GoogleTest not found, setting LIBGAV1_ENABLE_TESTS to false.\n" 29 "To enable tests download the GoogleTest repository to" 30 " third_party/googletest:\n\n git \\\n -C ${libgav1_root} \\\n" 31 " clone \\\n" 32 " https://github.com/google/googletest.git third_party/googletest\n") 33 set(LIBGAV1_ENABLE_TESTS FALSE CACHE BOOL "Enables tests." FORCE) 34 endif() 35 return() 36endif() 37 38# Check GoogleTest compiler requirements. 39if((CMAKE_CXX_COMPILER_ID 40 MATCHES 41 "Clang|GNU" 42 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5") 43 OR (MSVC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19")) 44 macro(libgav1_add_tests_targets) 45 46 endmacro() 47 48 message( 49 WARNING 50 "${CMAKE_CXX_COMPILER} (${CMAKE_CXX_COMPILER_ID} version" 51 " ${CMAKE_CXX_COMPILER_VERSION}) is below the minimum requirements for" 52 " GoogleTest; disabling unit tests. See" 53 " https://github.com/google/googletest#compilers for more detail.") 54 set(LIBGAV1_ENABLE_TESTS FALSE CACHE BOOL "Enables tests." FORCE) 55 return() 56endif() 57 58list(APPEND libgav1_tests_block_utils_sources 59 "${libgav1_root}/tests/block_utils.h" 60 "${libgav1_root}/tests/block_utils.cc") 61 62list(APPEND libgav1_tests_utils_sources 63 "${libgav1_root}/tests/third_party/libvpx/acm_random.h" 64 "${libgav1_root}/tests/third_party/libvpx/md5_helper.h" 65 "${libgav1_root}/tests/third_party/libvpx/md5_utils.cc" 66 "${libgav1_root}/tests/third_party/libvpx/md5_utils.h" 67 "${libgav1_root}/tests/utils.h" "${libgav1_root}/tests/utils.cc") 68 69list(APPEND libgav1_tests_utils_test_sources 70 "${libgav1_root}/tests/utils_test.cc") 71 72list(APPEND libgav1_array_2d_test_sources 73 "${libgav1_source}/utils/array_2d_test.cc") 74list(APPEND libgav1_average_blend_test_sources 75 "${libgav1_source}/dsp/average_blend_test.cc") 76list(APPEND libgav1_block_parameters_holder_test_sources 77 "${libgav1_source}/utils/block_parameters_holder_test.cc") 78list(APPEND libgav1_blocking_counter_test_sources 79 "${libgav1_source}/utils/blocking_counter_test.cc") 80list(APPEND libgav1_buffer_pool_test_sources 81 "${libgav1_source}/buffer_pool_test.cc") 82list(APPEND libgav1_cdef_test_sources "${libgav1_source}/dsp/cdef_test.cc") 83list( 84 APPEND libgav1_common_test_sources "${libgav1_source}/utils/common_test.cc") 85list(APPEND libgav1_common_avx2_test_sources 86 "${libgav1_source}/dsp/x86/common_avx2.h" 87 "${libgav1_source}/dsp/x86/common_avx2.inc" 88 "${libgav1_source}/dsp/x86/common_avx2_test.cc" 89 "${libgav1_source}/dsp/x86/common_sse4.inc") 90list(APPEND libgav1_common_neon_test_sources 91 "${libgav1_source}/dsp/arm/common_neon_test.cc") 92list(APPEND libgav1_common_sse4_test_sources 93 "${libgav1_source}/dsp/x86/common_sse4.h" 94 "${libgav1_source}/dsp/x86/common_sse4.inc" 95 "${libgav1_source}/dsp/x86/common_sse4_test.cc") 96list(APPEND libgav1_convolve_test_sources 97 "${libgav1_source}/dsp/convolve_test.cc") 98list(APPEND libgav1_cpu_test_sources "${libgav1_source}/utils/cpu_test.cc") 99list(APPEND libgav1_c_decoder_test_sources 100 "${libgav1_source}/c_decoder_test.c" 101 "${libgav1_source}/decoder_test_data.h") 102list(APPEND libgav1_c_version_test_sources "${libgav1_source}/c_version_test.c") 103list(APPEND libgav1_decoder_test_sources 104 "${libgav1_source}/decoder_test.cc" 105 "${libgav1_source}/decoder_test_data.h") 106list(APPEND libgav1_decoder_buffer_test_sources 107 "${libgav1_source}/decoder_buffer_test.cc") 108list(APPEND libgav1_distance_weighted_blend_test_sources 109 "${libgav1_source}/dsp/distance_weighted_blend_test.cc") 110list(APPEND libgav1_dsp_test_sources "${libgav1_source}/dsp/dsp_test.cc") 111list(APPEND libgav1_entropy_decoder_test_sources 112 "${libgav1_source}/utils/entropy_decoder_test.cc" 113 "${libgav1_source}/utils/entropy_decoder_test_data.inc") 114list(APPEND libgav1_file_reader_test_sources 115 "${libgav1_examples}/file_reader_test.cc" 116 "${libgav1_examples}/file_reader_test_common.cc" 117 "${libgav1_examples}/file_reader_test_common.h") 118list(APPEND libgav1_film_grain_test_sources 119 "${libgav1_source}/film_grain_test.cc") 120list(APPEND libgav1_file_reader_factory_test_sources 121 "${libgav1_examples}/file_reader_factory_test.cc") 122list(APPEND libgav1_file_writer_test_sources 123 "${libgav1_examples}/file_writer_test.cc") 124list(APPEND libgav1_internal_frame_buffer_list_test_sources 125 "${libgav1_source}/internal_frame_buffer_list_test.cc") 126list(APPEND libgav1_intra_edge_test_sources 127 "${libgav1_source}/dsp/intra_edge_test.cc") 128list(APPEND libgav1_intrapred_cfl_test_sources 129 "${libgav1_source}/dsp/intrapred_cfl_test.cc") 130list(APPEND libgav1_intrapred_directional_test_sources 131 "${libgav1_source}/dsp/intrapred_directional_test.cc") 132list(APPEND libgav1_intrapred_filter_test_sources 133 "${libgav1_source}/dsp/intrapred_filter_test.cc") 134list(APPEND libgav1_intrapred_test_sources 135 "${libgav1_source}/dsp/intrapred_test.cc") 136list(APPEND libgav1_inverse_transform_test_sources 137 "${libgav1_source}/dsp/inverse_transform_test.cc") 138list(APPEND libgav1_loop_filter_test_sources 139 "${libgav1_source}/dsp/loop_filter_test.cc") 140list(APPEND libgav1_loop_restoration_test_sources 141 "${libgav1_source}/dsp/loop_restoration_test.cc") 142list(APPEND libgav1_mask_blend_test_sources 143 "${libgav1_source}/dsp/mask_blend_test.cc") 144list(APPEND libgav1_motion_field_projection_test_sources 145 "${libgav1_source}/dsp/motion_field_projection_test.cc") 146list(APPEND libgav1_motion_vector_search_test_sources 147 "${libgav1_source}/dsp/motion_vector_search_test.cc") 148list(APPEND libgav1_super_res_test_sources 149 "${libgav1_source}/dsp/super_res_test.cc") 150list(APPEND libgav1_weight_mask_test_sources 151 "${libgav1_source}/dsp/weight_mask_test.cc") 152list( 153 APPEND libgav1_memory_test_sources "${libgav1_source}/utils/memory_test.cc") 154list(APPEND libgav1_obmc_test_sources "${libgav1_source}/dsp/obmc_test.cc") 155list(APPEND libgav1_obu_parser_test_sources 156 "${libgav1_source}/obu_parser_test.cc") 157list(APPEND libgav1_post_filter_test_sources 158 "${libgav1_source}/post_filter_test.cc") 159list(APPEND libgav1_prediction_mask_test_sources 160 "${libgav1_source}/prediction_mask_test.cc") 161list( 162 APPEND libgav1_quantizer_test_sources "${libgav1_source}/quantizer_test.cc") 163list(APPEND libgav1_queue_test_sources "${libgav1_source}/utils/queue_test.cc") 164list(APPEND libgav1_raw_bit_reader_test_sources 165 "${libgav1_source}/utils/raw_bit_reader_test.cc") 166list(APPEND libgav1_reconstruction_test_sources 167 "${libgav1_source}/reconstruction_test.cc") 168list(APPEND libgav1_residual_buffer_pool_test_sources 169 "${libgav1_source}/residual_buffer_pool_test.cc") 170list(APPEND libgav1_scan_test_sources "${libgav1_source}/scan_test.cc") 171list(APPEND libgav1_segmentation_map_test_sources 172 "${libgav1_source}/utils/segmentation_map_test.cc") 173list(APPEND libgav1_segmentation_test_sources 174 "${libgav1_source}/utils/segmentation_test.cc") 175list(APPEND libgav1_stack_test_sources "${libgav1_source}/utils/stack_test.cc") 176list(APPEND libgav1_symbol_decoder_context_test_sources 177 "${libgav1_source}/symbol_decoder_context_test.cc") 178list(APPEND libgav1_threadpool_test_sources 179 "${libgav1_source}/utils/threadpool_test.cc") 180list(APPEND libgav1_threading_strategy_test_sources 181 "${libgav1_source}/threading_strategy_test.cc") 182list(APPEND libgav1_unbounded_queue_test_sources 183 "${libgav1_source}/utils/unbounded_queue_test.cc") 184list( 185 APPEND libgav1_vector_test_sources "${libgav1_source}/utils/vector_test.cc") 186list(APPEND libgav1_version_test_sources "${libgav1_source}/version_test.cc") 187list(APPEND libgav1_warp_test_sources "${libgav1_source}/dsp/warp_test.cc") 188list(APPEND libgav1_warp_prediction_test_sources 189 "${libgav1_source}/warp_prediction_test.cc") 190 191macro(libgav1_add_tests_targets) 192 if(NOT LIBGAV1_ENABLE_TESTS) 193 message( 194 FATAL_ERROR 195 "This version of libgav1_add_tests_targets() should only be used with" 196 " LIBGAV1_ENABLE_TESTS set to true.") 197 endif() 198 libgav1_add_library(TEST 199 NAME 200 libgav1_gtest 201 TYPE 202 STATIC 203 SOURCES 204 "${libgav1_googletest}/googletest/src/gtest-all.cc" 205 DEFINES 206 ${libgav1_defines} 207 INCLUDES 208 ${libgav1_gtest_include_paths} 209 ${libgav1_include_paths}) 210 211 libgav1_add_library(TEST 212 NAME 213 libgav1_gtest_main 214 TYPE 215 STATIC 216 SOURCES 217 "${libgav1_googletest}/googletest/src/gtest_main.cc" 218 DEFINES 219 ${libgav1_defines} 220 INCLUDES 221 ${libgav1_gtest_include_paths} 222 ${libgav1_include_paths}) 223 224 if(use_absl_threading) 225 list(APPEND libgav1_common_test_absl_deps absl::synchronization) 226 endif() 227 228 libgav1_add_executable(TEST 229 NAME 230 array_2d_test 231 SOURCES 232 ${libgav1_array_2d_test_sources} 233 DEFINES 234 ${libgav1_defines} 235 INCLUDES 236 ${libgav1_test_include_paths} 237 OBJLIB_DEPS 238 libgav1_utils 239 LIB_DEPS 240 ${libgav1_common_test_absl_deps} 241 libgav1_gtest 242 libgav1_gtest_main) 243 244 libgav1_add_executable(TEST 245 NAME 246 block_parameters_holder_test 247 SOURCES 248 ${libgav1_block_parameters_holder_test_sources} 249 DEFINES 250 ${libgav1_defines} 251 INCLUDES 252 ${libgav1_test_include_paths} 253 OBJLIB_DEPS 254 libgav1_utils 255 LIB_DEPS 256 ${libgav1_common_test_absl_deps} 257 libgav1_gtest 258 libgav1_gtest_main) 259 260 libgav1_add_executable(TEST 261 NAME 262 blocking_counter_test 263 SOURCES 264 ${libgav1_blocking_counter_test_sources} 265 DEFINES 266 ${libgav1_defines} 267 INCLUDES 268 ${libgav1_test_include_paths} 269 OBJLIB_DEPS 270 libgav1_utils 271 LIB_DEPS 272 absl::time 273 ${libgav1_common_test_absl_deps} 274 libgav1_gtest 275 libgav1_gtest_main) 276 277 if(libgav1_have_avx2) 278 libgav1_add_executable(TEST 279 NAME 280 common_avx2_test 281 SOURCES 282 ${libgav1_common_avx2_test_sources} 283 DEFINES 284 ${libgav1_defines} 285 INCLUDES 286 ${libgav1_test_include_paths} 287 LIB_DEPS 288 ${libgav1_common_test_absl_deps} 289 libgav1_gtest 290 libgav1_gtest_main) 291 endif() 292 293 if(libgav1_have_neon) 294 libgav1_add_executable(TEST 295 NAME 296 common_neon_test 297 SOURCES 298 ${libgav1_common_neon_test_sources} 299 DEFINES 300 ${libgav1_defines} 301 INCLUDES 302 ${libgav1_test_include_paths} 303 OBJLIB_DEPS 304 libgav1_tests_block_utils 305 LIB_DEPS 306 ${libgav1_common_test_absl_deps} 307 libgav1_gtest 308 libgav1_gtest_main) 309 endif() 310 311 if(libgav1_have_sse4) 312 libgav1_add_executable(TEST 313 NAME 314 common_sse4_test 315 SOURCES 316 ${libgav1_common_sse4_test_sources} 317 DEFINES 318 ${libgav1_defines} 319 INCLUDES 320 ${libgav1_test_include_paths} 321 LIB_DEPS 322 ${libgav1_common_test_absl_deps} 323 libgav1_gtest 324 libgav1_gtest_main) 325 endif() 326 327 libgav1_add_executable(TEST 328 NAME 329 common_test 330 SOURCES 331 ${libgav1_common_test_sources} 332 DEFINES 333 ${libgav1_defines} 334 INCLUDES 335 ${libgav1_test_include_paths} 336 OBJLIB_DEPS 337 libgav1_utils 338 LIB_DEPS 339 ${libgav1_common_test_absl_deps} 340 libgav1_gtest 341 libgav1_gtest_main) 342 343 libgav1_add_executable(TEST 344 NAME 345 cpu_test 346 SOURCES 347 ${libgav1_cpu_test_sources} 348 DEFINES 349 ${libgav1_defines} 350 INCLUDES 351 ${libgav1_test_include_paths} 352 OBJLIB_DEPS 353 libgav1_utils 354 LIB_DEPS 355 ${libgav1_common_test_absl_deps} 356 libgav1_gtest 357 libgav1_gtest_main) 358 359 libgav1_add_executable(TEST 360 NAME 361 entropy_decoder_test 362 SOURCES 363 ${libgav1_entropy_decoder_test_sources} 364 DEFINES 365 ${libgav1_defines} 366 INCLUDES 367 ${libgav1_test_include_paths} 368 OBJLIB_DEPS 369 libgav1_utils 370 LIB_DEPS 371 absl::time 372 ${libgav1_common_test_absl_deps} 373 libgav1_gtest 374 libgav1_gtest_main) 375 376 libgav1_add_executable(TEST 377 NAME 378 file_reader_test 379 SOURCES 380 ${libgav1_file_reader_test_sources} 381 DEFINES 382 ${libgav1_defines} 383 INCLUDES 384 ${libgav1_test_include_paths} 385 OBJLIB_DEPS 386 libgav1_dsp 387 libgav1_file_reader 388 libgav1_utils 389 libgav1_tests_utils 390 LIB_DEPS 391 absl::strings 392 absl::time 393 ${libgav1_common_test_absl_deps} 394 libgav1_gtest 395 libgav1_gtest_main) 396 397 libgav1_add_executable(TEST 398 NAME 399 file_reader_factory_test 400 SOURCES 401 ${libgav1_file_reader_factory_test_sources} 402 DEFINES 403 ${libgav1_defines} 404 INCLUDES 405 ${libgav1_test_include_paths} 406 OBJLIB_DEPS 407 libgav1_file_reader 408 libgav1_utils 409 LIB_DEPS 410 absl::memory 411 ${libgav1_common_test_absl_deps} 412 libgav1_gtest 413 libgav1_gtest_main) 414 415 libgav1_add_executable(TEST 416 NAME 417 film_grain_test 418 SOURCES 419 ${libgav1_film_grain_test_sources} 420 DEFINES 421 ${libgav1_defines} 422 INCLUDES 423 ${libgav1_test_include_paths} 424 OBJLIB_DEPS 425 libgav1_decoder 426 libgav1_dsp 427 libgav1_tests_block_utils 428 libgav1_tests_utils 429 libgav1_utils 430 LIB_DEPS 431 absl::str_format_internal 432 absl::time 433 ${libgav1_common_test_absl_deps} 434 libgav1_gtest 435 libgav1_gtest_main) 436 437 libgav1_add_executable(TEST 438 NAME 439 memory_test 440 SOURCES 441 ${libgav1_memory_test_sources} 442 DEFINES 443 ${libgav1_defines} 444 INCLUDES 445 ${libgav1_test_include_paths} 446 LIB_DEPS 447 absl::base 448 libgav1_gtest 449 libgav1_gtest_main) 450 451 libgav1_add_executable(TEST 452 NAME 453 queue_test 454 SOURCES 455 ${libgav1_queue_test_sources} 456 DEFINES 457 ${libgav1_defines} 458 INCLUDES 459 ${libgav1_test_include_paths} 460 OBJLIB_DEPS 461 libgav1_utils 462 LIB_DEPS 463 ${libgav1_common_test_absl_deps} 464 libgav1_gtest 465 libgav1_gtest_main) 466 467 libgav1_add_executable(TEST 468 NAME 469 segmentation_map_test 470 SOURCES 471 ${libgav1_segmentation_map_test_sources} 472 DEFINES 473 ${libgav1_defines} 474 INCLUDES 475 ${libgav1_test_include_paths} 476 OBJLIB_DEPS 477 libgav1_utils 478 LIB_DEPS 479 ${libgav1_common_test_absl_deps} 480 libgav1_gtest 481 libgav1_gtest_main) 482 483 libgav1_add_executable(TEST 484 NAME 485 segmentation_test 486 SOURCES 487 ${libgav1_segmentation_test_sources} 488 DEFINES 489 ${libgav1_defines} 490 INCLUDES 491 ${libgav1_test_include_paths} 492 OBJLIB_DEPS 493 libgav1_utils 494 LIB_DEPS 495 ${libgav1_common_test_absl_deps} 496 libgav1_gtest 497 libgav1_gtest_main) 498 499 libgav1_add_executable(TEST 500 NAME 501 stack_test 502 SOURCES 503 ${libgav1_stack_test_sources} 504 DEFINES 505 ${libgav1_defines} 506 INCLUDES 507 ${libgav1_test_include_paths} 508 OBJLIB_DEPS 509 libgav1_utils 510 LIB_DEPS 511 ${libgav1_common_test_absl_deps} 512 libgav1_gtest 513 libgav1_gtest_main) 514 515 libgav1_add_executable(TEST 516 NAME 517 symbol_decoder_context_test 518 SOURCES 519 ${libgav1_symbol_decoder_context_test_sources} 520 DEFINES 521 ${libgav1_defines} 522 INCLUDES 523 ${libgav1_test_include_paths} 524 OBJLIB_DEPS 525 libgav1_decoder 526 libgav1_dsp 527 libgav1_utils 528 LIB_DEPS 529 ${libgav1_common_test_absl_deps} 530 libgav1_gtest 531 libgav1_gtest_main) 532 533 libgav1_add_executable(TEST 534 NAME 535 threadpool_test 536 SOURCES 537 ${libgav1_threadpool_test_sources} 538 DEFINES 539 ${libgav1_defines} 540 INCLUDES 541 ${libgav1_test_include_paths} 542 OBJLIB_DEPS 543 libgav1_utils 544 LIB_DEPS 545 absl::synchronization 546 libgav1_gtest 547 libgav1_gtest_main) 548 549 libgav1_add_executable(TEST 550 NAME 551 unbounded_queue_test 552 SOURCES 553 ${libgav1_unbounded_queue_test_sources} 554 DEFINES 555 ${libgav1_defines} 556 INCLUDES 557 ${libgav1_test_include_paths} 558 OBJLIB_DEPS 559 libgav1_utils 560 LIB_DEPS 561 ${libgav1_common_test_absl_deps} 562 libgav1_gtest 563 libgav1_gtest_main) 564 565 libgav1_add_executable(TEST 566 NAME 567 tests_utils_test 568 SOURCES 569 ${libgav1_tests_utils_test_sources} 570 DEFINES 571 ${libgav1_defines} 572 INCLUDES 573 ${libgav1_test_include_paths} 574 OBJLIB_DEPS 575 libgav1_dsp 576 libgav1_tests_utils 577 libgav1_utils 578 LIB_DEPS 579 absl::strings 580 absl::time 581 ${libgav1_common_test_absl_deps} 582 libgav1_gtest 583 libgav1_gtest_main) 584 585 libgav1_add_executable(TEST 586 NAME 587 vector_test 588 SOURCES 589 ${libgav1_vector_test_sources} 590 DEFINES 591 ${libgav1_defines} 592 INCLUDES 593 ${libgav1_test_include_paths} 594 OBJLIB_DEPS 595 libgav1_utils 596 LIB_DEPS 597 ${libgav1_common_test_absl_deps} 598 libgav1_gtest 599 libgav1_gtest_main) 600 601 libgav1_add_executable(TEST 602 NAME 603 version_test 604 SOURCES 605 ${libgav1_version_test_sources} 606 DEFINES 607 ${libgav1_defines} 608 INCLUDES 609 ${libgav1_test_include_paths} 610 LIB_DEPS 611 ${libgav1_dependency} 612 ${libgav1_common_test_absl_deps} 613 libgav1_gtest 614 libgav1_gtest_main) 615 616 libgav1_add_library(TEST 617 NAME 618 libgav1_tests_block_utils 619 TYPE 620 OBJECT 621 SOURCES 622 ${libgav1_tests_block_utils_sources} 623 DEFINES 624 ${libgav1_defines} 625 INCLUDES 626 ${libgav1_test_include_paths}) 627 628 libgav1_add_library(TEST 629 NAME 630 libgav1_tests_utils 631 TYPE 632 OBJECT 633 SOURCES 634 ${libgav1_tests_utils_sources} 635 DEFINES 636 ${libgav1_defines} 637 INCLUDES 638 ${libgav1_test_include_paths}) 639 640 libgav1_add_executable(TEST 641 NAME 642 average_blend_test 643 SOURCES 644 ${libgav1_average_blend_test_sources} 645 DEFINES 646 ${libgav1_defines} 647 INCLUDES 648 ${libgav1_test_include_paths} 649 OBJLIB_DEPS 650 libgav1_decoder 651 libgav1_dsp 652 libgav1_tests_block_utils 653 libgav1_tests_utils 654 libgav1_utils 655 LIB_DEPS 656 absl::strings 657 absl::time 658 ${libgav1_common_test_absl_deps} 659 libgav1_gtest 660 libgav1_gtest_main) 661 662 libgav1_add_executable(TEST 663 NAME 664 buffer_pool_test 665 SOURCES 666 ${libgav1_buffer_pool_test_sources} 667 DEFINES 668 ${libgav1_defines} 669 INCLUDES 670 ${libgav1_test_include_paths} 671 OBJLIB_DEPS 672 libgav1_decoder 673 libgav1_dsp 674 libgav1_utils 675 LIB_DEPS 676 ${libgav1_common_test_absl_deps} 677 libgav1_gtest 678 libgav1_gtest_main) 679 680 libgav1_add_executable(TEST 681 NAME 682 cdef_test 683 SOURCES 684 ${libgav1_cdef_test_sources} 685 DEFINES 686 ${libgav1_defines} 687 INCLUDES 688 ${libgav1_test_include_paths} 689 OBJLIB_DEPS 690 libgav1_decoder 691 libgav1_dsp 692 libgav1_tests_utils 693 libgav1_utils 694 LIB_DEPS 695 absl::strings 696 absl::time 697 ${libgav1_common_test_absl_deps} 698 libgav1_gtest 699 libgav1_gtest_main) 700 701 libgav1_add_executable(TEST 702 NAME 703 convolve_test 704 SOURCES 705 ${libgav1_convolve_test_sources} 706 DEFINES 707 ${libgav1_defines} 708 INCLUDES 709 ${libgav1_test_include_paths} 710 OBJLIB_DEPS 711 libgav1_decoder 712 libgav1_dsp 713 libgav1_tests_block_utils 714 libgav1_tests_utils 715 libgav1_utils 716 LIB_DEPS 717 absl::str_format_internal 718 absl::time 719 ${libgav1_common_test_absl_deps} 720 libgav1_gtest 721 libgav1_gtest_main) 722 723 libgav1_add_executable(TEST 724 NAME 725 c_decoder_test 726 SOURCES 727 ${libgav1_c_decoder_test_sources} 728 DEFINES 729 ${libgav1_defines} 730 INCLUDES 731 ${libgav1_include_paths} 732 LIB_DEPS 733 ${libgav1_dependency}) 734 735 libgav1_add_executable(TEST 736 NAME 737 c_version_test 738 SOURCES 739 ${libgav1_c_version_test_sources} 740 DEFINES 741 ${libgav1_defines} 742 INCLUDES 743 ${libgav1_include_paths} 744 LIB_DEPS 745 ${libgav1_dependency}) 746 747 libgav1_add_executable(TEST 748 NAME 749 decoder_test 750 SOURCES 751 ${libgav1_decoder_test_sources} 752 DEFINES 753 ${libgav1_defines} 754 INCLUDES 755 ${libgav1_test_include_paths} 756 LIB_DEPS 757 ${libgav1_dependency} 758 ${libgav1_common_test_absl_deps} 759 libgav1_gtest 760 libgav1_gtest_main) 761 762 libgav1_add_executable(TEST 763 NAME 764 decoder_buffer_test 765 SOURCES 766 ${libgav1_decoder_buffer_test_sources} 767 DEFINES 768 ${libgav1_defines} 769 INCLUDES 770 ${libgav1_test_include_paths} 771 LIB_DEPS 772 ${libgav1_dependency} 773 ${libgav1_common_test_absl_deps} 774 libgav1_gtest 775 libgav1_gtest_main) 776 777 libgav1_add_executable(TEST 778 NAME 779 distance_weighted_blend_test 780 SOURCES 781 ${libgav1_distance_weighted_blend_test_sources} 782 DEFINES 783 ${libgav1_defines} 784 INCLUDES 785 ${libgav1_test_include_paths} 786 OBJLIB_DEPS 787 libgav1_decoder 788 libgav1_dsp 789 libgav1_tests_utils 790 libgav1_utils 791 LIB_DEPS 792 absl::strings 793 absl::time 794 ${libgav1_common_test_absl_deps} 795 libgav1_gtest 796 libgav1_gtest_main) 797 798 libgav1_add_executable(TEST 799 NAME 800 dsp_test 801 SOURCES 802 ${libgav1_dsp_test_sources} 803 DEFINES 804 ${libgav1_defines} 805 INCLUDES 806 ${libgav1_test_include_paths} 807 OBJLIB_DEPS 808 libgav1_decoder 809 libgav1_dsp 810 libgav1_tests_utils 811 libgav1_utils 812 LIB_DEPS 813 absl::strings 814 absl::time 815 ${libgav1_common_test_absl_deps} 816 libgav1_gtest 817 libgav1_gtest_main) 818 819 libgav1_add_executable(TEST 820 NAME 821 file_writer_test 822 SOURCES 823 ${libgav1_file_writer_test_sources} 824 DEFINES 825 ${libgav1_defines} 826 INCLUDES 827 ${libgav1_test_include_paths} 828 OBJLIB_DEPS 829 libgav1_decoder 830 libgav1_dsp 831 libgav1_file_writer 832 libgav1_tests_utils 833 libgav1_utils 834 LIB_DEPS 835 absl::memory 836 absl::strings 837 absl::time 838 ${libgav1_common_test_absl_deps} 839 libgav1_gtest 840 libgav1_gtest_main) 841 842 libgav1_add_executable(TEST 843 NAME 844 intrapred_cfl_test 845 SOURCES 846 ${libgav1_intrapred_cfl_test_sources} 847 DEFINES 848 ${libgav1_defines} 849 INCLUDES 850 ${libgav1_test_include_paths} 851 OBJLIB_DEPS 852 libgav1_decoder 853 libgav1_dsp 854 libgav1_tests_block_utils 855 libgav1_tests_utils 856 libgav1_utils 857 LIB_DEPS 858 absl::time 859 ${libgav1_common_test_absl_deps} 860 libgav1_gtest 861 libgav1_gtest_main) 862 863 libgav1_add_executable(TEST 864 NAME 865 intrapred_directional_test 866 SOURCES 867 ${libgav1_intrapred_directional_test_sources} 868 DEFINES 869 ${libgav1_defines} 870 INCLUDES 871 ${libgav1_test_include_paths} 872 OBJLIB_DEPS 873 libgav1_decoder 874 libgav1_dsp 875 libgav1_tests_block_utils 876 libgav1_tests_utils 877 libgav1_utils 878 LIB_DEPS 879 absl::time 880 ${libgav1_common_test_absl_deps} 881 libgav1_gtest 882 libgav1_gtest_main) 883 884 libgav1_add_executable(TEST 885 NAME 886 intrapred_filter_test 887 SOURCES 888 ${libgav1_intrapred_filter_test_sources} 889 DEFINES 890 ${libgav1_defines} 891 INCLUDES 892 ${libgav1_test_include_paths} 893 OBJLIB_DEPS 894 libgav1_decoder 895 libgav1_dsp 896 libgav1_tests_block_utils 897 libgav1_tests_utils 898 libgav1_utils 899 LIB_DEPS 900 absl::time 901 ${libgav1_common_test_absl_deps} 902 libgav1_gtest 903 libgav1_gtest_main) 904 905 libgav1_add_executable(TEST 906 NAME 907 intrapred_test 908 SOURCES 909 ${libgav1_intrapred_test_sources} 910 DEFINES 911 ${libgav1_defines} 912 INCLUDES 913 ${libgav1_test_include_paths} 914 OBJLIB_DEPS 915 libgav1_decoder 916 libgav1_dsp 917 libgav1_tests_block_utils 918 libgav1_tests_utils 919 libgav1_utils 920 LIB_DEPS 921 absl::time 922 ${libgav1_common_test_absl_deps} 923 libgav1_gtest 924 libgav1_gtest_main) 925 926 libgav1_add_executable(TEST 927 NAME 928 intra_edge_test 929 SOURCES 930 ${libgav1_intra_edge_test_sources} 931 DEFINES 932 ${libgav1_defines} 933 INCLUDES 934 ${libgav1_test_include_paths} 935 OBJLIB_DEPS 936 libgav1_decoder 937 libgav1_tests_utils 938 libgav1_dsp 939 libgav1_utils 940 LIB_DEPS 941 absl::strings 942 absl::time 943 ${libgav1_common_test_absl_deps} 944 libgav1_gtest 945 libgav1_gtest_main) 946 947 libgav1_add_executable(TEST 948 NAME 949 inverse_transform_test 950 SOURCES 951 ${libgav1_inverse_transform_test_sources} 952 DEFINES 953 ${libgav1_defines} 954 INCLUDES 955 ${libgav1_test_include_paths} 956 OBJLIB_DEPS 957 libgav1_decoder 958 libgav1_tests_block_utils 959 libgav1_tests_utils 960 libgav1_dsp 961 libgav1_utils 962 LIB_DEPS 963 absl::strings 964 absl::time 965 ${libgav1_common_test_absl_deps} 966 libgav1_gtest 967 libgav1_gtest_main) 968 969 libgav1_add_executable(TEST 970 NAME 971 internal_frame_buffer_list_test 972 SOURCES 973 ${libgav1_internal_frame_buffer_list_test_sources} 974 DEFINES 975 ${libgav1_defines} 976 INCLUDES 977 ${libgav1_test_include_paths} 978 OBJLIB_DEPS 979 libgav1_decoder 980 libgav1_dsp 981 libgav1_utils 982 LIB_DEPS 983 ${libgav1_common_test_absl_deps} 984 libgav1_gtest 985 libgav1_gtest_main) 986 987 libgav1_add_executable(TEST 988 NAME 989 loop_filter_test 990 SOURCES 991 ${libgav1_loop_filter_test_sources} 992 DEFINES 993 ${libgav1_defines} 994 INCLUDES 995 ${libgav1_test_include_paths} 996 OBJLIB_DEPS 997 libgav1_decoder 998 libgav1_dsp 999 libgav1_tests_block_utils 1000 libgav1_tests_utils 1001 libgav1_utils 1002 LIB_DEPS 1003 absl::time 1004 ${libgav1_common_test_absl_deps} 1005 libgav1_gtest 1006 libgav1_gtest_main) 1007 1008 libgav1_add_executable(TEST 1009 NAME 1010 loop_restoration_test 1011 SOURCES 1012 ${libgav1_loop_restoration_test_sources} 1013 DEFINES 1014 ${libgav1_defines} 1015 INCLUDES 1016 ${libgav1_test_include_paths} 1017 OBJLIB_DEPS 1018 libgav1_decoder 1019 libgav1_dsp 1020 libgav1_tests_block_utils 1021 libgav1_tests_utils 1022 libgav1_utils 1023 LIB_DEPS 1024 absl::time 1025 ${libgav1_common_test_absl_deps} 1026 libgav1_gtest 1027 libgav1_gtest_main) 1028 1029 libgav1_add_executable(TEST 1030 NAME 1031 mask_blend_test 1032 SOURCES 1033 ${libgav1_mask_blend_test_sources} 1034 DEFINES 1035 ${libgav1_defines} 1036 INCLUDES 1037 ${libgav1_test_include_paths} 1038 OBJLIB_DEPS 1039 libgav1_decoder 1040 libgav1_dsp 1041 libgav1_tests_utils 1042 libgav1_utils 1043 LIB_DEPS 1044 absl::strings 1045 absl::time 1046 ${libgav1_common_test_absl_deps} 1047 libgav1_gtest 1048 libgav1_gtest_main) 1049 1050 libgav1_add_executable(TEST 1051 NAME 1052 motion_field_projection_test 1053 SOURCES 1054 ${libgav1_motion_field_projection_test_sources} 1055 DEFINES 1056 ${libgav1_defines} 1057 INCLUDES 1058 ${libgav1_test_include_paths} 1059 OBJLIB_DEPS 1060 libgav1_decoder 1061 libgav1_dsp 1062 libgav1_tests_utils 1063 libgav1_utils 1064 LIB_DEPS 1065 absl::str_format_internal 1066 absl::time 1067 ${libgav1_common_test_absl_deps} 1068 libgav1_gtest 1069 libgav1_gtest_main) 1070 1071 libgav1_add_executable(TEST 1072 NAME 1073 motion_vector_search_test 1074 SOURCES 1075 ${libgav1_motion_vector_search_test_sources} 1076 DEFINES 1077 ${libgav1_defines} 1078 INCLUDES 1079 ${libgav1_test_include_paths} 1080 OBJLIB_DEPS 1081 libgav1_decoder 1082 libgav1_dsp 1083 libgav1_tests_utils 1084 libgav1_utils 1085 LIB_DEPS 1086 absl::str_format_internal 1087 absl::time 1088 ${libgav1_common_test_absl_deps} 1089 libgav1_gtest 1090 libgav1_gtest_main) 1091 1092 libgav1_add_executable(TEST 1093 NAME 1094 obmc_test 1095 SOURCES 1096 ${libgav1_obmc_test_sources} 1097 DEFINES 1098 ${libgav1_defines} 1099 INCLUDES 1100 ${libgav1_test_include_paths} 1101 OBJLIB_DEPS 1102 libgav1_decoder 1103 libgav1_dsp 1104 libgav1_tests_block_utils 1105 libgav1_tests_utils 1106 libgav1_utils 1107 LIB_DEPS 1108 absl::str_format_internal 1109 absl::time 1110 ${libgav1_common_test_absl_deps} 1111 libgav1_gtest 1112 libgav1_gtest_main) 1113 1114 libgav1_add_executable(TEST 1115 NAME 1116 obu_parser_test 1117 SOURCES 1118 ${libgav1_obu_parser_test_sources} 1119 DEFINES 1120 ${libgav1_defines} 1121 INCLUDES 1122 ${libgav1_test_include_paths} 1123 OBJLIB_DEPS 1124 libgav1_decoder 1125 libgav1_dsp 1126 libgav1_utils 1127 LIB_DEPS 1128 ${libgav1_common_test_absl_deps} 1129 libgav1_gtest 1130 libgav1_gtest_main) 1131 1132 libgav1_add_executable(TEST 1133 NAME 1134 post_filter_test 1135 SOURCES 1136 ${libgav1_post_filter_test_sources} 1137 DEFINES 1138 ${libgav1_defines} 1139 INCLUDES 1140 ${libgav1_test_include_paths} 1141 OBJLIB_DEPS 1142 libgav1_decoder 1143 libgav1_dsp 1144 libgav1_tests_block_utils 1145 libgav1_tests_utils 1146 libgav1_utils 1147 LIB_DEPS 1148 absl::time 1149 ${libgav1_common_test_absl_deps} 1150 libgav1_gtest 1151 libgav1_gtest_main) 1152 1153 libgav1_add_executable(TEST 1154 NAME 1155 prediction_mask_test 1156 SOURCES 1157 ${libgav1_prediction_mask_test_sources} 1158 DEFINES 1159 ${libgav1_defines} 1160 INCLUDES 1161 ${libgav1_test_include_paths} 1162 OBJLIB_DEPS 1163 libgav1_decoder 1164 libgav1_dsp 1165 libgav1_tests_utils 1166 libgav1_utils 1167 LIB_DEPS 1168 absl::strings 1169 absl::time 1170 ${libgav1_common_test_absl_deps} 1171 libgav1_gtest 1172 libgav1_gtest_main) 1173 1174 libgav1_add_executable(TEST 1175 NAME 1176 quantizer_test 1177 SOURCES 1178 ${libgav1_quantizer_test_sources} 1179 DEFINES 1180 ${libgav1_defines} 1181 INCLUDES 1182 ${libgav1_test_include_paths} 1183 OBJLIB_DEPS 1184 libgav1_decoder 1185 libgav1_dsp 1186 libgav1_utils 1187 LIB_DEPS 1188 ${libgav1_common_test_absl_deps} 1189 libgav1_gtest 1190 libgav1_gtest_main) 1191 1192 libgav1_add_executable(TEST 1193 NAME 1194 raw_bit_reader_test 1195 SOURCES 1196 ${libgav1_raw_bit_reader_test_sources} 1197 DEFINES 1198 ${libgav1_defines} 1199 INCLUDES 1200 ${libgav1_test_include_paths} 1201 OBJLIB_DEPS 1202 libgav1_utils 1203 LIB_DEPS 1204 ${libgav1_common_test_absl_deps} 1205 libgav1_gtest 1206 libgav1_gtest_main) 1207 1208 libgav1_add_executable(TEST 1209 NAME 1210 reconstruction_test 1211 SOURCES 1212 ${libgav1_reconstruction_test_sources} 1213 DEFINES 1214 ${libgav1_defines} 1215 INCLUDES 1216 ${libgav1_test_include_paths} 1217 OBJLIB_DEPS 1218 libgav1_decoder 1219 libgav1_dsp 1220 libgav1_tests_block_utils 1221 libgav1_tests_utils 1222 libgav1_utils 1223 ${libgav1_test_objlib_deps} 1224 LIB_DEPS 1225 absl::strings 1226 ${libgav1_common_test_absl_deps} 1227 libgav1_gtest 1228 libgav1_gtest_main) 1229 1230 libgav1_add_executable(TEST 1231 NAME 1232 residual_buffer_pool_test 1233 SOURCES 1234 ${libgav1_residual_buffer_pool_test_sources} 1235 DEFINES 1236 ${libgav1_defines} 1237 INCLUDES 1238 ${libgav1_test_include_paths} 1239 OBJLIB_DEPS 1240 libgav1_decoder 1241 libgav1_dsp 1242 libgav1_utils 1243 ${libgav1_test_objlib_deps} 1244 LIB_DEPS 1245 ${libgav1_common_test_absl_deps} 1246 libgav1_gtest 1247 libgav1_gtest_main) 1248 1249 libgav1_add_executable(TEST 1250 NAME 1251 scan_test 1252 SOURCES 1253 ${libgav1_scan_test_sources} 1254 DEFINES 1255 ${libgav1_defines} 1256 INCLUDES 1257 ${libgav1_test_include_paths} 1258 OBJLIB_DEPS 1259 libgav1_utils 1260 ${libgav1_test_objlib_deps} 1261 LIB_DEPS 1262 ${libgav1_common_test_absl_deps} 1263 libgav1_gtest 1264 libgav1_gtest_main) 1265 1266 libgav1_add_executable(TEST 1267 NAME 1268 super_res_test 1269 SOURCES 1270 ${libgav1_super_res_test_sources} 1271 DEFINES 1272 ${libgav1_defines} 1273 INCLUDES 1274 ${libgav1_test_include_paths} 1275 OBJLIB_DEPS 1276 libgav1_decoder 1277 libgav1_dsp 1278 libgav1_tests_utils 1279 libgav1_utils 1280 LIB_DEPS 1281 absl::str_format_internal 1282 absl::time 1283 ${libgav1_common_test_absl_deps} 1284 libgav1_gtest 1285 libgav1_gtest_main) 1286 1287 libgav1_add_executable(TEST 1288 NAME 1289 threading_strategy_test 1290 SOURCES 1291 ${libgav1_threading_strategy_test_sources} 1292 DEFINES 1293 ${libgav1_defines} 1294 INCLUDES 1295 ${libgav1_test_include_paths} 1296 OBJLIB_DEPS 1297 libgav1_decoder 1298 libgav1_dsp 1299 libgav1_utils 1300 ${libgav1_test_objlib_deps} 1301 LIB_DEPS 1302 absl::str_format_internal 1303 ${libgav1_common_test_absl_deps} 1304 libgav1_gtest 1305 libgav1_gtest_main) 1306 1307 libgav1_add_executable(TEST 1308 NAME 1309 warp_test 1310 SOURCES 1311 ${libgav1_warp_test_sources} 1312 DEFINES 1313 ${libgav1_defines} 1314 INCLUDES 1315 ${libgav1_test_include_paths} 1316 OBJLIB_DEPS 1317 libgav1_decoder 1318 libgav1_dsp 1319 libgav1_tests_block_utils 1320 libgav1_tests_utils 1321 libgav1_utils 1322 LIB_DEPS 1323 absl::str_format_internal 1324 absl::time 1325 ${libgav1_common_test_absl_deps} 1326 libgav1_gtest 1327 libgav1_gtest_main) 1328 1329 libgav1_add_executable(TEST 1330 NAME 1331 warp_prediction_test 1332 SOURCES 1333 ${libgav1_warp_prediction_test_sources} 1334 DEFINES 1335 ${libgav1_defines} 1336 INCLUDES 1337 ${libgav1_test_include_paths} 1338 OBJLIB_DEPS 1339 libgav1_decoder 1340 libgav1_dsp 1341 libgav1_utils 1342 LIB_DEPS 1343 ${libgav1_common_test_absl_deps} 1344 libgav1_gtest 1345 libgav1_gtest_main) 1346 1347 libgav1_add_executable(TEST 1348 NAME 1349 weight_mask_test 1350 SOURCES 1351 ${libgav1_weight_mask_test_sources} 1352 DEFINES 1353 ${libgav1_defines} 1354 INCLUDES 1355 ${libgav1_test_include_paths} 1356 OBJLIB_DEPS 1357 libgav1_decoder 1358 libgav1_dsp 1359 libgav1_tests_utils 1360 libgav1_utils 1361 LIB_DEPS 1362 absl::str_format_internal 1363 absl::time 1364 ${libgav1_common_test_absl_deps} 1365 libgav1_gtest 1366 libgav1_gtest_main) 1367endmacro() 1368