cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX 6.16.0 generates conflicting CMake configuration

JohannesWilde
Associate III

The CubeMX 6.16.0 is able to generate a CMake-project for an STM32H7 - great. A small conflict currently exists in the following two generated files [for a "basic" STM32H7 project]:

- CM7/CMakeLists.txt:69

# Add linked libraries
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE
    # Add user defined libraries
)

- CM7/mx-generated.cmake:81

# Add libraries to the project
target_link_libraries(${CMAKE_PROJECT_NAME} ${MX_LINK_LIBS})

 

The first specifies 

PRIVATE

while the second does not - which is incompatible as per CMake.

 

Can someone confirm this observation?

 

Can this be made consistent in the future? If so, I would prefer the one with the scope keyword - but could also live without it here.

2 REPLIES 2
JohannesWilde
Associate III

The same also holds for the CM4 code...

Souhaib MAZHOUD
ST Employee

Hello @JohannesWilde 

Thank you for bringing this up!

I will check this internally with the dedicated team and get back to you ASAP.

KR, Souhaib

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.