Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add CMSIS DSP library target to FindCMSIS.cmake #348

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions cmake/FindCMSIS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,13 @@ foreach(COMP ${CMSIS_FIND_COMPONENTS_FAMILIES})
set(CMSIS_${RTOS_COMP}_FOUND TRUE)
endforeach()

if(NOT (TARGET CMSIS::STM32::${FAMILY}${CORE_C}::DSP}))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At this point, do you know for sure that we do have the DSP for all families ? otherwise we might want to check first

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Hish15,
Sorry for taking so long to respond on this one. I went through and validated that every family has the ability to pull in DSP. Would you like me to write a unit test to make sure this remains the case?

add_library(CMSIS::STM32::${FAMILY}${CORE_C}::DSP INTERFACE IMPORTED)
target_link_libraries(CMSIS::STM32::${FAMILY}${CORE_C}::DSP INTERFACE CMSIS::STM32::${FAMILY}${CORE_C})
target_link_directories(CMSIS::STM32::${FAMILY}${CORE_C}::DSP INTERFACE "${CMSIS_${FAMILY}${CORE_U}_CORE_PATH}/DSP/Lib/GCC/")
target_include_directories(CMSIS::STM32::${FAMILY}${CORE_C}::DSP INTERFACE "${CMSIS_${FAMILY}${CORE_U}_CORE_PATH}/DSP/Include")
endif()

list(REMOVE_DUPLICATES CMSIS_INCLUDE_DIRS)
list(REMOVE_DUPLICATES CMSIS_SOURCES)
endforeach()
Expand Down