|
|
@@ -27,9 +27,12 @@ set_property(GLOBAL PROPERTY cmsis_nn_unit_test_executables)
|
|
|
# This function should be used instead of add_executable.
|
|
|
function(add_cmsis_nn_unit_test_executable)
|
|
|
get_property(tmp GLOBAL PROPERTY cmsis_nn_unit_test_executables)
|
|
|
- foreach(arg ${ARGV})
|
|
|
- set(tmp "${tmp} ${arg}")
|
|
|
- add_executable(${arg})
|
|
|
+ foreach(target ${ARGV})
|
|
|
+ set(tmp "${tmp} ${target}")
|
|
|
+ add_executable(${target})
|
|
|
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|
|
+ target_link_options(${target} PRIVATE "--specs=nosys.specs")
|
|
|
+ endif()
|
|
|
endforeach()
|
|
|
set_property(GLOBAL PROPERTY cmsis_nn_unit_test_executables "${tmp}")
|
|
|
endfunction(add_cmsis_nn_unit_test_executable)
|