[DOC Error] ADD_EXECUTABLE expects the source files not the variable name

#6 · open · 0 comments

View on GitHub ↗

leeexyz

Hi there, When I try the first example in `cmake-pratice`, page 6, `cmake` complains cannot find source files. ``` -- This is BINARY dir -- This is SOURCE dir -- Configuring done CMake Error at CMakeLists.txt:8 (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 CMake Error: CMake can not determine linker language for target: hello CMake Error: Cannot determine link language for target "hello". ``` After I modified `add_executable(hello SRC_LIST)` to `add_executable(hello ${SRC_LIST})`, this issue had been solved. So here must be using variable name. Can you check and update it? cmake version `3.5.1`

Comments