There are several C++ source codes which don't utilize CMake as a build system. Suppose I have such a file structure:
ProjectRepoDir
  |- include
     |- liba.h
     |- module1.h
  |- src
     |- main.cpp
     |- liba.cpp
     |- module1.cpp
  |- samples
     |- example1-dir
        |- main.cpp
     |- example2-dir
        |- main.cpp
Can I create a CMakeLists.txt under the ProjectRepoDir, and in the directory I do these commands to build the source code and all the samples directories? The reason is that I don't want to write CMakeLists.txt in each samples directory.
mkdir build && cd build
cmake ..
make
 
     
    