Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cylfoo opened this issue Mar 6, 2019 · 0 comments

Comments

@cylfoo
Copy link

cylfoo commented Mar 6, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant