Linux c++ development-04-Make Hello World more like a project

Insert image description here

Insert image description here
CMakeLists.txt in outer CMakeLists.txt src

ADD_EXECUTABLE(hello main.cpp)

main.cpp

Insert image description here
Then cd build
cmake …
make
./bin/hello
Insert image description here

Guess you like

Origin blog.csdn.net/FairLikeSnow/article/details/132703273