Add test files

This commit is contained in:
TiejunZhou
2023-11-30 09:26:50 +00:00
parent df4ecd8404
commit 772f99b415
11 changed files with 5723 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
project(libs LANGUAGES C)
if($ENV{ENABLE_64})
message(STATUS "Building for 64bit")
else()
add_compile_options(-m32)
add_link_options(-m32)
message(STATUS "Building for 32bit")
endif()
message(STATUS "Using toolchain file: ${CMAKE_TOOLCHAIN_FILE}.")
get_filename_component(
externals ${CMAKE_CURRENT_SOURCE_DIR}/.. ABSOLUTE)
if(NOT LX_STANDALONE_ENABLE)
add_subdirectory(${externals}/threadx threadx)
endif()
add_subdirectory(${externals}/filex filex)
target_compile_options(threadx PRIVATE -DTX_ENABLE_EVENT_TRACE)
if(NOT DEFINED ENV{ENABLE_IDLE})
target_compile_options(threadx PRIVATE -DTX_LINUX_NO_IDLE_ENABLE)
endif()
if((NOT LX_STANDALONE_ENABLE) OR (NOT FX_STANDALONE_ENABLE))
foreach(lib threadx filex)
get_target_property(dirs ${lib} INCLUDE_DIRECTORIES)
execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/inc)
foreach(dir ${dirs})
file(GLOB header_files ${dir}/*.h)
foreach(header_file ${header_files})
execute_process(COMMAND ln -sf ${header_file} ${CMAKE_BINARY_DIR}/inc)
endforeach()
endforeach()
endforeach()
endif()