CMSIS-DSP: Added possibility to use reference library with test framework.

pull/19/head
Christophe Favergeon 6 years ago
parent bed0bc3971
commit 7969af9c89

8
.gitignore vendored

@ -4,4 +4,10 @@ PythonWrapper/cmsisdsp.cp36-win_amd64.pyd
PythonWrapper/rec_2.dat PythonWrapper/rec_2.dat
Output.pickle Output.pickle
build_*/ 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/

@ -16,4 +16,4 @@ test.txt
__pycache__ __pycache__
bugcheck.py bugcheck.py
fulltests/ fulltests/
testUNIXrunConfig.yaml testUNIXrunConfig.yaml

@ -1,5 +1,7 @@
cmake_minimum_required (VERSION 3.6) cmake_minimum_required (VERSION 3.6)
cmake_policy(SET CMP0077 NEW) cmake_policy(SET CMP0077 NEW)
include(CMakePrintHelpers)
# The tests are assuming that MATRIX_CHECK is enabled when building # The tests are assuming that MATRIX_CHECK is enabled when building
# CMSIS-DSP. # CMSIS-DSP.
@ -69,6 +71,7 @@ endfunction()
option(BENCHMARK "Benchmarking compiled" OFF) option(BENCHMARK "Benchmarking compiled" OFF)
option(EXTBENCH "Benchmarking with external traces" OFF) option(EXTBENCH "Benchmarking with external traces" OFF)
option(NN "NN Tests included" OFF) option(NN "NN Tests included" OFF)
option(REFLIB "Use already built reference lib" OFF)
project(Testing) project(Testing)
@ -84,7 +87,10 @@ set(ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
set(TESTFRAMEWORK ON) set(TESTFRAMEWORK ON)
include(config) include(config)
if (NOT REFLIB)
add_subdirectory(../Source bin_dsp) add_subdirectory(../Source bin_dsp)
endif()
if (NN) if (NN)
add_subdirectory(${ROOT}/CMSIS/NN/Source bin_nn) add_subdirectory(${ROOT}/CMSIS/NN/Source bin_nn)
endif() endif()
@ -260,7 +266,16 @@ if (EXTBENCH)
endif() endif()
### Includes ### 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) target_link_libraries(TestingLib PRIVATE CMSISDSP)
endif()
if(NN) if(NN)
target_link_libraries(TestingLib PRIVATE CMSISNN) target_link_libraries(TestingLib PRIVATE CMSISNN)
endif() endif()

Loading…
Cancel
Save