1PROJECT(pico_divider_test) 2 3if (PICO_ON_DEVICE) 4 add_executable(pico_divider_test 5 pico_divider_test.c 6 ) 7 8 target_link_libraries(pico_divider_test pico_stdlib) 9 10 pico_set_divider_implementation(pico_divider_test hardware_explicit) # want to compare against compiler impl 11 12 pico_add_extra_outputs(pico_divider_test) 13 14 target_compile_definitions(pico_divider_test PRIVATE 15# PICO_DIVIDER_DISABLE_INTERRUPTS=1 16# TURBO 17 ) 18 19 # this is a separate test as hardware_explicit above causes it not to be tested at all! 20 add_library(pico_divider_nesting_test_core INTERFACE) 21 target_sources(pico_divider_nesting_test_core INTERFACE 22 pico_divider_nesting_test.c 23 ) 24 target_link_libraries(pico_divider_nesting_test_core INTERFACE pico_stdlib hardware_dma) 25 26 add_executable(pico_divider_nesting_test_with_dirty_check) 27 target_link_libraries(pico_divider_nesting_test_with_dirty_check pico_divider_nesting_test_core) 28 pico_set_divider_implementation(pico_divider_nesting_test_with_dirty_check hardware) 29 pico_add_extra_outputs(pico_divider_nesting_test_with_dirty_check) 30 31 add_executable(pico_divider_nesting_test_with_disable_irq) 32 target_link_libraries(pico_divider_nesting_test_with_disable_irq pico_divider_nesting_test_core) 33 target_compile_definitions(pico_divider_nesting_test_with_disable_irq PRIVATE 34 PICO_DIVIDER_DISABLE_INTERRUPTS=1) 35 pico_set_divider_implementation(pico_divider_nesting_test_with_disable_irq hardware) 36 pico_add_extra_outputs(pico_divider_nesting_test_with_disable_irq) 37 38endif()