1add_libc_testsuite(libc_string_unittests) 2 3add_subdirectory(memory_utils) 4 5add_libc_unittest( 6 strcat_test 7 SUITE 8 libc_string_unittests 9 SRCS 10 strcat_test.cpp 11 DEPENDS 12 strcat 13 strcpy 14) 15 16add_libc_unittest( 17 strcpy_test 18 SUITE 19 libc_string_unittests 20 SRCS 21 strcpy_test.cpp 22 DEPENDS 23 strcpy 24) 25 26# Tests all implementations of memcpy that can run on the host. 27get_property(memcpy_implementations GLOBAL PROPERTY memcpy_implementations) 28foreach(memcpy_config_name IN LISTS memcpy_implementations) 29 get_target_property(require_cpu_features ${memcpy_config_name} REQUIRE_CPU_FEATURES) 30 host_supports(can_run "${require_cpu_features}") 31 if(can_run) 32 add_libc_unittest( 33 ${memcpy_config_name}_test 34 SUITE 35 libc_string_unittests 36 SRCS 37 memcpy_test.cpp 38 DEPENDS 39 ${memcpy_config_name} 40 ) 41 else() 42 message(STATUS "Skipping test for '${memcpy_config_name}' insufficient host cpu features") 43 endif() 44endforeach() 45 46