我正在尝试使用eclipse软件中的Cmake(Cmakelists.txt文件)在嵌入式Linux硬件(imx6ull)中创建一个用于uart通信的C项目 .

After creating Cmakelists.txt when i tried to build the project, i get the following error in the makefile:

1.)CMakeFiles / uart.dir / build.make:71:目标'uart'的配方失败2.)CMakeFiles / Makefile2:70:目标'CMakeFiles / uart.dir / all'的配方失败3.)Makefile:119 :目标'all'的配方失败 .

Below are the contents of my Cmakelists.txt file:

cmake_minimum_required(VERSION 2.8.1)

######## Project settings ########
PROJECT(Uart_Test)

set(TARGET_EXE uart)

######## Build and include settings ########
file(GLOB EXE_SOURCES "main/src/*.c")

add_executable("${TARGET_EXE}" "${EXE_SOURCES}")

target_include_directories("${TARGET_EXE}" PUBLIC inc)

set_target_properties("${TARGET_EXE}" PROPERTIES LINKER_LANGUAGE C)

######## Install targets ########
install(TARGETS "${TARGET_EXE}" RUNTIME DESTINATION bin)