include_directories(../include)

list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

include(parser_internalcfg)
include(parser_verilator_root)
include(picker_utils)
include(parser_internalcfg_unit)
include(parser_verilator_root_unit)
include(parser_gsim_root_unit)
include(parser_sv_collect_unit)
include(parser_sv_unit)
include(parser_uvm_unit)
include(parser_map_unit)
include(test_common)
include(codegen_filelist)
include(codegen_sv_param)
include(codegen_recursive_render)
include(codegen_sv_param_multi)

set(PICKER_EXAMPLE_DIR "${PROJECT_SOURCE_DIR}/example")
set(PICKER_TEST_DATA_DIR "${PROJECT_SOURCE_DIR}/test/data")

enable_testing()

target_compile_definitions(test_parser_internalcfg PRIVATE PICKER_EXAMPLE_DIR="${PICKER_EXAMPLE_DIR}")

add_test(NAME test_picker_utils COMMAND test_picker_utils)
add_test(NAME test_parser_internalcfg COMMAND test_parser_internalcfg)
add_test(NAME test_parser_verilator_root COMMAND test_parser_verilator_root "${PICKER_TEST_DATA_DIR}/VTop___024root.h")
add_test(NAME test_parser_internalcfg_unit COMMAND test_parser_internalcfg_unit)
add_test(NAME test_parser_verilator_root_unit COMMAND test_parser_verilator_root_unit)
add_test(NAME test_parser_gsim_root_unit COMMAND test_parser_gsim_root_unit)
add_test(NAME test_parser_sv_collect_unit COMMAND test_parser_sv_collect_unit)
add_test(NAME test_parser_sv_unit COMMAND test_parser_sv_unit)
add_test(NAME test_parser_uvm_unit COMMAND test_parser_uvm_unit)
add_test(NAME test_parser_map_unit COMMAND test_parser_map_unit)
add_test(NAME test_codegen_filelist COMMAND test_codegen_filelist)
add_test(NAME test_codegen_sv_param COMMAND test_codegen_sv_param)
add_test(NAME test_codegen_recursive_render COMMAND test_codegen_recursive_render)
add_test(NAME test_codegen_sv_param_multi COMMAND test_codegen_sv_param_multi)
