Skip to content

Commit

Permalink
[CMakeLists.txt] clean up header dependencies of FreeRTOS and lpc17xx
Browse files Browse the repository at this point in the history
IMHO it makes CMakeLists.txt more clear/simpler
Applying the same to boards is not possible, since they are not built as
libraries.

Signed-off-by: Adam Wujek <[email protected]>
  • Loading branch information
Adam Wujek committed Aug 13, 2019
1 parent 6f54f0c commit 13ba63e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
4 changes: 0 additions & 4 deletions FreeRTOS/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ set(LIBFREERTOS_SRCS ${LIBFREERTOS_SRCS}
)

include_directories(${UCONTROLLER_HDRS})
include_directories(${FREERTOS_INC})

set(FREERTOS_INC ${FREERTOS_INC} PARENT_SCOPE)
set(PROJ_HDRS ${PROJ_HDRS} ${FREERTOS_INC} PARENT_SCOPE)

string(REGEX REPLACE ";" " " FREERTOS_FLAGS "${FREERTOS_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${FREERTOS_FLAGS}")
Expand Down
7 changes: 3 additions & 4 deletions port/ucontroller/nxp/lpc17xx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ set(LPC17XX_PATH ${CMAKE_CURRENT_SOURCE_DIR})
set(LPCOPEN_SRCPATH ${LPC17XX_PATH}/lpcopen/src)
set(LPCOPEN_INCPATH ${LPC17XX_PATH}/lpcopen/inc)

include_directories(${LPC17XX_PATH})
include_directories(${PROJ_HDRS})

#Silence GCC Warnings
add_compile_options( -Wno-switch -Wno-unused-but-set-variable )
Expand Down Expand Up @@ -48,7 +46,6 @@ else()
set(LIBLPCOPEN_SRCS ${LIBLPCOPEN_SRCS} ${LPC17XX_PATH}/lpc17_uart.c)
endif()

include_directories(${LPCOPEN_INCPATH})

set(TARGET_ARCH "armv7-m" )
set(TARGET_CPU "cortex-m3")
Expand All @@ -73,5 +70,7 @@ set(UCONTROLLER_HDRS ${UCONTROLLER_HDRS} PARENT_SCOPE)

add_library(lpcopen STATIC ${LIBLPCOPEN_SRCS})

add_dependencies(lpcopen FreeRTOS)
target_link_libraries(lpcopen PUBLIC FreeRTOS)
target_include_directories(lpcopen PUBLIC ${LPCOPEN_INCPATH})
target_include_directories(lpcopen PUBLIC ${LPC17XX_PATH})
target_include_directories(lpcopen PUBLIC ${PROJ_HDRS})

0 comments on commit 13ba63e

Please sign in to comment.