From 7969af9c89e5416e8060bb8ca352fef645a9b826 Mon Sep 17 00:00:00 2001 From: Christophe Favergeon Date: Tue, 7 Apr 2020 14:49:43 +0200 Subject: [PATCH] CMSIS-DSP: Added possibility to use reference library with test framework. --- .gitignore | 8 +++++++- Testing/.gitignore | 2 +- Testing/CMakeLists.txt | 15 +++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f13295ba..8b95ada7 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,10 @@ PythonWrapper/cmsisdsp.cp36-win_amd64.pyd PythonWrapper/rec_2.dat Output.pickle build_*/ - +Examples/ARM/arm_fft_bin_example/RTE/ +Examples/ARM/arm_fft_bin_example/RTE/ +Examples/ARM/arm_fft_bin_example/RTE/ +Examples/ARM/arm_linear_interp_example/RTE/ +Examples/ARM/arm_signal_converge_example/RTE/ +Examples/ARM/arm_svm_example/RTE/ +Projects/ARM/IntermediateFiles/ diff --git a/Testing/.gitignore b/Testing/.gitignore index 6c37ff63..3f9e95df 100644 --- a/Testing/.gitignore +++ b/Testing/.gitignore @@ -16,4 +16,4 @@ test.txt __pycache__ bugcheck.py fulltests/ -testUNIXrunConfig.yaml +testUNIXrunConfig.yaml \ No newline at end of file diff --git a/Testing/CMakeLists.txt b/Testing/CMakeLists.txt index eacb5c6b..f510ce4b 100644 --- a/Testing/CMakeLists.txt +++ b/Testing/CMakeLists.txt @@ -1,5 +1,7 @@ cmake_minimum_required (VERSION 3.6) cmake_policy(SET CMP0077 NEW) +include(CMakePrintHelpers) + # The tests are assuming that MATRIX_CHECK is enabled when building # CMSIS-DSP. @@ -69,6 +71,7 @@ endfunction() option(BENCHMARK "Benchmarking compiled" OFF) option(EXTBENCH "Benchmarking with external traces" OFF) option(NN "NN Tests included" OFF) +option(REFLIB "Use already built reference lib" OFF) project(Testing) @@ -84,7 +87,10 @@ set(ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../..) set(TESTFRAMEWORK ON) include(config) +if (NOT REFLIB) add_subdirectory(../Source bin_dsp) +endif() + if (NN) add_subdirectory(${ROOT}/CMSIS/NN/Source bin_nn) endif() @@ -260,7 +266,16 @@ if (EXTBENCH) endif() ### Includes +if (REFLIB) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../Source) +include(configDsp) +SET(DSP ${ROOT}/CMSIS/DSP) +target_include_directories(TestingLib PUBLIC "${DSP}/Include") +target_link_libraries(TestingLib PRIVATE "${REFLIBNAME}") +else() target_link_libraries(TestingLib PRIVATE CMSISDSP) +endif() + if(NN) target_link_libraries(TestingLib PRIVATE CMSISNN) endif()