mtrebi / thread-pool

Thread pool implementation using c++11 threads
MIT License
1.15k stars 225 forks source link

Building problem - cmake configure #25

Open rkorzeniewski opened 4 years ago

rkorzeniewski commented 4 years ago

cmake configure fails with the following error:

CMake Error at CMakeLists.txt:23 (add_executable):
  Cannot find source file:

    src/main.cpp

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx

CMake Error at CMakeLists.txt:23 (add_executable):
  No SOURCES given to target: main

CMake Generate step failed.  Build files cannot be regenerated correctly.
kangaxx commented 4 years ago

yes, no src/main.cpp in project ,hahahaha. In CMakeList.txt, replace src/main.cpp to example/example.cpp , and replace function void example() to int main(int argc, char* argv[]) , just do it

rkorzeniewski commented 4 years ago

@kangaxx - yes, I know how to handle it for myself (I cloned the repository to https://github.com/inteos/thread-pool and extent it for my purpose) and for me it is not a problem. I created this issue to show @mtrebi what should be corrected for new users and easy adoption.