CMake Basics: Configuration and Best Practices
1. File Structure mkdir buildcmake .. -G "Unix Makefiles"make 2. Code Explanation # CMake recommends using "out-of-source builds" to avoid polluting the source code directory. # Create a build directory (name can be arbitrary, e.g., build/) mkdir build # Enter that directory cd build # Specify the parent directory of CMakeLists.txt (i.e., the source code … Read more