16,473
社区成员
发帖
与我相关
我的任务
分享
PROJECT (HELLO)
SET(SRC_LIST main.c)
ADD_EXECUTABLE(hello.exe SRC_LIST)
#include "stdio.h"
int main() {
printf("sdff\n");
return 0;
}
C:\Windows\system32\cmd.exe /c cmake .
-- Configuring done
CMake Error at CMakeLists.txt:3 (ADD_EXECUTABLE):
Cannot find source file:
SRC_LIST
Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx
-- Build files have been written to: G:/workspace/test
shell returned 1
Hit any key to close this window...
PROJECT (HELLO)[align=left]
SET(SRC_LIST main.c)
ADD_EXECUTABLE(hello.exe ${SRC_LIST})