diff --git a/miosix/cmake/miosix.cmake b/miosix/cmake/miosix.cmake index a381fc8260e1e8ea0c0ffde993e5a71d4714cf3f..ce1add572b7a52bb0a1577b870f961b0694ac874 100644 --- a/miosix/cmake/miosix.cmake +++ b/miosix/cmake/miosix.cmake @@ -74,6 +74,12 @@ define_property(TARGET BRIEF_DOCS "Preperty that stores the link libraries of the target" ) +# Creating property to store the link directories +define_property(TARGET + PROPERTY TARGET_CXX_FLAGS INHERITED + BRIEF_DOCS "Preperty that stores the CXX flags of the target" +) + # Function to configure a target to be built for the kernel function(configure_target_for_kernel TARGET TYPE) # Include kernel directories @@ -148,6 +154,7 @@ function(add_miosix_libraries BOARD_OPTIONS_FILE) set(INTERFACE_LIB interface-${BOARD_NAME}) add_library(${INTERFACE_LIB} INTERFACE) configure_target_for_kernel(${INTERFACE_LIB} INTERFACE) + set_property(TARGET ${INTERFACE_LIB} PROPERTY TARGET_CXX_FLAGS ${CXXFLAGS_BASE}) # Configure linker file and options set_property(TARGET ${KERNEL_LIB} PROPERTY INTERFACE_LINK_DEPENDS ${LINKER_SCRIPT})