CMake: Conclusion

CMake Series: 1. CMake: Compile a Single Source File into an Executable 2. CMake: Detailed Explanation of Static and Dynamic Libraries (Linux/Windows) 3. CMake: Supplement on Static Libraries and Dynamics 4. CMake: Conditional Statements, Option Commands, and Specifying Compilers 5. CMake: Build Types (Debug, Release, and Others) 6. CMake: Set Compilation Options 7. CMake: Set Language Standards (1) 8. CMake: Set Language Standards (2) 9. CMake: Set Language Standards (3) 10. CMake: Use Control Flow 11. CMake: Detect Environment 12. CMake: Enable Vectorization for Eigen Library 13. CMake: Detect Python Interpreter and Python Library 14. CMake: Detect Python Modules and Packages 15. CMake: Detect and Use OpenMP Parallel Environment 16. CMake: Detect External Libraries – Using pkg-config 17. CMake: Detect External Libraries – Custom Find Modules 18. CMake: Use CTest for Unit Testing 19. CMake: Use Catch2 Library for Unit Testing 20. CMake: Use Google Test Library for Unit Testing 21. CMake: Use Valgrind to Detect Memory Defects 22. CMake: Other Supplements for Testing (Important) 23. CMake: Run Custom Commands at Configuration Time 24. CMake: Run Custom Commands at Build Time add_custom_command 25. CMake: Run Custom Commands for Specific Targets at Build Time 26. CMake: Explore Compilation and Compilation Commands 27. CMake: Generate Source Code at Configuration Time 28. CMake: Record Project Version Information for Reporting 29. CMake: Record Project Version from File 30. CMake: Record Git Hash Value at Configuration Time 31. CMake: Record Git Hash Value at Build Time 32. CMake: Use Functions and Macros to Reuse Code 33. CMake: Split Source Code into Modules 34. CMake: Write Functions to Test and Set Compiler Flags 35. CMake: Redefine Functions and Macros 36. CMake: Define Functions or Macros with Specified Parameters 37. CMake: Use Deprecated Functions, Macros, and Variables 38. CMake: Build Project Strategies and Limit Variable Scope and Side Effects 39. CMake: Build Project Strategies and Limit Variable Scope 40. CMake: Superbuild Mode 41. CMake: Install Project 42. CMake: Export Header Files 43. CMake: Output Libraries (Elegant Like Other Excellent Libraries) 44. CMake: Validate Self-Generated Libraries 45. CMake: Use Doxygen to Build Documentation

Regarding the CMake series, we conclude here. The knowledge points covered are basically comprehensive, although some content from the “CMake Cookbook” has been omitted:

  • Several examples of superbuild

  • Projects with mixed language examples

  • More project showcases using related technologies to build documentation

  • Examples related to compiling existing large projects

The above content has not been recorded mainly due to the following considerations: First, the importance of the above content for project building is relatively low. From my current limited experience, it is difficult to apply in actual projects! Of course, the relevant technologies for building project documentation are still quite useful. We only introduced a part of the relevant technology for building documentation in this series; a new series will be launched to introduce related technologies (leaving a pit here). In the future, all related technologies will be summarized and compared in more detail!

Secondly, regarding examples of compiling existing large projects, I do not want to include them in the CMake series, nor do I want to use examples from the “CMake Cookbook”. One reason is that the explanations do not effectively connect C++ and CMake, and the other is that they are not related to my specialty, making it difficult to derive deeper insights from specific projects. In summary, I will focus on specific applications based on Cloud Compare, explaining in more detail from the perspectives of Qt, OpenGL, 3D point cloud processing algorithms, relevant C++ syntax, and CMake (of course, this is also a pre-dug pit, haha).

Looking ahead, the next series will be related to the study of “Computer Systems”, and this series will last longer and be more sustained! The update frequency may also be lower, mainly due to the difficulty of this series and the involvement of more knowledge! Of course, this series may be interspersed with updates on deep learning series, CMake topic series, etc.!

Finally, I wish everyone to become stronger!!! If this note helped you, please like and share!!! 🌹🌹🌹

See you in the next series!!!

Leave a Comment