initial test harness for smp regression
This commit is contained in:
@@ -32,12 +32,19 @@ if(NX_DEBUG)
|
||||
NX_DEBUG_PACKET)
|
||||
endif()
|
||||
|
||||
add_library(moonlight_platform_common OBJECT
|
||||
${MOONLIGHT_PLATFORM_SOURCES})
|
||||
target_link_libraries(moonlight_platform_common PUBLIC
|
||||
moonlight_platform_defaults
|
||||
c
|
||||
threadx)
|
||||
function(moonlight_define_platform TARGET THREADX_TARGET)
|
||||
add_library(${TARGET} OBJECT
|
||||
${MOONLIGHT_PLATFORM_SOURCES})
|
||||
target_link_libraries(${TARGET} PUBLIC
|
||||
moonlight_platform_defaults
|
||||
c
|
||||
${THREADX_TARGET})
|
||||
endfunction()
|
||||
|
||||
moonlight_define_platform(moonlight_platform_common threadx)
|
||||
if(TARGET threadx_smp)
|
||||
moonlight_define_platform(moonlight_platform_common_smp threadx_smp)
|
||||
endif()
|
||||
|
||||
if(DEFINED NETXDUO_CUSTOM_PORT)
|
||||
add_library(moonlight_network_driver OBJECT
|
||||
@@ -50,7 +57,19 @@ if(DEFINED NETXDUO_CUSTOM_PORT)
|
||||
endif()
|
||||
|
||||
function(target_add_moonlight_platform TARGET)
|
||||
target_link_libraries(${TARGET} PRIVATE moonlight_platform_common)
|
||||
set(options)
|
||||
set(oneValueArgs PLATFORM_TARGET)
|
||||
cmake_parse_arguments(TAMP "${options}" "${oneValueArgs}" "" ${ARGN})
|
||||
|
||||
if(TAMP_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "target_add_moonlight_platform(${TARGET} ...): unknown args: ${TAMP_UNPARSED_ARGUMENTS}")
|
||||
endif()
|
||||
|
||||
if(NOT TAMP_PLATFORM_TARGET)
|
||||
set(TAMP_PLATFORM_TARGET moonlight_platform_common)
|
||||
endif()
|
||||
|
||||
target_link_libraries(${TARGET} PRIVATE ${TAMP_PLATFORM_TARGET})
|
||||
endfunction()
|
||||
|
||||
function(target_add_moonlight_network_driver TARGET)
|
||||
|
||||
Reference in New Issue
Block a user