我不只是为了我自己。CMakeLists.txt
我希望这个问题能成为许多喜欢我的新手的参考,因为对于这么小的文件 ,幕后究竟发生了什么感到非常困惑
cmake_minimum_required (VERSION 2.6)
project(Tutorial)
add_executable(Tutorial tutorial.cpp)
还有这么小的tutorial.cpp
int main() { return 0; }
生成了很多文件
CMakeCache.txt cmake_install.cmake Makefile
CMakeLists.txt tutorial.cpp
和一个CMakeFiles
包含这么多文件和文件夹的文件夹
CMakeCCompiler.cmake CMakeOutput.log Makefile.cmake
cmake.check_cache CMakeSystem.cmake progress.marks
CMakeCXXCompiler.cmake CMakeTmp TargetDirectories.txt
CMakeDetermineCompilerABI_C.bin CompilerIdC Tutorial.dir
CMakeDetermineCompilerABI_CXX.bin CompilerIdCXX
CMakeDirectoryInformation.cmake Makefile2
不了解幕后发生的事情(即:为什么必须生成文件以及它们的目的是什么)是学习 CMake 的最大障碍。
如果有人知道,请您为后代解释一下吗?这些文件的用途是什么,当我键入时cmake .
,cmake 在构建项目之前究竟是在配置和生成什么?