├── .nojekyll ├── 02~项目构建 └── README.md ├── 04~测试 └── README.md ├── 10~XMake └── README.md ├── 03~外部库和程序 ├── README.md └── 99~参考资料 │ └── 2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等 │ └── codes │ ├── cpm │ ├── README.md │ └── .gitignore │ ├── find_package │ ├── README.md │ └── .gitignore │ ├── subdirectory │ ├── README.md │ ├── .gitignore │ ├── project1 │ │ └── project1.cpp │ └── project3 │ │ └── project3.cpp │ ├── xlog │ ├── app │ │ ├── .gitignore │ │ └── src │ │ │ └── main │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── nativelib │ │ ├── consumer-rules.pro │ │ └── .gitignore │ └── settings.gradle │ ├── fetch_content │ ├── README.md │ └── .gitignore │ ├── multi_cmakelists │ ├── README.md │ └── .gitignore │ ├── includes_full_code │ ├── README.md │ └── .gitignore │ ├── .gitignore │ ├── find_library │ ├── .gitignore │ └── README.md │ ├── fmt-sample │ └── .gitignore │ └── gtest-sample │ ├── .gitignore │ ├── third_party │ └── gtest │ │ ├── .github │ │ └── ISSUE_TEMPLATE │ │ │ └── config.yml │ │ └── .clang-format │ ├── src │ ├── add.cpp │ └── add.h │ └── test │ ├── CMakeLists.txt │ └── main.cpp ├── 01~基本语法 ├── CMake 快速开始 │ ├── README.md │ └── CMake 简单示例.md ├── .DS_Store └── CMake 变量 │ └── 99~参考资料 │ └── 2018~CMake 两种变量原理.md ├── 05~安装与发布 └── README.md ├── 99~参考资料 ├── 2016~全网最细的 CMake 教程 │ └── codes │ │ ├── .gitignore │ │ ├── Demo4 │ │ ├── config.h.in │ │ └── math │ │ │ ├── MathFunctions.h │ │ │ └── CMakeLists.txt │ │ ├── Demo5 │ │ ├── config.h.in │ │ └── math │ │ │ └── MathFunctions.h │ │ ├── Demo6 │ │ ├── config.h.in │ │ └── math │ │ │ └── MathFunctions.h │ │ ├── Demo1 │ │ └── CMakeLists.txt │ │ ├── Demo2 │ │ └── MathFunctions.h │ │ ├── Demo3 │ │ └── math │ │ │ ├── MathFunctions.h │ │ │ └── CMakeLists.txt │ │ ├── Demo7 │ │ └── math │ │ │ └── MathFunctions.h │ │ └── Demo8 │ │ └── math │ │ └── MathFunctions.h ├── 2018~cmake-project-template │ └── codes │ │ ├── test │ │ ├── lib │ │ │ └── .git-keep │ │ ├── .git-keep │ │ └── main.cpp │ │ ├── .idea │ │ ├── .gitignore │ │ ├── cmake-project-template.iml │ │ ├── markdown-navigator │ │ │ └── profiles_settings.xml │ │ └── dictionaries │ │ │ └── kig.xml │ │ └── .gitmodules ├── 2020~《CMake Cookbook | CMake 完整使用教程》 │ ├── 02~检测环境 │ │ └── 2.1~检测操作系统.md │ ├── codes │ │ ├── chapter-06 │ │ │ ├── title.txt │ │ │ ├── recipe-05 │ │ │ │ ├── cxx-example │ │ │ │ │ ├── VERSION │ │ │ │ │ └── version.hpp.in │ │ │ │ └── title.txt │ │ │ ├── recipe-01 │ │ │ │ └── title.txt │ │ │ ├── recipe-07 │ │ │ │ ├── title.txt │ │ │ │ └── cxx-example │ │ │ │ │ └── version.hpp.in │ │ │ ├── recipe-06 │ │ │ │ ├── title.txt │ │ │ │ └── cxx-example │ │ │ │ │ └── version.hpp.in │ │ │ ├── recipe-03 │ │ │ │ ├── title.txt │ │ │ │ ├── abstract.md │ │ │ │ └── README.md │ │ │ ├── recipe-02 │ │ │ │ ├── title.txt │ │ │ │ └── fortran-c-example │ │ │ │ │ ├── example.f90 │ │ │ │ │ └── print_info.c.in │ │ │ ├── recipe-04 │ │ │ │ ├── title.txt │ │ │ │ └── .DS_Store │ │ │ └── .DS_Store │ │ ├── chapter-07 │ │ │ ├── title.txt │ │ │ ├── recipe-09 │ │ │ │ ├── title.txt │ │ │ │ ├── abstract.md │ │ │ │ └── fortran-example │ │ │ │ │ ├── src │ │ │ │ │ ├── io │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ ├── parser │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ └── initial │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ └── external │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── README.md │ │ │ ├── recipe-01 │ │ │ │ ├── cxx-example │ │ │ │ │ ├── menu.yml │ │ │ │ │ ├── src │ │ │ │ │ │ ├── main.cpp │ │ │ │ │ │ ├── sum_integers.cpp │ │ │ │ │ │ └── sum_integers.hpp │ │ │ │ │ └── tests │ │ │ │ │ │ ├── catch.hpp │ │ │ │ │ │ └── test.cpp │ │ │ │ └── title.txt │ │ │ ├── recipe-04 │ │ │ │ ├── cxx-example │ │ │ │ │ ├── menu.yml │ │ │ │ │ ├── src │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ ├── main.cpp │ │ │ │ │ │ ├── sum_integers.cpp │ │ │ │ │ │ └── sum_integers.hpp │ │ │ │ │ └── tests │ │ │ │ │ │ ├── catch.hpp │ │ │ │ │ │ └── test.cpp │ │ │ │ └── title.txt │ │ │ ├── recipe-05 │ │ │ │ ├── title.txt │ │ │ │ └── example │ │ │ │ │ └── cmake │ │ │ │ │ └── custom.cmake │ │ │ ├── recipe-07 │ │ │ │ ├── cxx-example │ │ │ │ │ ├── menu.yml │ │ │ │ │ ├── tests │ │ │ │ │ │ └── catch.hpp │ │ │ │ │ ├── src │ │ │ │ │ │ ├── io │ │ │ │ │ │ │ └── io.hpp │ │ │ │ │ │ ├── initial │ │ │ │ │ │ │ └── initial.hpp │ │ │ │ │ │ ├── parser │ │ │ │ │ │ │ └── parser.hpp │ │ │ │ │ │ └── evolution │ │ │ │ │ │ │ └── evolution.hpp │ │ │ │ │ └── external │ │ │ │ │ │ ├── conversion.hpp │ │ │ │ │ │ └── README.md │ │ │ │ └── title.txt │ │ │ ├── recipe-08 │ │ │ │ ├── cxx-example │ │ │ │ │ ├── menu.yml │ │ │ │ │ ├── src │ │ │ │ │ │ ├── main.cpp │ │ │ │ │ │ ├── io │ │ │ │ │ │ │ ├── io.cpp │ │ │ │ │ │ │ └── io.hpp │ │ │ │ │ │ ├── parser │ │ │ │ │ │ │ ├── parser.cpp │ │ │ │ │ │ │ └── parser.hpp │ │ │ │ │ │ ├── initial │ │ │ │ │ │ │ ├── initial.cpp │ │ │ │ │ │ │ └── initial.hpp │ │ │ │ │ │ └── evolution │ │ │ │ │ │ │ ├── evolution.cpp │ │ │ │ │ │ │ └── evolution.hpp │ │ │ │ │ ├── tests │ │ │ │ │ │ ├── test.cpp │ │ │ │ │ │ ├── catch.hpp │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ └── external │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ ├── conversion.cpp │ │ │ │ │ │ ├── conversion.hpp │ │ │ │ │ │ └── README.md │ │ │ │ └── title.txt │ │ │ ├── recipe-02 │ │ │ │ └── title.txt │ │ │ ├── recipe-06 │ │ │ │ ├── title.txt │ │ │ │ ├── example │ │ │ │ │ └── cmake │ │ │ │ │ │ └── custom.cmake │ │ │ │ └── abstract.md │ │ │ ├── recipe-03 │ │ │ │ ├── title.txt │ │ │ │ └── abstract.md │ │ │ └── .DS_Store │ │ ├── chapter-08 │ │ │ ├── title.txt │ │ │ ├── recipe-01 │ │ │ │ ├── title.txt │ │ │ │ └── cxx-example │ │ │ │ │ └── src │ │ │ │ │ └── CMakeLists.txt │ │ │ ├── recipe-04 │ │ │ │ ├── cxx-example │ │ │ │ │ ├── menu.yml │ │ │ │ │ ├── main.cpp │ │ │ │ │ ├── test.cpp │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── sum_integers.cpp │ │ │ │ │ └── sum_integers.hpp │ │ │ │ ├── cxx-example-3.5 │ │ │ │ │ ├── menu.yml │ │ │ │ │ ├── main.cpp │ │ │ │ │ ├── test.cpp │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── sum_integers.cpp │ │ │ │ │ ├── sum_integers.hpp │ │ │ │ │ ├── fetch_git_repo.cmake │ │ │ │ │ └── fetch_at_configure_step.in │ │ │ │ ├── title.txt │ │ │ │ └── .DS_Store │ │ │ ├── recipe-05 │ │ │ │ ├── title.txt │ │ │ │ └── cxx-example │ │ │ │ │ ├── external │ │ │ │ │ └── upstream │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ └── menu.yml │ │ │ ├── recipe-03 │ │ │ │ ├── c-example │ │ │ │ │ └── external │ │ │ │ │ │ └── upstream │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── title.txt │ │ │ │ └── abstract.md │ │ │ ├── recipe-02 │ │ │ │ ├── cxx-example │ │ │ │ │ ├── external │ │ │ │ │ │ └── upstream │ │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ └── src │ │ │ │ │ │ └── path-info.cpp │ │ │ │ └── title.txt │ │ │ └── .DS_Store │ │ ├── chapter-10 │ │ │ ├── title.txt │ │ │ ├── recipe-03 │ │ │ │ ├── title.txt │ │ │ │ ├── cxx-example │ │ │ │ │ └── src │ │ │ │ │ │ ├── Message.cpp │ │ │ │ │ │ └── hello-world.cpp │ │ │ │ └── abstract.md │ │ │ ├── recipe-01 │ │ │ │ ├── title.txt │ │ │ │ └── cxx-example │ │ │ │ │ └── tests │ │ │ │ │ └── CMakeLists.txt │ │ │ ├── recipe-02 │ │ │ │ ├── title.txt │ │ │ │ └── cxx-example │ │ │ │ │ └── src │ │ │ │ │ ├── Message.cpp │ │ │ │ │ └── hello-world.cpp │ │ │ ├── recipe-04 │ │ │ │ ├── title.txt │ │ │ │ ├── cxx-example │ │ │ │ │ └── external │ │ │ │ │ │ └── upstream │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ └── abstract.md │ │ │ └── .DS_Store │ │ ├── chapter-11 │ │ │ ├── title.txt │ │ │ ├── recipe-01 │ │ │ │ ├── title.txt │ │ │ │ ├── cxx-example │ │ │ │ │ ├── src │ │ │ │ │ │ ├── Message.cpp │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ └── hello-world.cpp │ │ │ │ │ └── cmake │ │ │ │ │ │ ├── messageConfig.cmake.in │ │ │ │ │ │ └── coffee.icns │ │ │ │ └── abstract.md │ │ │ ├── recipe-02 │ │ │ │ ├── cxx-example │ │ │ │ │ ├── account │ │ │ │ │ │ ├── version.py │ │ │ │ │ │ ├── test.py │ │ │ │ │ │ ├── account.cpp │ │ │ │ │ │ ├── account.hpp │ │ │ │ │ │ └── __init__.py │ │ │ │ │ ├── README.rst │ │ │ │ │ └── MANIFEST.in │ │ │ │ └── title.txt │ │ │ ├── recipe-03 │ │ │ │ ├── cxx-example │ │ │ │ │ ├── account │ │ │ │ │ │ ├── version.py │ │ │ │ │ │ ├── account.h │ │ │ │ │ │ ├── test.py │ │ │ │ │ │ ├── implementation │ │ │ │ │ │ │ ├── c_cpp_interface.cpp │ │ │ │ │ │ │ ├── cpp_implementation.cpp │ │ │ │ │ │ │ └── cpp_implementation.hpp │ │ │ │ │ │ └── interface_file_names.cfg.in │ │ │ │ │ ├── custom.sh │ │ │ │ │ ├── README.rst │ │ │ │ │ └── MANIFEST.in │ │ │ │ ├── fortran-example │ │ │ │ │ ├── account │ │ │ │ │ │ ├── version.py │ │ │ │ │ │ ├── test.py │ │ │ │ │ │ ├── account.h │ │ │ │ │ │ ├── interface_file_names.cfg.in │ │ │ │ │ │ └── implementation │ │ │ │ │ │ │ └── fortran_implementation.f90 │ │ │ │ │ ├── custom.sh │ │ │ │ │ ├── README.rst │ │ │ │ │ └── MANIFEST.in │ │ │ │ ├── title.txt │ │ │ │ └── .DS_Store │ │ │ ├── recipe-04 │ │ │ │ ├── title.txt │ │ │ │ ├── cxx-example │ │ │ │ │ ├── menu.yml │ │ │ │ │ └── example.cpp │ │ │ │ └── abstract.md │ │ │ ├── recipe-05 │ │ │ │ ├── title.txt │ │ │ │ ├── cxx-example │ │ │ │ │ └── menu.yml │ │ │ │ └── abstract.md │ │ │ └── .DS_Store │ │ ├── chapter-12 │ │ │ ├── title.txt │ │ │ ├── recipe-01 │ │ │ │ ├── cxx-example │ │ │ │ │ ├── menu.yml │ │ │ │ │ ├── src │ │ │ │ │ │ └── hello-world.cpp │ │ │ │ │ └── docs │ │ │ │ │ │ └── front_page.md │ │ │ │ └── title.txt │ │ │ ├── recipe-02 │ │ │ │ ├── cxx-example │ │ │ │ │ ├── menu.yml │ │ │ │ │ └── src │ │ │ │ │ │ ├── Message.cpp │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ └── hello-world.cpp │ │ │ │ └── title.txt │ │ │ ├── recipe-03 │ │ │ │ ├── cxx-example │ │ │ │ │ ├── menu.yml │ │ │ │ │ ├── src │ │ │ │ │ │ ├── Message.cpp │ │ │ │ │ │ ├── Message.hpp │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ └── hello-world.cpp │ │ │ │ │ └── cmake │ │ │ │ │ │ └── FindSphinx.cmake │ │ │ │ └── title.txt │ │ │ └── .DS_Store │ │ ├── chapter-14 │ │ │ ├── title.txt │ │ │ ├── recipe-01 │ │ │ │ ├── title.txt │ │ │ │ └── cxx-example │ │ │ │ │ ├── menu.yml │ │ │ │ │ ├── src │ │ │ │ │ ├── main.cpp │ │ │ │ │ ├── sum_integers.cpp │ │ │ │ │ └── sum_integers.hpp │ │ │ │ │ ├── tests │ │ │ │ │ └── test_short.cpp │ │ │ │ │ └── CTestConfig.cmake │ │ │ ├── recipe-02 │ │ │ │ ├── title.txt │ │ │ │ └── cxx-example │ │ │ │ │ ├── menu.yml │ │ │ │ │ ├── CTestConfig.cmake │ │ │ │ │ ├── src │ │ │ │ │ ├── main.cpp │ │ │ │ │ └── sum_integers.hpp │ │ │ │ │ └── tests │ │ │ │ │ ├── test_long.cpp │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── test_short.cpp │ │ │ ├── recipe-03 │ │ │ │ ├── fortran-example │ │ │ │ │ ├── dashboard.cmake │ │ │ │ │ ├── CTestConfig.cmake │ │ │ │ │ └── tests │ │ │ │ │ │ └── leaky.f90 │ │ │ │ ├── cxx-example │ │ │ │ │ ├── CTestConfig.cmake │ │ │ │ │ ├── src │ │ │ │ │ │ └── buggy.hpp │ │ │ │ │ └── tests │ │ │ │ │ │ ├── leaky.cpp │ │ │ │ │ │ └── use_after_free.cpp │ │ │ │ ├── title.txt │ │ │ │ └── .DS_Store │ │ │ ├── recipe-04 │ │ │ │ ├── cxx-example │ │ │ │ │ └── CTestConfig.cmake │ │ │ │ └── title.txt │ │ │ └── .DS_Store │ │ ├── .envrc │ │ ├── chapter-02 │ │ │ ├── title.txt │ │ │ ├── recipe-01 │ │ │ │ └── title.txt │ │ │ ├── recipe-02 │ │ │ │ └── title.txt │ │ │ ├── recipe-03 │ │ │ │ ├── title.txt │ │ │ │ ├── abstract.md │ │ │ │ └── .DS_Store │ │ │ ├── recipe-04 │ │ │ │ ├── title.txt │ │ │ │ └── abstract.md │ │ │ ├── recipe-05 │ │ │ │ └── title.txt │ │ │ ├── recipe-06 │ │ │ │ ├── title.txt │ │ │ │ └── abstract.md │ │ │ └── .DS_Store │ │ ├── chapter-04 │ │ │ ├── title.txt │ │ │ ├── recipe-08 │ │ │ │ ├── using-cost-example │ │ │ │ │ ├── test │ │ │ │ │ │ ├── b.py │ │ │ │ │ │ ├── c.py │ │ │ │ │ │ ├── d.py │ │ │ │ │ │ ├── f.py │ │ │ │ │ │ ├── g.py │ │ │ │ │ │ ├── a.py │ │ │ │ │ │ ├── e.py │ │ │ │ │ │ ├── h.py │ │ │ │ │ │ ├── i.py │ │ │ │ │ │ └── j.py │ │ │ │ │ └── menu.yml │ │ │ │ ├── without-cost-example │ │ │ │ │ ├── test │ │ │ │ │ │ ├── b.py │ │ │ │ │ │ ├── c.py │ │ │ │ │ │ ├── d.py │ │ │ │ │ │ ├── f.py │ │ │ │ │ │ ├── g.py │ │ │ │ │ │ ├── a.py │ │ │ │ │ │ ├── e.py │ │ │ │ │ │ ├── h.py │ │ │ │ │ │ ├── i.py │ │ │ │ │ │ └── j.py │ │ │ │ │ └── menu.yml │ │ │ │ ├── title.txt │ │ │ │ └── .DS_Store │ │ │ ├── recipe-10 │ │ │ │ ├── title.txt │ │ │ │ └── example │ │ │ │ │ ├── menu.yml │ │ │ │ │ └── test │ │ │ │ │ ├── cleanup.py │ │ │ │ │ ├── setup.py │ │ │ │ │ ├── feature-a.py │ │ │ │ │ └── feature-b.py │ │ │ ├── recipe-01 │ │ │ │ ├── title.txt │ │ │ │ └── cxx-example │ │ │ │ │ ├── sum_integers.hpp │ │ │ │ │ └── test.sh │ │ │ ├── recipe-06 │ │ │ │ ├── title.txt │ │ │ │ └── example │ │ │ │ │ ├── menu.yml │ │ │ │ │ └── test.py │ │ │ ├── recipe-09 │ │ │ │ ├── example │ │ │ │ │ ├── test │ │ │ │ │ │ ├── benchmark-b.py │ │ │ │ │ │ ├── feature-b.py │ │ │ │ │ │ ├── feature-c.py │ │ │ │ │ │ ├── feature-d.py │ │ │ │ │ │ ├── benchmark-a.py │ │ │ │ │ │ └── feature-a.py │ │ │ │ │ └── menu.yml │ │ │ │ ├── title.txt │ │ │ │ └── abstract.md │ │ │ ├── recipe-02 │ │ │ │ ├── cxx-example │ │ │ │ │ ├── menu.yml │ │ │ │ │ ├── main.cpp │ │ │ │ │ ├── sum_integers.cpp │ │ │ │ │ └── sum_integers.hpp │ │ │ │ └── title.txt │ │ │ ├── recipe-03 │ │ │ │ ├── cxx-example │ │ │ │ │ ├── menu.yml │ │ │ │ │ ├── main.cpp │ │ │ │ │ ├── sum_integers.cpp │ │ │ │ │ └── sum_integers.hpp │ │ │ │ ├── cxx-example-3.5 │ │ │ │ │ ├── menu.yml │ │ │ │ │ ├── test.cpp │ │ │ │ │ ├── main.cpp │ │ │ │ │ ├── sum_integers.cpp │ │ │ │ │ └── sum_integers.hpp │ │ │ │ ├── title.txt │ │ │ │ └── .DS_Store │ │ │ ├── recipe-05 │ │ │ │ ├── cxx-example │ │ │ │ │ ├── menu.yml │ │ │ │ │ ├── leaky_implementation.hpp │ │ │ │ │ └── test.cpp │ │ │ │ └── title.txt │ │ │ ├── recipe-07 │ │ │ │ ├── example │ │ │ │ │ ├── menu.yml │ │ │ │ │ └── test.py │ │ │ │ └── title.txt │ │ │ ├── recipe-04 │ │ │ │ ├── cxx-example │ │ │ │ │ ├── main.cpp │ │ │ │ │ ├── sum_integers.cpp │ │ │ │ │ └── sum_integers.hpp │ │ │ │ ├── title.txt │ │ │ │ └── abstract.md │ │ │ └── .DS_Store │ │ ├── chapter-05 │ │ │ ├── recipe-08 │ │ │ │ ├── title.txt │ │ │ │ ├── c-example-3.5 │ │ │ │ │ ├── test-uuid.c │ │ │ │ │ └── use-uuid.cpp │ │ │ │ └── .DS_Store │ │ │ ├── recipe-07 │ │ │ │ ├── title.txt │ │ │ │ └── cxx-example │ │ │ │ │ ├── menu.yml │ │ │ │ │ ├── ubsan-example.cpp │ │ │ │ │ └── asan-example.cpp │ │ │ ├── recipe-06 │ │ │ │ ├── title.txt │ │ │ │ ├── cxx-example-3.5 │ │ │ │ │ └── taskloop.cpp │ │ │ │ └── .DS_Store │ │ │ ├── title.txt │ │ │ ├── recipe-01 │ │ │ │ ├── title.txt │ │ │ │ ├── cxx-example │ │ │ │ │ ├── linear-algebra.cpp │ │ │ │ │ ├── menu.yml │ │ │ │ │ └── .DS_Store │ │ │ │ └── .DS_Store │ │ │ ├── recipe-02 │ │ │ │ └── title.txt │ │ │ ├── recipe-05 │ │ │ │ └── title.txt │ │ │ ├── recipe-03 │ │ │ │ ├── title.txt │ │ │ │ └── cxx-example │ │ │ │ │ ├── linear-algebra.cpp │ │ │ │ │ ├── README.md │ │ │ │ │ └── wrap_BLAS_LAPACK.tar.gz │ │ │ ├── recipe-04 │ │ │ │ ├── abstract.md │ │ │ │ ├── title.txt │ │ │ │ └── cxx-example │ │ │ │ │ ├── linear-algebra.cpp │ │ │ │ │ ├── deps │ │ │ │ │ └── wrap_BLAS_LAPACK.tar.gz │ │ │ │ │ └── README.md │ │ │ ├── recipe-09 │ │ │ │ ├── title.txt │ │ │ │ ├── .DS_Store │ │ │ │ ├── cxx-example-asan │ │ │ │ │ └── asan-example.cpp │ │ │ │ └── abstract.md │ │ │ └── .DS_Store │ │ ├── chapter-09 │ │ │ ├── title.txt │ │ │ ├── recipe-06 │ │ │ │ ├── cxx-example │ │ │ │ │ └── menu.yml │ │ │ │ ├── fortran-example │ │ │ │ │ └── account │ │ │ │ │ │ ├── test.py │ │ │ │ │ │ └── account.h │ │ │ │ ├── title.txt │ │ │ │ └── .DS_Store │ │ │ ├── recipe-03 │ │ │ │ └── title.txt │ │ │ ├── recipe-05 │ │ │ │ ├── title.txt │ │ │ │ └── cxx-example │ │ │ │ │ └── account │ │ │ │ │ └── test.py │ │ │ ├── recipe-01 │ │ │ │ ├── title.txt │ │ │ │ ├── fortran-c-example │ │ │ │ │ └── src │ │ │ │ │ │ └── utils │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── fortran-cxx-example │ │ │ │ │ └── src │ │ │ │ │ │ └── utils │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── fortran-uuid-example-3.5 │ │ │ │ │ └── src │ │ │ │ │ │ └── utils │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── fortran-uuid-example │ │ │ │ │ └── src │ │ │ │ │ │ └── utils │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── abstract.md │ │ │ │ └── .DS_Store │ │ │ ├── recipe-02 │ │ │ │ ├── title.txt │ │ │ │ └── cxx-example │ │ │ │ │ ├── src │ │ │ │ │ ├── math │ │ │ │ │ │ ├── CxxBLAS.cpp │ │ │ │ │ │ ├── CxxBLAS.hpp │ │ │ │ │ │ ├── CxxLAPACK.cpp │ │ │ │ │ │ └── CxxLAPACK.hpp │ │ │ │ │ └── linear-algebra.cpp │ │ │ │ │ └── README.md │ │ │ ├── recipe-04 │ │ │ │ ├── cxx-example │ │ │ │ │ └── account.cpp │ │ │ │ └── title.txt │ │ │ └── .DS_Store │ │ ├── chapter-01 │ │ │ ├── recipe-02 │ │ │ │ ├── title.txt │ │ │ │ ├── c-example │ │ │ │ │ └── hello-world.c │ │ │ │ ├── cxx-example │ │ │ │ │ └── hello-world.cpp │ │ │ │ ├── fortran-example │ │ │ │ │ └── hello-world.f90 │ │ │ │ └── .DS_Store │ │ │ ├── recipe-06 │ │ │ │ └── title.txt │ │ │ ├── recipe-07 │ │ │ │ └── title.txt │ │ │ ├── recipe-08 │ │ │ │ ├── title.txt │ │ │ │ └── cxx-example │ │ │ │ │ ├── geometry_circle.hpp │ │ │ │ │ ├── geometry_square.hpp │ │ │ │ │ ├── geometry_rhombus.hpp │ │ │ │ │ └── geometry_polygon.hpp │ │ │ ├── title.txt │ │ │ ├── recipe-05 │ │ │ │ ├── title.txt │ │ │ │ └── cxx-example │ │ │ │ │ ├── Message.cpp │ │ │ │ │ ├── Message.hpp │ │ │ │ │ └── hello-world.cpp │ │ │ ├── recipe-10 │ │ │ │ ├── title.txt │ │ │ │ ├── cxx-example │ │ │ │ │ ├── compute-areas.cpp │ │ │ │ │ ├── geometry_circle.cpp │ │ │ │ │ ├── geometry_circle.hpp │ │ │ │ │ ├── geometry_polygon.cpp │ │ │ │ │ ├── geometry_polygon.hpp │ │ │ │ │ ├── geometry_rhombus.cpp │ │ │ │ │ ├── geometry_rhombus.hpp │ │ │ │ │ ├── geometry_square.cpp │ │ │ │ │ ├── geometry_square.hpp │ │ │ │ │ └── menu.yml │ │ │ │ └── abstract.md │ │ │ ├── recipe-09 │ │ │ │ ├── title.txt │ │ │ │ ├── abstract.md │ │ │ │ ├── cxx-example │ │ │ │ │ ├── Cat.cpp │ │ │ │ │ ├── Dog.cpp │ │ │ │ │ └── Animal.cpp │ │ │ │ └── .DS_Store │ │ │ ├── recipe-03 │ │ │ │ ├── cxx-objlib-example │ │ │ │ │ ├── Message.cpp │ │ │ │ │ ├── Message.hpp │ │ │ │ │ └── hello-world.cpp │ │ │ │ ├── title.txt │ │ │ │ └── .DS_Store │ │ │ ├── recipe-04 │ │ │ │ ├── title.txt │ │ │ │ ├── cxx-example │ │ │ │ │ ├── Message.cpp │ │ │ │ │ ├── Message.hpp │ │ │ │ │ └── hello-world.cpp │ │ │ │ └── abstract.md │ │ │ ├── recipe-01 │ │ │ │ ├── title.txt │ │ │ │ └── .DS_Store │ │ │ └── .DS_Store │ │ ├── chapter-03 │ │ │ ├── recipe-07 │ │ │ │ ├── title.txt │ │ │ │ ├── cxx-example-3.5 │ │ │ │ │ ├── linear-algebra.cpp │ │ │ │ │ └── README.md │ │ │ │ ├── cxx-example │ │ │ │ │ └── README.md │ │ │ │ └── .DS_Store │ │ │ ├── recipe-01 │ │ │ │ ├── title.txt │ │ │ │ └── abstract.md │ │ │ ├── recipe-02 │ │ │ │ └── title.txt │ │ │ ├── recipe-08 │ │ │ │ └── title.txt │ │ │ ├── title.txt │ │ │ ├── recipe-03 │ │ │ │ └── title.txt │ │ │ ├── recipe-06 │ │ │ │ ├── c-example-3.5 │ │ │ │ │ └── hello-mpi.c │ │ │ │ ├── title.txt │ │ │ │ └── .DS_Store │ │ │ ├── recipe-09 │ │ │ │ ├── c-example-3.5 │ │ │ │ │ ├── hwclient.c │ │ │ │ │ ├── hwserver.c │ │ │ │ │ └── menu.yml │ │ │ │ ├── title.txt │ │ │ │ └── .DS_Store │ │ │ ├── recipe-05 │ │ │ │ ├── cxx-example-3.5 │ │ │ │ │ ├── example.cpp │ │ │ │ │ └── menu.yml │ │ │ │ ├── title.txt │ │ │ │ ├── fortran-example-3.5 │ │ │ │ │ └── example.f90 │ │ │ │ ├── cxx-example │ │ │ │ │ └── menu.yml │ │ │ │ └── .DS_Store │ │ │ ├── recipe-10 │ │ │ │ ├── c-example │ │ │ │ │ ├── hwclient.c │ │ │ │ │ ├── hwserver.c │ │ │ │ │ └── menu.yml │ │ │ │ ├── title.txt │ │ │ │ └── abstract.md │ │ │ ├── recipe-04 │ │ │ │ └── title.txt │ │ │ └── .DS_Store │ │ ├── chapter-13 │ │ │ ├── recipe-01 │ │ │ │ └── title.txt │ │ │ ├── title.txt │ │ │ ├── recipe-02 │ │ │ │ ├── cxx-example │ │ │ │ │ └── example.cpp │ │ │ │ ├── title.txt │ │ │ │ ├── fortran-example │ │ │ │ │ └── example.f90 │ │ │ │ ├── .DS_Store │ │ │ │ └── abstract.md │ │ │ └── .DS_Store │ │ ├── .style.yapf │ │ ├── .gitattributes │ │ ├── requirements.txt │ │ ├── .DS_Store │ │ ├── .mailmap │ │ └── testing │ │ │ ├── .DS_Store │ │ │ └── dependencies │ │ │ └── .DS_Store │ └── .DS_Store ├── 2020~通过例子学习 CMake │ ├── codes │ │ ├── qt │ │ │ └── README.md │ │ ├── .DS_Store │ │ └── dcmtk │ │ │ └── .DS_Store │ ├── .DS_Store │ └── 02~sub-projects │ │ ├── README.adoc │ │ └── A-basic │ │ ├── sublibrary1 │ │ ├── include │ │ │ └── sublib1 │ │ │ │ └── sublib1.h │ │ └── src │ │ │ └── sublib1.cpp │ │ └── CMakeLists.txt ├── 2021~BrightXiaoHan~CMake 中文实战教程 │ ├── 02.引入外部项目的几种方式 │ │ ├── codes │ │ │ └── spdlog │ │ │ │ └── .gitkeep │ │ └── .DS_Store │ ├── _config.yml │ ├── .DS_Store │ ├── 01~find_package 的使用指南 │ │ ├── codes │ │ │ └── ModuleMode │ │ │ │ ├── libadd.h │ │ │ │ └── libadd.cc │ │ └── .DS_Store │ ├── 03.安装 │ │ ├── .DS_Store │ │ └── codes │ │ │ ├── include │ │ │ └── mymath.h │ │ │ ├── mymath.cc │ │ │ └── test_folder │ │ │ └── CMakeLists.txt │ ├── .gitmodules │ ├── 05~编写 CUDA 应用程序 │ │ ├── .DS_Store │ │ └── codes │ │ │ └── imgs │ │ │ └── cmake_cuda_support.png │ ├── 04.使用包管理工具管理你的依赖库 │ │ └── .DS_Store │ └── 06.编写 Python 的 C 或 C++ 扩展 │ │ ├── .DS_Store │ │ └── examples │ │ └── stub.cc ├── 2022~cmake-examples │ ├── codes │ │ ├── .gitattributes │ │ ├── .gitignore │ │ └── examples │ │ │ ├── more │ │ │ ├── components │ │ │ │ ├── application │ │ │ │ │ ├── build.bat │ │ │ │ │ └── configure.bat │ │ │ │ └── library │ │ │ │ │ ├── build.bat │ │ │ │ │ ├── hey │ │ │ │ │ ├── include │ │ │ │ │ │ └── hey.h │ │ │ │ │ └── hey.cpp │ │ │ │ │ ├── hello │ │ │ │ │ ├── include │ │ │ │ │ │ └── hello.h │ │ │ │ │ └── hello.cpp │ │ │ │ │ ├── configure.bat │ │ │ │ │ ├── goodbye │ │ │ │ │ ├── include │ │ │ │ │ │ └── goodbye.h │ │ │ │ │ └── goodbye.cpp │ │ │ │ │ └── phrases-config.cmake.in │ │ │ ├── header-only-defines │ │ │ │ ├── library │ │ │ │ │ ├── install.bat │ │ │ │ │ ├── install.sh │ │ │ │ │ ├── configure.bat │ │ │ │ │ └── configure.sh │ │ │ │ └── application │ │ │ │ │ ├── build.bat │ │ │ │ │ ├── build.sh │ │ │ │ │ └── main.cpp │ │ │ ├── fetch-content │ │ │ │ ├── build.bat │ │ │ │ ├── build.sh │ │ │ │ ├── configure.bat │ │ │ │ └── configure.sh │ │ │ ├── superbuild │ │ │ │ ├── build.bat │ │ │ │ ├── build.sh │ │ │ │ ├── configure.bat │ │ │ │ └── configure.sh │ │ │ ├── external-project-add │ │ │ │ ├── build.bat │ │ │ │ └── build.sh │ │ │ ├── static-versioned │ │ │ │ ├── application-1.0.0 │ │ │ │ │ ├── build.bat │ │ │ │ │ └── build.sh │ │ │ │ ├── application-2.0.0 │ │ │ │ │ ├── build.bat │ │ │ │ │ └── build.sh │ │ │ │ ├── library-1.0.0 │ │ │ │ │ ├── install.bat │ │ │ │ │ ├── install.sh │ │ │ │ │ └── include │ │ │ │ │ │ └── useless │ │ │ │ │ │ ├── writer.h │ │ │ │ │ │ └── calculator.h │ │ │ │ └── library-2.0.0 │ │ │ │ │ ├── install.bat │ │ │ │ │ ├── install.sh │ │ │ │ │ └── include │ │ │ │ │ └── useless │ │ │ │ │ ├── writer.h │ │ │ │ │ └── calculator.h │ │ │ ├── nested-dependencies │ │ │ │ ├── application │ │ │ │ │ ├── configure-build.bat │ │ │ │ │ └── configure-build.sh │ │ │ │ └── library │ │ │ │ │ └── lib-b │ │ │ │ │ ├── configure-build-install.bat │ │ │ │ │ ├── configure-build-install.sh │ │ │ │ │ └── lib-b-config.cmake.in │ │ │ └── static-auto-install │ │ │ │ └── application │ │ │ │ └── main.cpp │ │ │ ├── core │ │ │ ├── header-only │ │ │ │ ├── library │ │ │ │ │ ├── install.bat │ │ │ │ │ ├── install.sh │ │ │ │ │ ├── configure.bat │ │ │ │ │ └── configure.sh │ │ │ │ └── application │ │ │ │ │ ├── build.bat │ │ │ │ │ ├── build.sh │ │ │ │ │ └── main.cpp │ │ │ ├── shared │ │ │ │ ├── application │ │ │ │ │ ├── build.bat │ │ │ │ │ ├── build.sh │ │ │ │ │ └── main.cpp │ │ │ │ └── library │ │ │ │ │ ├── install.bat │ │ │ │ │ └── install.sh │ │ │ ├── static │ │ │ │ ├── application │ │ │ │ │ ├── build.bat │ │ │ │ │ ├── build.sh │ │ │ │ │ └── main.cpp │ │ │ │ └── library │ │ │ │ │ ├── install.bat │ │ │ │ │ └── install.sh │ │ │ └── shared-export │ │ │ │ ├── application │ │ │ │ ├── build.bat │ │ │ │ └── build.sh │ │ │ │ └── library │ │ │ │ ├── install.bat │ │ │ │ └── install.sh │ │ │ └── .DS_Store │ └── .DS_Store ├── 2020~CMake 实践应用专题 │ └── README.md ├── 2019~ttroy50~cmake-examples │ └── codes │ │ ├── 01-basic │ │ ├── B-hello-headers │ │ │ ├── .idea │ │ │ │ ├── .name │ │ │ │ ├── B-hello-headers.iml │ │ │ │ └── misc.xml │ │ │ ├── cmake-build-debug │ │ │ │ ├── .cmake │ │ │ │ │ └── api │ │ │ │ │ │ └── v1 │ │ │ │ │ │ └── query │ │ │ │ │ │ ├── cache-v2 │ │ │ │ │ │ ├── cmakeFiles-v1 │ │ │ │ │ │ ├── codemodel-v2 │ │ │ │ │ │ └── toolchains-v1 │ │ │ │ ├── .ninja_deps │ │ │ │ └── hello_headers │ │ │ ├── src │ │ │ │ ├── main.cpp │ │ │ │ └── Hello.cpp │ │ │ └── include │ │ │ │ └── Hello.h │ │ ├── E-installing │ │ │ ├── cmake-examples.conf │ │ │ ├── src │ │ │ │ ├── main.cpp │ │ │ │ └── Hello.cpp │ │ │ └── include │ │ │ │ └── installing │ │ │ │ └── Hello.h │ │ ├── A-hello-cmake │ │ │ └── main.cpp │ │ ├── C-static-library │ │ │ ├── src │ │ │ │ ├── main.cpp │ │ │ │ └── Hello.cpp │ │ │ └── include │ │ │ │ └── static │ │ │ │ └── Hello.h │ │ ├── D-shared-library │ │ │ ├── src │ │ │ │ ├── main.cpp │ │ │ │ └── Hello.cpp │ │ │ └── include │ │ │ │ └── shared │ │ │ │ └── Hello.h │ │ ├── F-build-type │ │ │ ├── main.cpp │ │ │ └── cmake-gui-build-type.png │ │ ├── I-compiling-with-clang │ │ │ └── main.cpp │ │ ├── J-building-with-ninja │ │ │ └── main.cpp │ │ └── L-cpp-standard │ │ │ ├── i-common-method │ │ │ └── main.cpp │ │ │ ├── ii-cxx-standard │ │ │ └── main.cpp │ │ │ └── iii-compile-features │ │ │ └── main.cpp │ │ ├── 04-static-analysis │ │ ├── cppcheck-compile-commands │ │ │ ├── .cppcheck_suppressions │ │ │ ├── run_test.sh │ │ │ ├── subproject1 │ │ │ │ ├── main1.cpp │ │ │ │ └── CMakeLists.txt │ │ │ └── subproject2 │ │ │ │ └── CMakeLists.txt │ │ ├── cppcheck │ │ │ ├── run_test.sh │ │ │ ├── subproject1 │ │ │ │ └── main1.cpp │ │ │ └── subproject2 │ │ │ │ └── main2.cpp │ │ ├── clang-analyzer │ │ │ ├── run_test.sh │ │ │ ├── subproject1 │ │ │ │ ├── main1.cpp │ │ │ │ └── CMakeLists.txt │ │ │ └── subproject2 │ │ │ │ └── CMakeLists.txt │ │ └── clang-format │ │ │ ├── subproject1 │ │ │ ├── main1.cpp │ │ │ └── CMakeLists.txt │ │ │ └── subproject2 │ │ │ └── CMakeLists.txt │ │ ├── 05-unit-testing │ │ ├── boost │ │ │ └── post_test.sh │ │ ├── catch2-vendored │ │ │ └── post_test.sh │ │ └── google-test-download │ │ │ ├── run_test.sh │ │ │ └── post_test.sh │ │ ├── 06-installer │ │ └── deb │ │ │ ├── post_test.sh │ │ │ ├── cmake-examples.conf │ │ │ ├── src │ │ │ ├── main.cpp │ │ │ └── Hello.cpp │ │ │ └── include │ │ │ └── Hello.h │ │ ├── cmake-examples.sublime-project │ │ ├── 07-package-management │ │ └── D-conan │ │ │ ├── i-basic │ │ │ └── conanfile.txt │ │ │ └── ii-basic-targets │ │ │ └── conanfile.txt │ │ └── 02-sub-projects │ │ └── A-basic │ │ ├── sublibrary1 │ │ ├── include │ │ │ └── sublib1 │ │ │ │ └── sublib1.h │ │ └── src │ │ │ └── sublib1.cpp │ │ └── CMakeLists.txt ├── 2023-CMakeLists 模板系统 │ └── codes │ │ ├── CMakeLists-5-Test │ │ ├── inc │ │ │ ├── add.h │ │ │ └── mul.h │ │ ├── libsrc │ │ │ ├── add.cpp │ │ │ └── mul.cpp │ │ ├── .DS_Store │ │ ├── run.sh │ │ └── src │ │ │ └── main.cpp │ │ ├── CMakeLists-7-Test │ │ ├── source │ │ │ ├── add │ │ │ │ ├── add.h │ │ │ │ ├── add3.h │ │ │ │ ├── add.cpp │ │ │ │ └── add3.cpp │ │ │ ├── mul │ │ │ │ ├── mul.h │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── mul.cpp │ │ │ ├── sub │ │ │ │ ├── sub.h │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── sub.cpp │ │ │ └── .DS_Store │ │ ├── .DS_Store │ │ └── run.sh │ │ ├── CMakeLists-8-Test │ │ ├── source │ │ │ ├── add │ │ │ │ ├── add.h │ │ │ │ ├── add3.h │ │ │ │ ├── add.cpp │ │ │ │ └── add3.cpp │ │ │ ├── mul │ │ │ │ ├── mul.h │ │ │ │ └── mul.cpp │ │ │ ├── sub │ │ │ │ ├── sub.h │ │ │ │ └── sub.cpp │ │ │ └── .DS_Store │ │ ├── .DS_Store │ │ └── run.sh │ │ ├── CMakeLists-6-Test │ │ ├── sub │ │ │ ├── add.h │ │ │ ├── CMakeLists.txt │ │ │ └── add.cpp │ │ ├── run.sh │ │ ├── README.md │ │ └── main.cpp │ │ ├── CMakeLists-3-Test │ │ ├── src │ │ │ └── count.cpp │ │ ├── include │ │ │ └── count.h │ │ └── .DS_Store │ │ ├── CMakeLists-1-Test │ │ └── test01.h │ │ └── CMakeLists-4-Test │ │ ├── include │ │ └── test04.h │ │ └── .DS_Store ├── .DS_Store └── 2022~《An Introduction to Modern CMake》~中文版 │ ├── codes │ ├── extended-project │ │ ├── .gitignore │ │ ├── cmake │ │ │ └── FindSomeLib.cmake │ │ └── apps │ │ │ └── CMakeLists.txt │ ├── simple-project │ │ ├── simple_lib.hpp │ │ └── simple_lib.cpp │ ├── root-dict │ │ └── DictExample.cxx │ ├── root-simple │ │ └── SimpleExample.cxx │ └── root-usefile │ │ └── SimpleExample.cxx │ ├── 08~查找库(或包) │ └── README.md │ └── 04~包含子项目 │ └── README.md ├── .DS_Store ├── .gitattributes └── 88~最佳实践 └── 99~参考资料 └── 2024~Effective Modern CMake.md /.nojekyll: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /02~项目构建/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /04~测试/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /10~XMake/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /03~外部库和程序/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /01~基本语法/CMake 快速开始/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /05~安装与发布/README.md: -------------------------------------------------------------------------------- 1 | # 安装与发布 2 | -------------------------------------------------------------------------------- /99~参考资料/2016~全网最细的 CMake 教程/codes/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | -------------------------------------------------------------------------------- /99~参考资料/2018~cmake-project-template/codes/test/lib/.git-keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /99~参考资料/2018~cmake-project-template/codes/test/.git-keep: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/02~检测环境/2.1~检测操作系统.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /99~参考资料/2020~通过例子学习 CMake/codes/qt/README.md: -------------------------------------------------------------------------------- 1 | # reconstruction 2 | -------------------------------------------------------------------------------- /99~参考资料/2021~BrightXiaoHan~CMake 中文实战教程/02.引入外部项目的几种方式/codes/spdlog/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /99~参考资料/2021~BrightXiaoHan~CMake 中文实战教程/_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/.gitattributes: -------------------------------------------------------------------------------- 1 | * linguist-documentation=false -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | install/ 3 | .vscode/ -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2016~全网最细的 CMake 教程/codes/Demo4/config.h.in: -------------------------------------------------------------------------------- 1 | #cmakedefine USE_MYMATH 2 | -------------------------------------------------------------------------------- /99~参考资料/2016~全网最细的 CMake 教程/codes/Demo5/config.h.in: -------------------------------------------------------------------------------- 1 | #cmakedefine USE_MYMATH 2 | -------------------------------------------------------------------------------- /99~参考资料/2018~cmake-project-template/codes/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Project exclude paths 2 | /. -------------------------------------------------------------------------------- /99~参考资料/2020~CMake 实践应用专题/README.md: -------------------------------------------------------------------------------- 1 | > [原文地址](https://zhuanlan.zhihu.com/p/367808125) 2 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/B-hello-headers/.idea/.name: -------------------------------------------------------------------------------- 1 | hello_headers -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-5-Test/inc/add.h: -------------------------------------------------------------------------------- 1 | int add(int a, int b); 2 | -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-5-Test/inc/mul.h: -------------------------------------------------------------------------------- 1 | int mul(int a, int b); 2 | -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-7-Test/source/add/add.h: -------------------------------------------------------------------------------- 1 | int add(int x, int y); -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-7-Test/source/mul/mul.h: -------------------------------------------------------------------------------- 1 | int mul(int x, int y); -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-7-Test/source/sub/sub.h: -------------------------------------------------------------------------------- 1 | int sub(int x, int y); -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-8-Test/source/add/add.h: -------------------------------------------------------------------------------- 1 | int add(int x, int y); -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-8-Test/source/mul/mul.h: -------------------------------------------------------------------------------- 1 | int mul(int x, int y); -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-8-Test/source/sub/sub.h: -------------------------------------------------------------------------------- 1 | int sub(int x, int y); -------------------------------------------------------------------------------- /01~基本语法/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/01~基本语法/.DS_Store -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/cpm/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /99~参考资料/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-06/title.txt: -------------------------------------------------------------------------------- 1 | Generating Source Code 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/title.txt: -------------------------------------------------------------------------------- 1 | Structuring Projects 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/title.txt: -------------------------------------------------------------------------------- 1 | The Superbuild Pattern 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-10/title.txt: -------------------------------------------------------------------------------- 1 | Writing an Installer 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/title.txt: -------------------------------------------------------------------------------- 1 | Packaging Projects 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-12/title.txt: -------------------------------------------------------------------------------- 1 | Building Documentation 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/title.txt: -------------------------------------------------------------------------------- 1 | Testing Dashboards 2 | -------------------------------------------------------------------------------- /99~参考资料/2022~《An Introduction to Modern CMake》~中文版/codes/extended-project/.gitignore: -------------------------------------------------------------------------------- 1 | *build* 2 | -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/find_package/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/subdirectory/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/xlog/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/.envrc: -------------------------------------------------------------------------------- 1 | use nix '' -A env.cmake-cookbook 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-02/title.txt: -------------------------------------------------------------------------------- 1 | Detecting the Environment 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/title.txt: -------------------------------------------------------------------------------- 1 | Creating and Running Tests 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-08/title.txt: -------------------------------------------------------------------------------- 1 | Probing execution 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/title.txt: -------------------------------------------------------------------------------- 1 | Mixed-language Projects 2 | -------------------------------------------------------------------------------- /99~参考资料/2022~《An Introduction to Modern CMake》~中文版/codes/extended-project/cmake/FindSomeLib.cmake: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-7-Test/source/add/add3.h: -------------------------------------------------------------------------------- 1 | int add(int x, int y, int z); -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-8-Test/source/add/add3.h: -------------------------------------------------------------------------------- 1 | int add(int x, int y, int z); -------------------------------------------------------------------------------- /01~基本语法/CMake 变量/99~参考资料/2018~CMake 两种变量原理.md: -------------------------------------------------------------------------------- 1 | > [原文地址](https://www.cnblogs.com/ncuneugcj/p/9756324.html) 2 | -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/fetch_content/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/multi_cmakelists/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-02/title.txt: -------------------------------------------------------------------------------- 1 | Switching generators 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-08/using-cost-example/test/b.py: -------------------------------------------------------------------------------- 1 | a.py -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-08/using-cost-example/test/c.py: -------------------------------------------------------------------------------- 1 | a.py -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-08/using-cost-example/test/d.py: -------------------------------------------------------------------------------- 1 | a.py -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-08/using-cost-example/test/f.py: -------------------------------------------------------------------------------- 1 | e.py -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-08/using-cost-example/test/g.py: -------------------------------------------------------------------------------- 1 | e.py -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-08/without-cost-example/test/b.py: -------------------------------------------------------------------------------- 1 | a.py -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-08/without-cost-example/test/c.py: -------------------------------------------------------------------------------- 1 | a.py -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-08/without-cost-example/test/d.py: -------------------------------------------------------------------------------- 1 | a.py -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-08/without-cost-example/test/f.py: -------------------------------------------------------------------------------- 1 | e.py -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-08/without-cost-example/test/g.py: -------------------------------------------------------------------------------- 1 | e.py -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-10/title.txt: -------------------------------------------------------------------------------- 1 | Using test fixtures 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-07/title.txt: -------------------------------------------------------------------------------- 1 | Probing compiler flags 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-06/recipe-05/cxx-example/VERSION: -------------------------------------------------------------------------------- 1 | 2.0.1-rc-2 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-10/recipe-03/title.txt: -------------------------------------------------------------------------------- 1 | Exporting your targets 2 | -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/includes_full_code/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/xlog/nativelib/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/B-hello-headers/cmake-build-debug/.cmake/api/v1/query/cache-v2: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/04-static-analysis/cppcheck-compile-commands/.cppcheck_suppressions: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/05-unit-testing/boost/post_test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | make test 4 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/06-installer/deb/post_test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | make package 4 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-06/title.txt: -------------------------------------------------------------------------------- 1 | Specifying the compiler 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-07/title.txt: -------------------------------------------------------------------------------- 1 | Switching the build type 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-08/title.txt: -------------------------------------------------------------------------------- 1 | Controlling compiler flags 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/title.txt: -------------------------------------------------------------------------------- 1 | From a Simple Executable to Libraries 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-07/title.txt: -------------------------------------------------------------------------------- 1 | Detecting the Eigen library 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-01/title.txt: -------------------------------------------------------------------------------- 1 | Creating a simple unit test 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-06/title.txt: -------------------------------------------------------------------------------- 1 | Testing expected failures 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-08/title.txt: -------------------------------------------------------------------------------- 1 | Running tests in parallel 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-09/example/test/benchmark-b.py: -------------------------------------------------------------------------------- 1 | benchmark-a.py -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-09/example/test/feature-b.py: -------------------------------------------------------------------------------- 1 | feature-a.py -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-09/example/test/feature-c.py: -------------------------------------------------------------------------------- 1 | feature-a.py -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-09/example/test/feature-d.py: -------------------------------------------------------------------------------- 1 | benchmark-a.py -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-09/title.txt: -------------------------------------------------------------------------------- 1 | Running a subset of tests 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-09/title.txt: -------------------------------------------------------------------------------- 1 | Organizing Fortran projects 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-10/recipe-01/title.txt: -------------------------------------------------------------------------------- 1 | Installing your project 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-10/recipe-02/title.txt: -------------------------------------------------------------------------------- 1 | Generating export headers 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-10/recipe-04/title.txt: -------------------------------------------------------------------------------- 1 | Installing a superbuild 2 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/B-hello-headers/cmake-build-debug/.cmake/api/v1/query/cmakeFiles-v1: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/B-hello-headers/cmake-build-debug/.cmake/api/v1/query/codemodel-v2: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/B-hello-headers/cmake-build-debug/.cmake/api/v1/query/toolchains-v1: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-05/title.txt: -------------------------------------------------------------------------------- 1 | Presenting options to the user 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-10/title.txt: -------------------------------------------------------------------------------- 1 | Using control flow constructs 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-02/recipe-01/title.txt: -------------------------------------------------------------------------------- 1 | Discovering the operating system 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-01/title.txt: -------------------------------------------------------------------------------- 1 | Detecting the Python interpreter 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-02/title.txt: -------------------------------------------------------------------------------- 1 | Detecting the Python library 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-08/title.txt: -------------------------------------------------------------------------------- 1 | Detecting the Boost libraries 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/title.txt: -------------------------------------------------------------------------------- 1 | Detecting External Libraries and Programs 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-02/cxx-example/menu.yml: -------------------------------------------------------------------------------- 1 | targets: 2 | - test 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-03/cxx-example/menu.yml: -------------------------------------------------------------------------------- 1 | targets: 2 | - test 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-05/cxx-example/menu.yml: -------------------------------------------------------------------------------- 1 | targets: 2 | - test 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-06/example/menu.yml: -------------------------------------------------------------------------------- 1 | targets: 2 | - test 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-07/example/menu.yml: -------------------------------------------------------------------------------- 1 | targets: 2 | - test 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-07/title.txt: -------------------------------------------------------------------------------- 1 | Using timeouts for long tests 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-09/example/menu.yml: -------------------------------------------------------------------------------- 1 | targets: 2 | - test 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-10/example/menu.yml: -------------------------------------------------------------------------------- 1 | targets: 2 | - test 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-06/title.txt: -------------------------------------------------------------------------------- 1 | Probing compilation and linking 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/title.txt: -------------------------------------------------------------------------------- 1 | Configure-time and Build-time Operations 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-01/cxx-example/menu.yml: -------------------------------------------------------------------------------- 1 | targets: 2 | - test 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-04/cxx-example/menu.yml: -------------------------------------------------------------------------------- 1 | targets: 2 | - test 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-05/title.txt: -------------------------------------------------------------------------------- 1 | Redefining functions and macros 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-07/cxx-example/menu.yml: -------------------------------------------------------------------------------- 1 | targets: 2 | - test 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-08/cxx-example/menu.yml: -------------------------------------------------------------------------------- 1 | targets: 2 | - test 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/recipe-01/title.txt: -------------------------------------------------------------------------------- 1 | Using the superbuild pattern 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/recipe-04/cxx-example/menu.yml: -------------------------------------------------------------------------------- 1 | targets: 2 | - test 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/recipe-06/cxx-example/menu.yml: -------------------------------------------------------------------------------- 1 | targets: 2 | - test 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-12/recipe-01/cxx-example/menu.yml: -------------------------------------------------------------------------------- 1 | targets: 2 | - docs 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-12/recipe-02/cxx-example/menu.yml: -------------------------------------------------------------------------------- 1 | targets: 2 | - docs 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-12/recipe-03/cxx-example/menu.yml: -------------------------------------------------------------------------------- 1 | targets: 2 | - docs 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-12/recipe-03/title.txt: -------------------------------------------------------------------------------- 1 | Combining Doxygen and Sphinx 2 | -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-6-Test/sub/add.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void add(int a, int b); -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/05-unit-testing/catch2-vendored/post_test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | make test 4 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-09/title.txt: -------------------------------------------------------------------------------- 1 | Setting the standard for the language 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-03/title.txt: -------------------------------------------------------------------------------- 1 | Detecting Python modules and packages 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-06/c-example-3.5/hello-mpi.c: -------------------------------------------------------------------------------- 1 | ../c-example/hello-mpi.c -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-09/c-example-3.5/hwclient.c: -------------------------------------------------------------------------------- 1 | ../c-example/hwclient.c -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-09/c-example-3.5/hwserver.c: -------------------------------------------------------------------------------- 1 | ../c-example/hwserver.c -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-03/cxx-example-3.5/menu.yml: -------------------------------------------------------------------------------- 1 | targets: 2 | - test 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-03/cxx-example-3.5/test.cpp: -------------------------------------------------------------------------------- 1 | ../cxx-example/test.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-08/c-example-3.5/test-uuid.c: -------------------------------------------------------------------------------- 1 | ../c-example/test-uuid.c -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-08/c-example-3.5/use-uuid.cpp: -------------------------------------------------------------------------------- 1 | ../c-example/use-uuid.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-06/recipe-01/title.txt: -------------------------------------------------------------------------------- 1 | Generating sources at configure time 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-06/recipe-07/title.txt: -------------------------------------------------------------------------------- 1 | Recording the Git hash at build time 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-01/title.txt: -------------------------------------------------------------------------------- 1 | Code reuse with functions and macros 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-02/title.txt: -------------------------------------------------------------------------------- 1 | Splitting CMake sources into modules 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/recipe-04/cxx-example-3.5/menu.yml: -------------------------------------------------------------------------------- 1 | targets: 2 | - test 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/recipe-05/title.txt: -------------------------------------------------------------------------------- 1 | Managing your project as a superbuild 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-01/title.txt: -------------------------------------------------------------------------------- 1 | Generating source and binary packages 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-12/recipe-01/title.txt: -------------------------------------------------------------------------------- 1 | Building documentation using Doxygen 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-12/recipe-02/title.txt: -------------------------------------------------------------------------------- 1 | Building documentation using Sphinx 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-13/recipe-01/title.txt: -------------------------------------------------------------------------------- 1 | Cross-compiling a hello world example 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-13/title.txt: -------------------------------------------------------------------------------- 1 | Alternative Generators and Cross-compilation 2 | -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/xlog/nativelib/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | src/main/jniLibs -------------------------------------------------------------------------------- /99~参考资料/2016~全网最细的 CMake 教程/codes/Demo6/config.h.in: -------------------------------------------------------------------------------- 1 | // does the platform provide pow function? 2 | #cmakedefine HAVE_POW 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-03/cxx-objlib-example/Message.cpp: -------------------------------------------------------------------------------- 1 | ../cxx-example/Message.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-03/cxx-objlib-example/Message.hpp: -------------------------------------------------------------------------------- 1 | ../cxx-example/Message.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-04/title.txt: -------------------------------------------------------------------------------- 1 | Controlling compilation with conditionals 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-05/cxx-example-3.5/example.cpp: -------------------------------------------------------------------------------- 1 | ../cxx-example/example.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-05/title.txt: -------------------------------------------------------------------------------- 1 | Detecting the OpenMP parallel environment 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-06/title.txt: -------------------------------------------------------------------------------- 1 | Detecting the MPI parallel environment 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-10/c-example/hwclient.c: -------------------------------------------------------------------------------- 1 | ../../recipe-09/c-example/hwclient.c -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-10/c-example/hwserver.c: -------------------------------------------------------------------------------- 1 | ../../recipe-09/c-example/hwserver.c -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-02/cxx-example/main.cpp: -------------------------------------------------------------------------------- 1 | ../../recipe-01/cxx-example/main.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-03/cxx-example/main.cpp: -------------------------------------------------------------------------------- 1 | ../../recipe-01/cxx-example/main.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-04/cxx-example/main.cpp: -------------------------------------------------------------------------------- 1 | ../../recipe-01/cxx-example/main.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-08/using-cost-example/menu.yml: -------------------------------------------------------------------------------- 1 | targets: 2 | - test 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-08/without-cost-example/menu.yml: -------------------------------------------------------------------------------- 1 | targets: 2 | - test 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-01/title.txt: -------------------------------------------------------------------------------- 1 | Using platform-independent file operations 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-02/title.txt: -------------------------------------------------------------------------------- 1 | Running a custom command at configure time 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-06/cxx-example-3.5/taskloop.cpp: -------------------------------------------------------------------------------- 1 | ../cxx-example/taskloop.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-06/recipe-05/title.txt: -------------------------------------------------------------------------------- 1 | Recording the project version from a file 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-06/recipe-06/title.txt: -------------------------------------------------------------------------------- 1 | Recording the Git hash at configure time 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-07/title.txt: -------------------------------------------------------------------------------- 1 | Limiting scope with `add_subdirectory` 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-02/cxx-example/account/version.py: -------------------------------------------------------------------------------- 1 | __version__ = '0.0.0' 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-03/cxx-example/account/version.py: -------------------------------------------------------------------------------- 1 | __version__ = '0.0.0' 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/recipe-01/title.txt: -------------------------------------------------------------------------------- 1 | Deploying tests to the CDash dashboard 2 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/components/application/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cmake --build build/ 4 | -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/cpm/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /cmake-build-debug 3 | .idea -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-02/recipe-02/title.txt: -------------------------------------------------------------------------------- 1 | Dealing with platform-dependent source code 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-02/recipe-03/title.txt: -------------------------------------------------------------------------------- 1 | Dealing with compiler-dependent source code 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-02/recipe-04/title.txt: -------------------------------------------------------------------------------- 1 | Discovering the host processor architecture 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-02/recipe-05/title.txt: -------------------------------------------------------------------------------- 1 | Discovering the host processor instruction set 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-02/recipe-06/title.txt: -------------------------------------------------------------------------------- 1 | Enabling vectorization for the Eigen library 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-04/title.txt: -------------------------------------------------------------------------------- 1 | Detecting the BLAS and LAPACK math libraries 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-05/fortran-example-3.5/example.f90: -------------------------------------------------------------------------------- 1 | ../fortran-example/example.f90 -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-02/title.txt: -------------------------------------------------------------------------------- 1 | Defining a unit test using the Catch2 library 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-03/cxx-example-3.5/main.cpp: -------------------------------------------------------------------------------- 1 | ../../recipe-01/cxx-example/main.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-05/title.txt: -------------------------------------------------------------------------------- 1 | Using dynamic analysis to detect memory defects 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-06/title.txt: -------------------------------------------------------------------------------- 1 | Deprecating functions, macros, and variables 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/recipe-03/title.txt: -------------------------------------------------------------------------------- 1 | Building C++ and Python projects using Cython 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/recipe-05/title.txt: -------------------------------------------------------------------------------- 1 | Building C++ and Python projects using pybind11 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-03/cxx-example/custom.sh: -------------------------------------------------------------------------------- 1 | ../../recipe-02/cxx-example/custom.sh -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-03/fortran-example/account/version.py: -------------------------------------------------------------------------------- 1 | __version__ = '0.0.0' 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-04/title.txt: -------------------------------------------------------------------------------- 1 | Distributing a simple project as Conda package 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/recipe-02/title.txt: -------------------------------------------------------------------------------- 1 | Reporting test coverage to the CDash dashboard 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/recipe-03/fortran-example/dashboard.cmake: -------------------------------------------------------------------------------- 1 | ../cxx-example/dashboard.cmake -------------------------------------------------------------------------------- /99~参考资料/2020~通过例子学习 CMake/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~通过例子学习 CMake/.DS_Store -------------------------------------------------------------------------------- /01~基本语法/CMake 快速开始/CMake 简单示例.md: -------------------------------------------------------------------------------- 1 | # CMake 简单示例 2 | 3 | # Links 4 | 5 | - https://blog.csdn.net/qq_40837929/article/details/122419649 6 | -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | cmake-build-debug 3 | build 4 | .idea -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/06-installer/deb/cmake-examples.conf: -------------------------------------------------------------------------------- 1 | # Sample configuration file that could be installed 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/.style.yapf: -------------------------------------------------------------------------------- 1 | [style] 2 | COLUMN_LIMIT = 80 3 | INDENT_WIDTH = 4 4 | USE_TABS = False 5 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-01/title.txt: -------------------------------------------------------------------------------- 1 | Compiling a single source file into an executable 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-02/c-example/hello-world.c: -------------------------------------------------------------------------------- 1 | ../../recipe-01/c-example/hello-world.c -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-03/cxx-objlib-example/hello-world.cpp: -------------------------------------------------------------------------------- 1 | ../cxx-example/hello-world.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-03/title.txt: -------------------------------------------------------------------------------- 1 | Building and linking static and shared libraries 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-04/cxx-example/Message.cpp: -------------------------------------------------------------------------------- 1 | ../../recipe-03/cxx-example/Message.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-04/cxx-example/Message.hpp: -------------------------------------------------------------------------------- 1 | ../../recipe-03/cxx-example/Message.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-05/cxx-example/Message.cpp: -------------------------------------------------------------------------------- 1 | ../../recipe-03/cxx-example/Message.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-05/cxx-example/Message.hpp: -------------------------------------------------------------------------------- 1 | ../../recipe-03/cxx-example/Message.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-09/title.txt: -------------------------------------------------------------------------------- 1 | Detecting external libraries: I. Using `pkg-config` 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-03/title.txt: -------------------------------------------------------------------------------- 1 | Defining a unit test and linking against Google Test 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-04/title.txt: -------------------------------------------------------------------------------- 1 | Defining a unit test and linking against Boost test 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-06/recipe-03/title.txt: -------------------------------------------------------------------------------- 1 | Generating source code at build time using Python 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-03/title.txt: -------------------------------------------------------------------------------- 1 | Writing a function to test and set compiler flags 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-04/title.txt: -------------------------------------------------------------------------------- 1 | Defining a function or macro with named arguments 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-08/title.txt: -------------------------------------------------------------------------------- 1 | Avoiding global variables using `target_sources` 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/recipe-01/title.txt: -------------------------------------------------------------------------------- 1 | Building Fortran projects that use C/C++ libraries 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/recipe-02/title.txt: -------------------------------------------------------------------------------- 1 | Building C/C++ projects that use Fortran libraries 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/recipe-04/cxx-example/account.cpp: -------------------------------------------------------------------------------- 1 | ../../recipe-03/cxx-example/account.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/recipe-04/title.txt: -------------------------------------------------------------------------------- 1 | Building C++ and Python projects using Boost.Python 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/recipe-05/cxx-example/account/test.py: -------------------------------------------------------------------------------- 1 | ../../../recipe-04/cxx-example/test.py -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/recipe-06/fortran-example/account/test.py: -------------------------------------------------------------------------------- 1 | ../../cxx-example/account/test.py -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/recipe-06/title.txt: -------------------------------------------------------------------------------- 1 | Mixing C, C++, Fortran, and Python using Python CFFI 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-03/fortran-example/custom.sh: -------------------------------------------------------------------------------- 1 | ../../recipe-02/cxx-example/custom.sh -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2022~cmake-examples/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/components/library/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cmake --build build --target install 4 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/components/library/hey/include/hey.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | const char* hey_message(); 4 | -------------------------------------------------------------------------------- /99~参考资料/2022~《An Introduction to Modern CMake》~中文版/08~查找库(或包)/README.md: -------------------------------------------------------------------------------- 1 | # 查找包 2 | 3 | CMake 中有两种方式查找包:“模块”模式(Module)和“配置”模式(Config)。 4 | -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/fetch_content/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /cmake-build-debug 3 | .idea -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/find_library/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /cmake-build-debug 3 | .idea -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/find_package/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /cmake-build-debug 3 | .idea -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/fmt-sample/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /cmake-build-debug 3 | .idea -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/subdirectory/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /cmake-build-debug 3 | .idea -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/E-installing/cmake-examples.conf: -------------------------------------------------------------------------------- 1 | # Sample configuration file that could be installed 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/.gitattributes: -------------------------------------------------------------------------------- 1 | *.tar.gz binary 2 | *.npy binary 3 | *.zip binary 4 | *.png diff=exif 5 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-02/cxx-example/hello-world.cpp: -------------------------------------------------------------------------------- 1 | ../../recipe-01/cxx-example/hello-world.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-04/cxx-example/hello-world.cpp: -------------------------------------------------------------------------------- 1 | ../../recipe-03/cxx-example/hello-world.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-05/cxx-example/hello-world.cpp: -------------------------------------------------------------------------------- 1 | ../../recipe-03/cxx-example/hello-world.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-07/cxx-example-3.5/linear-algebra.cpp: -------------------------------------------------------------------------------- 1 | ../cxx-example/linear-algebra.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-10/title.txt: -------------------------------------------------------------------------------- 1 | Detecting external libraries: II. Writing a find-module 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-06/recipe-02/title.txt: -------------------------------------------------------------------------------- 1 | Generating source code at configure time using Python 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-06/recipe-07/cxx-example/version.hpp.in: -------------------------------------------------------------------------------- 1 | ../../recipe-06/cxx-example/version.hpp.in -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-08/cxx-example/src/main.cpp: -------------------------------------------------------------------------------- 1 | ../../../recipe-07/cxx-example/src/main.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-08/cxx-example/tests/test.cpp: -------------------------------------------------------------------------------- 1 | ../../../recipe-07/cxx-example/tests/test.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/recipe-03/c-example/external/upstream/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(fftw3) 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/recipe-04/cxx-example/main.cpp: -------------------------------------------------------------------------------- 1 | ../../../chapter-04/recipe-01/cxx-example/main.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/recipe-04/cxx-example/test.cpp: -------------------------------------------------------------------------------- 1 | ../../../chapter-04/recipe-03/cxx-example/test.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/recipe-06/fortran-example/account/account.h: -------------------------------------------------------------------------------- 1 | ../../cxx-example/account/account.h -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-05/title.txt: -------------------------------------------------------------------------------- 1 | Distributing a project with dependencies as Conda package 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/recipe-01/cxx-example/menu.yml: -------------------------------------------------------------------------------- 1 | targets: 2 | - test 3 | - Experimental 4 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/recipe-02/cxx-example/menu.yml: -------------------------------------------------------------------------------- 1 | targets: 2 | - test 3 | - Experimental 4 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/core/header-only/library/install.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cmake --build build --target install 4 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/core/header-only/library/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cmake --build build --target install 4 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/components/library/hello/include/hello.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | const char* hello_message(); 4 | -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-6-Test/sub/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(subadd add.cpp) # 生成动态库libsubadd.a,subadd这个名字可以自定义 2 | -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/includes_full_code/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /cmake-build-debug 3 | .idea -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/multi_cmakelists/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /cmake-build-debug 3 | .idea -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-10/cxx-example/compute-areas.cpp: -------------------------------------------------------------------------------- 1 | ../../recipe-08/cxx-example/compute-areas.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-02/cxx-example/sum_integers.cpp: -------------------------------------------------------------------------------- 1 | ../../recipe-01/cxx-example/sum_integers.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-02/cxx-example/sum_integers.hpp: -------------------------------------------------------------------------------- 1 | ../../recipe-01/cxx-example/sum_integers.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-03/cxx-example-3.5/sum_integers.cpp: -------------------------------------------------------------------------------- 1 | ../../recipe-01/cxx-example/sum_integers.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-03/cxx-example-3.5/sum_integers.hpp: -------------------------------------------------------------------------------- 1 | ../../recipe-01/cxx-example/sum_integers.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-03/cxx-example/sum_integers.cpp: -------------------------------------------------------------------------------- 1 | ../../recipe-01/cxx-example/sum_integers.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-03/cxx-example/sum_integers.hpp: -------------------------------------------------------------------------------- 1 | ../../recipe-01/cxx-example/sum_integers.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-04/cxx-example/sum_integers.cpp: -------------------------------------------------------------------------------- 1 | ../../recipe-01/cxx-example/sum_integers.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-04/cxx-example/sum_integers.hpp: -------------------------------------------------------------------------------- 1 | ../../recipe-01/cxx-example/sum_integers.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-05/title.txt: -------------------------------------------------------------------------------- 1 | Running custom commands for specific targets at build time 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-06/recipe-02/fortran-c-example/example.f90: -------------------------------------------------------------------------------- 1 | ../../recipe-01/fortran-c-example/example.f90 -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-06/recipe-04/title.txt: -------------------------------------------------------------------------------- 1 | Recording the project version information for reproducibility 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-08/cxx-example/src/io/io.cpp: -------------------------------------------------------------------------------- 1 | ../../../../recipe-07/cxx-example/src/io/io.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-08/cxx-example/src/io/io.hpp: -------------------------------------------------------------------------------- 1 | ../../../../recipe-07/cxx-example/src/io/io.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/recipe-02/cxx-example/external/upstream/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(boost) 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/recipe-03/title.txt: -------------------------------------------------------------------------------- 1 | Managing dependencies with a superbuild: II. The FFTW library 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/recipe-04/cxx-example-3.5/main.cpp: -------------------------------------------------------------------------------- 1 | ../../../chapter-04/recipe-01/cxx-example/main.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/recipe-04/cxx-example-3.5/test.cpp: -------------------------------------------------------------------------------- 1 | ../../../chapter-04/recipe-03/cxx-example/test.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/recipe-05/cxx-example/external/upstream/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(message) 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-10/recipe-02/cxx-example/src/Message.cpp: -------------------------------------------------------------------------------- 1 | ../../../recipe-01/cxx-example/src/Message.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-10/recipe-03/cxx-example/src/Message.cpp: -------------------------------------------------------------------------------- 1 | ../../../recipe-01/cxx-example/src/Message.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-10/recipe-04/cxx-example/external/upstream/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(message) 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-04/cxx-example/menu.yml: -------------------------------------------------------------------------------- 1 | local: 2 | env: 3 | - VERBOSE_OUTPUT: 'ON' 4 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-12/recipe-02/cxx-example/src/Message.cpp: -------------------------------------------------------------------------------- 1 | ../../../recipe-01/cxx-example/src/Message.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-12/recipe-03/cxx-example/src/Message.cpp: -------------------------------------------------------------------------------- 1 | ../../../recipe-01/cxx-example/src/Message.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-12/recipe-03/cxx-example/src/Message.hpp: -------------------------------------------------------------------------------- 1 | ../../../recipe-01/cxx-example/src/Message.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-13/recipe-02/cxx-example/example.cpp: -------------------------------------------------------------------------------- 1 | ../../../chapter-03/recipe-05/cxx-example/example.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-13/recipe-02/title.txt: -------------------------------------------------------------------------------- 1 | Cross-compiling a Windows binary with OpenMP parallelization 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/recipe-02/cxx-example/CTestConfig.cmake: -------------------------------------------------------------------------------- 1 | ../../recipe-01/cxx-example/CTestConfig.cmake -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/recipe-03/cxx-example/CTestConfig.cmake: -------------------------------------------------------------------------------- 1 | ../../recipe-01/cxx-example/CTestConfig.cmake -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/recipe-04/cxx-example/CTestConfig.cmake: -------------------------------------------------------------------------------- 1 | ../../recipe-01/cxx-example/CTestConfig.cmake -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/recipe-04/title.txt: -------------------------------------------------------------------------------- 1 | Using the ThreadSanitizer and reporting data races to CDash 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~通过例子学习 CMake/codes/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~通过例子学习 CMake/codes/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/header-only-defines/library/install.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cmake --build build --target install 4 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/header-only-defines/library/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cmake --build build --target install 4 | -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/find_library/README.md: -------------------------------------------------------------------------------- 1 | https://github.com/open-source-parsers/jsoncpp 2 | -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/gtest-sample/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | cmake-build-debug 3 | build 4 | .idea -------------------------------------------------------------------------------- /99~参考资料/2016~全网最细的 CMake 教程/codes/Demo1/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 2.8) 2 | 3 | project (Demo1) 4 | add_executable(Demo main.cc) 5 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/cmake-examples.sublime-project: -------------------------------------------------------------------------------- 1 | { 2 | "folders": 3 | [ 4 | { 5 | "path": "." 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-02/fortran-example/hello-world.f90: -------------------------------------------------------------------------------- 1 | ../../recipe-01/fortran-example/hello-world.f90 -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-10/cxx-example/geometry_circle.cpp: -------------------------------------------------------------------------------- 1 | ../../recipe-08/cxx-example/geometry_circle.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-10/cxx-example/geometry_circle.hpp: -------------------------------------------------------------------------------- 1 | ../../recipe-08/cxx-example/geometry_circle.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-10/cxx-example/geometry_polygon.cpp: -------------------------------------------------------------------------------- 1 | ../../recipe-08/cxx-example/geometry_polygon.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-10/cxx-example/geometry_polygon.hpp: -------------------------------------------------------------------------------- 1 | ../../recipe-08/cxx-example/geometry_polygon.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-10/cxx-example/geometry_rhombus.cpp: -------------------------------------------------------------------------------- 1 | ../../recipe-08/cxx-example/geometry_rhombus.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-10/cxx-example/geometry_rhombus.hpp: -------------------------------------------------------------------------------- 1 | ../../recipe-08/cxx-example/geometry_rhombus.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-10/cxx-example/geometry_square.cpp: -------------------------------------------------------------------------------- 1 | ../../recipe-08/cxx-example/geometry_square.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-10/cxx-example/geometry_square.hpp: -------------------------------------------------------------------------------- 1 | ../../recipe-08/cxx-example/geometry_square.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-06/example/test.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | # simulate a failing test 4 | sys.exit(1) 5 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-01/cxx-example/src/main.cpp: -------------------------------------------------------------------------------- 1 | ../../../../chapter-04/recipe-01/cxx-example/main.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-01/cxx-example/tests/catch.hpp: -------------------------------------------------------------------------------- 1 | ../../../../chapter-04/recipe-02/cxx-example/catch.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-01/cxx-example/tests/test.cpp: -------------------------------------------------------------------------------- 1 | ../../../../chapter-04/recipe-02/cxx-example/test.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-04/cxx-example/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ../../../recipe-01/cxx-example/src/CMakeLists.txt -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-04/cxx-example/src/main.cpp: -------------------------------------------------------------------------------- 1 | ../../../../chapter-04/recipe-02/cxx-example/main.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-04/cxx-example/tests/catch.hpp: -------------------------------------------------------------------------------- 1 | ../../../../chapter-04/recipe-02/cxx-example/catch.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-04/cxx-example/tests/test.cpp: -------------------------------------------------------------------------------- 1 | ../../../../chapter-04/recipe-02/cxx-example/test.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-07/cxx-example/tests/catch.hpp: -------------------------------------------------------------------------------- 1 | ../../../../chapter-04/recipe-02/cxx-example/catch.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-08/cxx-example/tests/catch.hpp: -------------------------------------------------------------------------------- 1 | ../../../../chapter-04/recipe-02/cxx-example/catch.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/recipe-02/title.txt: -------------------------------------------------------------------------------- 1 | Managing dependencies with a superbuild: I. The Boost libraries 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-10/recipe-02/cxx-example/src/hello-world.cpp: -------------------------------------------------------------------------------- 1 | ../../../recipe-01/cxx-example/src/hello-world.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-10/recipe-03/cxx-example/src/hello-world.cpp: -------------------------------------------------------------------------------- 1 | ../../../recipe-01/cxx-example/src/hello-world.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-02/cxx-example/account/test.py: -------------------------------------------------------------------------------- 1 | ../../../../chapter-09/recipe-04/cxx-example/test.py -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-12/recipe-02/cxx-example/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ../../../recipe-01/cxx-example/src/CMakeLists.txt -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-12/recipe-03/cxx-example/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ../../../recipe-01/cxx-example/src/CMakeLists.txt -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/recipe-01/cxx-example/src/main.cpp: -------------------------------------------------------------------------------- 1 | ../../../../chapter-04/recipe-01/cxx-example/main.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/recipe-02/cxx-example/src/main.cpp: -------------------------------------------------------------------------------- 1 | ../../../../chapter-04/recipe-01/cxx-example/main.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/recipe-02/cxx-example/tests/test_long.cpp: -------------------------------------------------------------------------------- 1 | ../../../recipe-01/cxx-example/tests/test_long.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/recipe-03/fortran-example/CTestConfig.cmake: -------------------------------------------------------------------------------- 1 | ../../recipe-01/cxx-example/CTestConfig.cmake -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/recipe-03/title.txt: -------------------------------------------------------------------------------- 1 | Using the AddressSanitizer and reporting memory defects to CDash 2 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/components/library/configure.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cmake -B build -DCMAKE_INSTALL_PREFIX=install 4 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/components/library/goodbye/include/goodbye.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | const char* goodbye_message(); 4 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/fetch-content/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cmake --build build/debug 4 | cmake --build build/release 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/fetch-content/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cmake --build build/debug 4 | cmake --build build/release 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/superbuild/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cmake --build build/debug 4 | cmake --build build/release 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/superbuild/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cmake --build build/debug 4 | cmake --build build/release 5 | -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-3-Test/src/count.cpp: -------------------------------------------------------------------------------- 1 | #include "count.h" 2 | 3 | int count(int x, int y) 4 | { 5 | return x + y; 6 | } 7 | -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-5-Test/libsrc/add.cpp: -------------------------------------------------------------------------------- 1 | #include "add.h" 2 | 3 | int add(int a, int b) 4 | { 5 | return a + b; 6 | } 7 | -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-5-Test/libsrc/mul.cpp: -------------------------------------------------------------------------------- 1 | #include "mul.h" 2 | 3 | int mul(int a, int b) 4 | { 5 | return a * b; 6 | } 7 | -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-7-Test/source/sub/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 编译成静态库, libsub.a 2 | add_library(sub ${CMAKE_CURRENT_SOURCE_DIR}/sub.cpp) -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.xmind filter=lfs diff=lfs merge=lfs -text 2 | *.zip filter=lfs diff=lfs merge=lfs -text 3 | *.pdf filter=lfs diff=lfs merge=lfs -text 4 | -------------------------------------------------------------------------------- /88~最佳实践/99~参考资料/2024~Effective Modern CMake.md: -------------------------------------------------------------------------------- 1 | > [原文地址](https://gist.github.com/mbinna/c61dbb39bca0e4fb7d1f73b0d66a4fd1) 2 | 3 | # Effective Modern CMake 4 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/04-static-analysis/cppcheck/run_test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | mkdir -p build && cd build && cmake .. && make analysis 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-05/cxx-example/leaky_implementation.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | int do_some_work(); 4 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-03/title.txt: -------------------------------------------------------------------------------- 1 | Running a custom command at build time: I. Using `add_custom_command` 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-04/abstract.md: -------------------------------------------------------------------------------- 1 | Running a custom command at build time: II. Using `add_custom_target` 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-04/title.txt: -------------------------------------------------------------------------------- 1 | Running a custom command at build time: II. Using `add_custom_target` 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-09/title.txt: -------------------------------------------------------------------------------- 1 | Fine-tuning configuration and compilation with generator expressions 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-06/recipe-02/fortran-c-example/print_info.c.in: -------------------------------------------------------------------------------- 1 | ../../recipe-01/fortran-c-example/print_info.c.in -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-08/cxx-example/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ../../../recipe-07/cxx-example/tests/CMakeLists.txt -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/recipe-04/cxx-example/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ../../../chapter-04/recipe-03/cxx-example/CMakeLists.txt -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/recipe-04/cxx-example/sum_integers.cpp: -------------------------------------------------------------------------------- 1 | ../../../chapter-04/recipe-01/cxx-example/sum_integers.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/recipe-04/cxx-example/sum_integers.hpp: -------------------------------------------------------------------------------- 1 | ../../../chapter-04/recipe-01/cxx-example/sum_integers.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/recipe-04/title.txt: -------------------------------------------------------------------------------- 1 | Managing dependencies with a superbuild: III. The Google Test framework 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-02/title.txt: -------------------------------------------------------------------------------- 1 | Distributing a C++/Python project built with CMake/pybind11 via PyPI 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-03/title.txt: -------------------------------------------------------------------------------- 1 | Distributing a C/Fortran/Python project built with CMake/CFFI via PyPI 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-13/recipe-02/fortran-example/example.f90: -------------------------------------------------------------------------------- 1 | ../../../chapter-03/recipe-05/fortran-example/example.f90 -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/recipe-01/cxx-example/tests/test_short.cpp: -------------------------------------------------------------------------------- 1 | ../../../../chapter-04/recipe-01/cxx-example/test.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/recipe-02/cxx-example/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ../../../recipe-01/cxx-example/tests/CMakeLists.txt -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/recipe-02/cxx-example/tests/test_short.cpp: -------------------------------------------------------------------------------- 1 | ../../../../chapter-04/recipe-01/cxx-example/test.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/requirements.txt: -------------------------------------------------------------------------------- 1 | breathe 2 | cffi 3 | colorama 4 | cython 5 | docopt 6 | numpy 7 | pyyaml 8 | sphinx 9 | -------------------------------------------------------------------------------- /99~参考资料/2020~通过例子学习 CMake/codes/dcmtk/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~通过例子学习 CMake/codes/dcmtk/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/core/shared/application/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cmake --build build/debug 4 | cmake --build build/release 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/core/shared/application/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cmake --build build/debug 4 | cmake --build build/release 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/core/static/application/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cmake --build build/debug 4 | cmake --build build/release 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/core/static/application/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cmake --build build/debug 4 | cmake --build build/release 5 | -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-6-Test/run.sh: -------------------------------------------------------------------------------- 1 | # 自动化编译和运行的脚本 2 | rm -rf build 3 | mkdir build 4 | cd build/ 5 | cmake .. 6 | make -j4 7 | ./main -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-01/cxx-example/linear-algebra.cpp: -------------------------------------------------------------------------------- 1 | ../../../chapter-03/recipe-07/cxx-example/linear-algebra.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-03/cxx-example/linear-algebra.cpp: -------------------------------------------------------------------------------- 1 | ../../../chapter-03/recipe-04/cxx-example/linear-algebra.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-04/cxx-example/linear-algebra.cpp: -------------------------------------------------------------------------------- 1 | ../../../chapter-03/recipe-04/cxx-example/linear-algebra.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-06/recipe-03/abstract.md: -------------------------------------------------------------------------------- 1 | In this example, we generate C++ code 2 | by using Python at build time. 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-08/cxx-example/external/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ../../../recipe-07/cxx-example/external/CMakeLists.txt -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-08/cxx-example/external/conversion.cpp: -------------------------------------------------------------------------------- 1 | ../../../recipe-07/cxx-example/external/conversion.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-08/cxx-example/external/conversion.hpp: -------------------------------------------------------------------------------- 1 | ../../../recipe-07/cxx-example/external/conversion.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-08/cxx-example/src/parser/parser.cpp: -------------------------------------------------------------------------------- 1 | ../../../../recipe-07/cxx-example/src/parser/parser.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-08/cxx-example/src/parser/parser.hpp: -------------------------------------------------------------------------------- 1 | ../../../../recipe-07/cxx-example/src/parser/parser.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/recipe-02/cxx-example/src/path-info.cpp: -------------------------------------------------------------------------------- 1 | ../../../../chapter-03/recipe-08/cxx-example/path-info.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/recipe-04/cxx-example-3.5/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ../../../chapter-04/recipe-03/cxx-example-3.5/CMakeLists.txt -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/recipe-04/cxx-example-3.5/sum_integers.cpp: -------------------------------------------------------------------------------- 1 | ../../../chapter-04/recipe-01/cxx-example/sum_integers.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/recipe-04/cxx-example-3.5/sum_integers.hpp: -------------------------------------------------------------------------------- 1 | ../../../chapter-04/recipe-01/cxx-example/sum_integers.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/recipe-01/fortran-c-example/src/utils/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(utils SHARED util_strings.f90) 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/recipe-01/fortran-cxx-example/src/utils/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(utils SHARED util_strings.f90) 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/recipe-02/cxx-example/src/math/CxxBLAS.cpp: -------------------------------------------------------------------------------- 1 | ../../../../../chapter-03/recipe-04/cxx-example/CxxBLAS.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/recipe-02/cxx-example/src/math/CxxBLAS.hpp: -------------------------------------------------------------------------------- 1 | ../../../../../chapter-03/recipe-04/cxx-example/CxxBLAS.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-01/cxx-example/src/Message.cpp: -------------------------------------------------------------------------------- 1 | ../../../../chapter-10/recipe-01/cxx-example/src/Message.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-03/cxx-example/account/account.h: -------------------------------------------------------------------------------- 1 | ../../../../chapter-09/recipe-06/cxx-example/account/account.h -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-03/cxx-example/account/test.py: -------------------------------------------------------------------------------- 1 | ../../../../chapter-09/recipe-06/cxx-example/account/test.py -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-03/fortran-example/account/test.py: -------------------------------------------------------------------------------- 1 | ../../../../chapter-09/recipe-06/cxx-example/account/test.py -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-12/recipe-03/cxx-example/cmake/FindSphinx.cmake: -------------------------------------------------------------------------------- 1 | ../../../recipe-02/cxx-example/cmake/FindSphinx.cmake -------------------------------------------------------------------------------- /99~参考资料/2021~BrightXiaoHan~CMake 中文实战教程/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2021~BrightXiaoHan~CMake 中文实战教程/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/core/header-only/application/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cmake --build build/debug 4 | cmake --build build/release 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/core/header-only/application/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cmake --build build/debug 4 | cmake --build build/release 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/core/header-only/library/configure.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cmake -B build -G Ninja -DCMAKE_INSTALL_PREFIX=install 4 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/core/header-only/library/configure.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cmake -B build -G Ninja -DCMAKE_INSTALL_PREFIX=install 4 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/external-project-add/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cmake --build build/debug 4 | cmake --build build/release 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/external-project-add/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cmake --build build/debug 4 | cmake --build build/release 5 | -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-1-Test/test01.h: -------------------------------------------------------------------------------- 1 | #ifndef TEST01_H 2 | #define TEST01_H 3 | 4 | void print_hello(); 5 | 6 | #endif // TEST01_H 7 | -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-7-Test/source/mul/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 编译成动态库libmul.so 2 | add_library(mul SHARED ${CMAKE_CURRENT_SOURCE_DIR}/mul.cpp) -------------------------------------------------------------------------------- /99~参考资料/2016~全网最细的 CMake 教程/codes/Demo2/MathFunctions.h: -------------------------------------------------------------------------------- 1 | #ifndef POWER_H 2 | #define POWER_H 3 | 4 | extern double power(double base, int exponent); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-04/cxx-example/deps/wrap_BLAS_LAPACK.tar.gz: -------------------------------------------------------------------------------- 1 | ../../../recipe-03/cxx-example/wrap_BLAS_LAPACK.tar.gz -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-01/cxx-example/src/sum_integers.cpp: -------------------------------------------------------------------------------- 1 | ../../../../chapter-04/recipe-01/cxx-example/sum_integers.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-01/cxx-example/src/sum_integers.hpp: -------------------------------------------------------------------------------- 1 | ../../../../chapter-04/recipe-01/cxx-example/sum_integers.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-04/cxx-example/src/sum_integers.cpp: -------------------------------------------------------------------------------- 1 | ../../../../chapter-04/recipe-02/cxx-example/sum_integers.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-04/cxx-example/src/sum_integers.hpp: -------------------------------------------------------------------------------- 1 | ../../../../chapter-04/recipe-02/cxx-example/sum_integers.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-08/cxx-example/src/initial/initial.cpp: -------------------------------------------------------------------------------- 1 | ../../../../recipe-07/cxx-example/src/initial/initial.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-08/cxx-example/src/initial/initial.hpp: -------------------------------------------------------------------------------- 1 | ../../../../recipe-07/cxx-example/src/initial/initial.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/recipe-01/fortran-uuid-example-3.5/src/utils/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(utils SHARED util_strings.f90) 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/recipe-01/fortran-uuid-example/src/utils/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(utils SHARED util_strings.f90) 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/recipe-02/cxx-example/src/math/CxxLAPACK.cpp: -------------------------------------------------------------------------------- 1 | ../../../../../chapter-03/recipe-04/cxx-example/CxxLAPACK.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/recipe-02/cxx-example/src/math/CxxLAPACK.hpp: -------------------------------------------------------------------------------- 1 | ../../../../../chapter-03/recipe-04/cxx-example/CxxLAPACK.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-01/cxx-example/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ../../../../chapter-10/recipe-03/cxx-example/src/CMakeLists.txt -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-01/cxx-example/src/hello-world.cpp: -------------------------------------------------------------------------------- 1 | ../../../../chapter-10/recipe-01/cxx-example/src/hello-world.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-02/cxx-example/account/account.cpp: -------------------------------------------------------------------------------- 1 | ../../../../chapter-09/recipe-05/cxx-example/account/account.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-02/cxx-example/account/account.hpp: -------------------------------------------------------------------------------- 1 | ../../../../chapter-09/recipe-05/cxx-example/account/account.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-03/fortran-example/account/account.h: -------------------------------------------------------------------------------- 1 | ../../../../chapter-09/recipe-06/cxx-example/account/account.h -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-12/recipe-01/cxx-example/src/hello-world.cpp: -------------------------------------------------------------------------------- 1 | ../../../../chapter-10/recipe-01/cxx-example/src/hello-world.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-12/recipe-02/cxx-example/src/hello-world.cpp: -------------------------------------------------------------------------------- 1 | ../../../../chapter-10/recipe-01/cxx-example/src/hello-world.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-12/recipe-03/cxx-example/src/hello-world.cpp: -------------------------------------------------------------------------------- 1 | ../../../../chapter-10/recipe-01/cxx-example/src/hello-world.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/recipe-01/cxx-example/src/sum_integers.cpp: -------------------------------------------------------------------------------- 1 | ../../../../chapter-04/recipe-01/cxx-example/sum_integers.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/recipe-01/cxx-example/src/sum_integers.hpp: -------------------------------------------------------------------------------- 1 | ../../../../chapter-04/recipe-01/cxx-example/sum_integers.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/recipe-02/cxx-example/src/sum_integers.hpp: -------------------------------------------------------------------------------- 1 | ../../../../chapter-04/recipe-01/cxx-example/sum_integers.hpp -------------------------------------------------------------------------------- /99~参考资料/2021~BrightXiaoHan~CMake 中文实战教程/01~find_package 的使用指南/codes/ModuleMode/libadd.h: -------------------------------------------------------------------------------- 1 | #ifndef LIBADD 2 | #define LIBADD 3 | 4 | int add(int, int); 5 | 6 | #endif -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2022~cmake-examples/codes/examples/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/core/shared-export/application/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cmake --build build/debug 4 | cmake --build build/release 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/core/shared-export/application/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cmake --build build/debug 4 | cmake --build build/release 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/components/application/configure.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cmake -B build -DCMAKE_PREFIX_PATH=%cd%/../library/install 4 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/components/library/hey/hey.cpp: -------------------------------------------------------------------------------- 1 | #include "hey.h" 2 | 3 | const char* hey_message() { 4 | return "hey"; 5 | } 6 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/header-only-defines/library/configure.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cmake -B build -G Ninja -DCMAKE_INSTALL_PREFIX=install 4 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/header-only-defines/library/configure.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cmake -B build -G Ninja -DCMAKE_INSTALL_PREFIX=install 4 | -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/gtest-sample/third_party/gtest/.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/xlog/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':nativelib' 2 | include ':app' 3 | rootProject.name = "xlog_example" -------------------------------------------------------------------------------- /99~参考资料/2016~全网最细的 CMake 教程/codes/Demo3/math/MathFunctions.h: -------------------------------------------------------------------------------- 1 | #ifndef POWER_H 2 | #define POWER_H 3 | 4 | extern double power(double base, int exponent); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /99~参考资料/2016~全网最细的 CMake 教程/codes/Demo4/math/MathFunctions.h: -------------------------------------------------------------------------------- 1 | #ifndef POWER_H 2 | #define POWER_H 3 | 4 | extern double power(double base, int exponent); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /99~参考资料/2016~全网最细的 CMake 教程/codes/Demo5/math/MathFunctions.h: -------------------------------------------------------------------------------- 1 | #ifndef POWER_H 2 | #define POWER_H 3 | 4 | extern double power(double base, int exponent); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /99~参考资料/2016~全网最细的 CMake 教程/codes/Demo6/math/MathFunctions.h: -------------------------------------------------------------------------------- 1 | #ifndef POWER_H 2 | #define POWER_H 3 | 4 | extern double power(double base, int exponent); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /99~参考资料/2016~全网最细的 CMake 教程/codes/Demo7/math/MathFunctions.h: -------------------------------------------------------------------------------- 1 | #ifndef POWER_H 2 | #define POWER_H 3 | 4 | extern double power(double base, int exponent); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /99~参考资料/2016~全网最细的 CMake 教程/codes/Demo8/math/MathFunctions.h: -------------------------------------------------------------------------------- 1 | #ifndef POWER_H 2 | #define POWER_H 3 | 4 | extern double power(double base, int exponent); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/07-package-management/D-conan/i-basic/conanfile.txt: -------------------------------------------------------------------------------- 1 | [requires] 2 | fmt/5.3.0@bincrafters/stable 3 | 4 | [generators] 5 | cmake 6 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-08/cxx-example/src/evolution/evolution.cpp: -------------------------------------------------------------------------------- 1 | ../../../../recipe-07/cxx-example/src/evolution/evolution.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-08/cxx-example/src/evolution/evolution.hpp: -------------------------------------------------------------------------------- 1 | ../../../../recipe-07/cxx-example/src/evolution/evolution.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/recipe-02/cxx-example/src/linear-algebra.cpp: -------------------------------------------------------------------------------- 1 | ../../../../chapter-03/recipe-04/cxx-example/linear-algebra.cpp -------------------------------------------------------------------------------- /99~参考资料/2021~BrightXiaoHan~CMake 中文实战教程/03.安装/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2021~BrightXiaoHan~CMake 中文实战教程/03.安装/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/header-only-defines/application/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cmake --build build/debug 4 | cmake --build build/release 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/header-only-defines/application/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cmake --build build/debug 4 | cmake --build build/release 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/static-versioned/application-1.0.0/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cmake --build build/debug 4 | cmake --build build/release 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/static-versioned/application-2.0.0/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cmake --build build/debug 4 | cmake --build build/release 5 | -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-3-Test/include/count.h: -------------------------------------------------------------------------------- 1 | # ifndef COUNT_H 2 | # define COUNT_H 3 | 4 | int count(int x, int y); 5 | 6 | # endif // COUNT_H 7 | -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-4-Test/include/test04.h: -------------------------------------------------------------------------------- 1 | #ifndef TEST04_H 2 | #define TEST04_H 3 | 4 | int count(int, int); 5 | 6 | #endif // TEST04_H 7 | -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-7-Test/source/add/add.cpp: -------------------------------------------------------------------------------- 1 | #include "add.h" 2 | #include "iostream" 3 | 4 | int add(int x, int y){ 5 | return x+y; 6 | } -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-7-Test/source/mul/mul.cpp: -------------------------------------------------------------------------------- 1 | #include "mul.h" 2 | #include "iostream" 3 | 4 | int mul(int x, int y){ 5 | return x*y; 6 | } -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-7-Test/source/sub/sub.cpp: -------------------------------------------------------------------------------- 1 | #include "sub.h" 2 | #include "iostream" 3 | 4 | int sub(int x, int y){ 5 | return x-y; 6 | } -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-8-Test/source/add/add.cpp: -------------------------------------------------------------------------------- 1 | #include "add.h" 2 | #include "iostream" 3 | 4 | int add(int x, int y){ 5 | return x+y; 6 | } -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-8-Test/source/mul/mul.cpp: -------------------------------------------------------------------------------- 1 | #include "mul.h" 2 | #include "iostream" 3 | 4 | int mul(int x, int y){ 5 | return x*y; 6 | } -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-8-Test/source/sub/sub.cpp: -------------------------------------------------------------------------------- 1 | #include "sub.h" 2 | #include "iostream" 3 | 4 | int sub(int x, int y){ 5 | return x-y; 6 | } -------------------------------------------------------------------------------- /99~参考资料/2018~cmake-project-template/codes/.idea/cmake-project-template.iml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-10/abstract.md: -------------------------------------------------------------------------------- 1 | This recipe shows how to write a `FindZeroMQ.cmake` module to detect the ZeroMQ library. 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/recipe-04/cxx-example-3.5/fetch_git_repo.cmake: -------------------------------------------------------------------------------- 1 | ../../../chapter-04/recipe-03/cxx-example-3.5/fetch_git_repo.cmake -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-02/cxx-example/README.rst: -------------------------------------------------------------------------------- 1 | Example project 2 | =============== 3 | 4 | Project description in here ... 5 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-03/cxx-example/README.rst: -------------------------------------------------------------------------------- 1 | Example project 2 | =============== 3 | 4 | Project description in here ... 5 | -------------------------------------------------------------------------------- /99~参考资料/2021~BrightXiaoHan~CMake 中文实战教程/01~find_package 的使用指南/codes/ModuleMode/libadd.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int add(int a, int b){ 4 | return a+b; 5 | } 6 | 7 | -------------------------------------------------------------------------------- /99~参考资料/2021~BrightXiaoHan~CMake 中文实战教程/03.安装/codes/include/mymath.h: -------------------------------------------------------------------------------- 1 | #ifndef MYMATH_H 2 | #define MYMATH_H 3 | 4 | int add(int, int); 5 | double add(double, double); 6 | #endif -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/components/library/hello/hello.cpp: -------------------------------------------------------------------------------- 1 | #include "hello.h" 2 | 3 | const char* hello_message() { 4 | return "hello"; 5 | } 6 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/static-versioned/application-1.0.0/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cmake --build build/debug 4 | cmake --build build/release 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/static-versioned/application-2.0.0/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cmake --build build/debug 4 | cmake --build build/release 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~《An Introduction to Modern CMake》~中文版/codes/simple-project/simple_lib.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | std::string simple_lib_function(); 6 | -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-6-Test/sub/add.cpp: -------------------------------------------------------------------------------- 1 | #include "add.h" 2 | 3 | void add(int a, int b) 4 | { 5 | std::cout << "add = " << a+b << std::endl; 6 | } -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/07-package-management/D-conan/ii-basic-targets/conanfile.txt: -------------------------------------------------------------------------------- 1 | [requires] 2 | fmt/5.3.0@bincrafters/stable 3 | 4 | [generators] 5 | cmake 6 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/.mailmap: -------------------------------------------------------------------------------- 1 | Roberto Di Remigio 2 | Eric Noulard 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-10/example/test/cleanup.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | print("tearing down") 4 | 5 | # report success 6 | sys.exit(0) 7 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-10/example/test/setup.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | print("setting up") 4 | 5 | # report success 6 | sys.exit(0) 7 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-07/cxx-example/menu.yml: -------------------------------------------------------------------------------- 1 | travis-osx: 2 | failing_generators: 3 | - 'Unix Makefiles' 4 | - 'Ninja' 5 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-03/fortran-example/README.rst: -------------------------------------------------------------------------------- 1 | Example project 2 | =============== 3 | 4 | Project description in here ... 5 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/recipe-03/cxx-example/src/buggy.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | int function_leaky(); 4 | int function_use_after_free(); 5 | -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-7-Test/source/add/add3.cpp: -------------------------------------------------------------------------------- 1 | #include "add3.h" 2 | #include "iostream" 3 | 4 | int add(int x, int y, int z){ 5 | return x+y+z; 6 | } -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-8-Test/source/add/add3.cpp: -------------------------------------------------------------------------------- 1 | #include "add3.h" 2 | #include "iostream" 3 | 4 | int add(int x, int y, int z){ 5 | return x+y+z; 6 | } -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-09/abstract.md: -------------------------------------------------------------------------------- 1 | We will show various mechanism to require and set a specific compiler standard 2 | for our project. 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-10/c-example/menu.yml: -------------------------------------------------------------------------------- 1 | appveyor-vs: 2 | definitions: 3 | - ZeroMQ_ROOT: 'c:\tools\vcpkg\installed\x64-windows' 4 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-10/example/test/feature-a.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | print("running test a") 4 | 5 | # report success 6 | sys.exit(0) 7 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-10/example/test/feature-b.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | print("running test b") 4 | 5 | # report success 6 | sys.exit(0) 7 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/recipe-04/cxx-example-3.5/fetch_at_configure_step.in: -------------------------------------------------------------------------------- 1 | ../../../chapter-04/recipe-03/cxx-example-3.5/fetch_at_configure_step.in -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-01/cxx-example/cmake/messageConfig.cmake.in: -------------------------------------------------------------------------------- 1 | ../../../../chapter-10/recipe-03/cxx-example/cmake/messageConfig.cmake.in -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-03/cxx-example/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README.rst CMakeLists.txt 2 | recursive-include account *.h *.f90 CMakeLists.txt 3 | -------------------------------------------------------------------------------- /99~参考资料/2021~BrightXiaoHan~CMake 中文实战教程/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "ImportExternalProject/spdlog"] 2 | path = ImportExternalProject/spdlog 3 | url = https://github.com/gabime/spdlog.git 4 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/components/library/goodbye/goodbye.cpp: -------------------------------------------------------------------------------- 1 | #include "goodbye.h" 2 | 3 | const char* goodbye_message() { 4 | return "goodbye"; 5 | } 6 | -------------------------------------------------------------------------------- /99~参考资料/2022~《An Introduction to Modern CMake》~中文版/codes/root-dict/DictExample.cxx: -------------------------------------------------------------------------------- 1 | #include "DictExample.h" 2 | 3 | Double_t Simple::GetX() const {return x;} 4 | 5 | ClassImp(Simple) 6 | -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-3-Test/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-3-Test/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-4-Test/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-4-Test/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-5-Test/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-5-Test/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-7-Test/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-7-Test/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-8-Test/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-8-Test/.DS_Store -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/gtest-sample/src/add.cpp: -------------------------------------------------------------------------------- 1 | #include "add.h" 2 | 3 | int add(int a, int b) { 4 | return a + b; 5 | } 6 | 7 | 8 | -------------------------------------------------------------------------------- /99~参考资料/2018~cmake-project-template/codes/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "googletest"] 2 | path = test/lib/googletest 3 | url = https://github.com/google/googletest.git 4 | branch = master 5 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/B-hello-headers/.idea/B-hello-headers.iml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/05-unit-testing/google-test-download/run_test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Disabled for now because of issue with libcurl and https" 4 | exit 0 5 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-05/example/cmake/custom.cmake: -------------------------------------------------------------------------------- 1 | include_guard(GLOBAL) 2 | 3 | message(STATUS "custom.cmake is included and processed") 4 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-06/example/cmake/custom.cmake: -------------------------------------------------------------------------------- 1 | custom_include_guard() 2 | 3 | message(STATUS "custom.cmake is included and processed") 4 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-09/abstract.md: -------------------------------------------------------------------------------- 1 | The example in this recipe shows how to use CMake to organize the build system 2 | for a Fortran project. 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-02/cxx-example/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README.rst CMakeLists.txt 2 | recursive-include account *.cpp *.hpp CMakeLists.txt 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-03/fortran-example/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README.rst CMakeLists.txt 2 | recursive-include account *.h *.f90 CMakeLists.txt 3 | -------------------------------------------------------------------------------- /99~参考资料/2021~BrightXiaoHan~CMake 中文实战教程/02.引入外部项目的几种方式/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2021~BrightXiaoHan~CMake 中文实战教程/02.引入外部项目的几种方式/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2021~BrightXiaoHan~CMake 中文实战教程/05~编写 CUDA 应用程序/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2021~BrightXiaoHan~CMake 中文实战教程/05~编写 CUDA 应用程序/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/core/shared/library/install.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cmake --build build/debug --target install 4 | cmake --build build/release --target install 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/core/shared/library/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cmake --build build/debug --target install 4 | cmake --build build/release --target install 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/core/static/library/install.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cmake --build build/debug --target install 4 | cmake --build build/release --target install 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/core/static/library/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cmake --build build/debug --target install 4 | cmake --build build/release --target install 5 | -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/xlog/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | XLogExample 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-07/cxx-example-3.5/README.md: -------------------------------------------------------------------------------- 1 | To test: 2 | `./linear-algebra 1000` where the integer is the dimension of the matrices/vectors. 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-07/cxx-example/README.md: -------------------------------------------------------------------------------- 1 | To test: 2 | `./linear-algebra 1000` where the integer is the dimension of the matrices/vectors. 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-03/cxx-example/README.md: -------------------------------------------------------------------------------- 1 | To test: 2 | `./linear-algebra 1000` where the integer is the dimension of the matrices/vectors. 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-04/cxx-example/README.md: -------------------------------------------------------------------------------- 1 | To test: 2 | `./linear-algebra 1000` where the integer is the dimension of the matrices/vectors. 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-06/recipe-06/cxx-example/version.hpp.in: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | const std::string GIT_HASH = "@GIT_HASH@"; 6 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-07/cxx-example/src/io/io.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | void print_row(const std::vector row); 6 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/recipe-02/cxx-example/README.md: -------------------------------------------------------------------------------- 1 | To test: 2 | `./linear-algebra 1000` where the integer is the dimension of the matrices/vectors. 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-10/recipe-01/cxx-example/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_test( 2 | NAME test_shared 3 | COMMAND $ 4 | ) 5 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-04/abstract.md: -------------------------------------------------------------------------------- 1 | This recipe shows how to compile a small C++ project as a redistributable [Conda](https://conda.io) package. 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/testing/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/testing/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2021~BrightXiaoHan~CMake 中文实战教程/04.使用包管理工具管理你的依赖库/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2021~BrightXiaoHan~CMake 中文实战教程/04.使用包管理工具管理你的依赖库/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/core/shared-export/library/install.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cmake --build build/debug --target install 4 | cmake --build build/release --target install 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/core/shared-export/library/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cmake --build build/debug --target install 4 | cmake --build build/release --target install 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~《An Introduction to Modern CMake》~中文版/04~包含子项目/README.md: -------------------------------------------------------------------------------- 1 | # 包含子项目 2 | 3 | 这就是将一个好的 Git 系统与 CMake 共同使用的优势所在。虽然靠这种方法无法解决世界上所有的问题,但可以解决大部分基于 C++ 的工程包含子项目的问题! 4 | 5 | 本章中列出了几种包含子项目的方法。 6 | -------------------------------------------------------------------------------- /99~参考资料/2022~《An Introduction to Modern CMake》~中文版/codes/simple-project/simple_lib.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | std::string simple_lib_function() { 4 | return "Compiled in library"; 5 | } 6 | -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/gtest-sample/src/add.h: -------------------------------------------------------------------------------- 1 | #ifndef ADD_HPP 2 | #define ADD_HPP 3 | 4 | int add(int a, int b); 5 | 6 | #endif // ADD_HPP 7 | 8 | -------------------------------------------------------------------------------- /99~参考资料/2018~cmake-project-template/codes/.idea/markdown-navigator/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/06-installer/deb/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "Hello.h" 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | Hello hi; 6 | hi.print(); 7 | return 0; 8 | } -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-09/cxx-example/Cat.cpp: -------------------------------------------------------------------------------- 1 | #include "Cat.hpp" 2 | 3 | std::string Cat::name_impl() const { return "I'm " + name_ + " the cat!"; } 4 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-09/cxx-example/Dog.cpp: -------------------------------------------------------------------------------- 1 | #include "Dog.hpp" 2 | 3 | std::string Dog::name_impl() const { return "I'm " + name_ + " the dog!"; } 4 | -------------------------------------------------------------------------------- /99~参考资料/2020~通过例子学习 CMake/02~sub-projects/README.adoc: -------------------------------------------------------------------------------- 1 | = 子项目 2 | 3 | 许多大型项目由不同的库和二进制文件组成。本文利用多个CMakeLists.txt文件组织这些库和文件。 4 | 5 | 包括的示例是 6 | 7 | - link:A-basic[basic] - 此基本示例包括一个静态库,一个仅有头文件的库和一个可执行文件。 -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-7-Test/source/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-7-Test/source/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-8-Test/source/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-8-Test/source/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/B-hello-headers/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "Hello.h" 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | Hello hi; 6 | hi.print(); 7 | return 0; 8 | } -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-02/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-02/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-01/cxx-example/sum_integers.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | int sum_integers(const std::vector integers); 6 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-07/example/test.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import time 3 | 4 | # wait for 2 seconds 5 | time.sleep(2) 6 | 7 | # report success 8 | sys.exit(0) 9 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-07/cxx-example/ubsan-example.cpp: -------------------------------------------------------------------------------- 1 | int main(int argc, char **argv) { 2 | int k = 0x7fffffff; 3 | k += argc; 4 | return 0; 5 | } 6 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-06/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-06/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-06/recipe-05/cxx-example/version.hpp.in: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | const std::string PROGRAM_VERSION = "@PROGRAM_VERSION@"; 6 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-10/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-10/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-12/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-12/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-12/recipe-01/cxx-example/docs/front_page.md: -------------------------------------------------------------------------------- 1 | # Welcome to recipe-01's documentation! 2 | 3 | This page is generated from a Markdown document! 4 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-13/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-13/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2021~BrightXiaoHan~CMake 中文实战教程/01~find_package 的使用指南/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2021~BrightXiaoHan~CMake 中文实战教程/01~find_package 的使用指南/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2021~BrightXiaoHan~CMake 中文实战教程/03.安装/codes/mymath.cc: -------------------------------------------------------------------------------- 1 | #include "mymath.h" 2 | 3 | int add(int a, int b){ 4 | return a+b; 5 | } 6 | 7 | double add(double a, double b){ 8 | return a+b; 9 | } -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/nested-dependencies/application/configure-build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cmake -B build -DCMAKE_PREFIX_PATH=../library/lib-b/install 4 | cmake --build build 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/nested-dependencies/application/configure-build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cmake -B build -DCMAKE_PREFIX_PATH=../library/lib-b/install 4 | cmake --build build 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/static-versioned/library-1.0.0/install.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cmake --build build/debug --target install 4 | cmake --build build/release --target install 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/static-versioned/library-1.0.0/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cmake --build build/debug --target install 4 | cmake --build build/release --target install 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/static-versioned/library-2.0.0/install.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cmake --build build/debug --target install 4 | cmake --build build/release --target install 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/static-versioned/library-2.0.0/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cmake --build build/debug --target install 4 | cmake --build build/release --target install 5 | -------------------------------------------------------------------------------- /99~参考资料/2018~cmake-project-template/codes/test/main.cpp: -------------------------------------------------------------------------------- 1 | #include "gtest/gtest.h" 2 | 3 | int main(int argc, char *argv[]) { 4 | ::testing::InitGoogleTest(&argc, argv); 5 | return RUN_ALL_TESTS(); 6 | } 7 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/A-hello-cmake/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | std::cout << "Hello CMake!" << std::endl; 6 | return 0; 7 | } -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/05-unit-testing/google-test-download/post_test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Disabled for now because of issue with libcurl and https" 4 | exit 0 5 | 6 | #make test 7 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-10/cxx-example/menu.yml: -------------------------------------------------------------------------------- 1 | appveyor-vs: 2 | definitions: 3 | - CMAKE_BUILD_TYPE: 'Release' 4 | - CMAKE_CONFIGURATION_TYPES: 'Release' 5 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-02/recipe-03/abstract.md: -------------------------------------------------------------------------------- 1 | In this recipe we use CMake to accommodate the conditional compilation of 2 | source code that depends on the environment. 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-10/recipe-03/abstract.md: -------------------------------------------------------------------------------- 1 | This recipe shows how CMake can let us export our targets so 2 | that other projects using CMake can pick them up easily. 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-10/recipe-04/abstract.md: -------------------------------------------------------------------------------- 1 | This recipe shows how to install a superbuild which depends on a library which 2 | may or may not be available on the system. 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-05/cxx-example/menu.yml: -------------------------------------------------------------------------------- 1 | appveyor-vs: 2 | env: 3 | - VERBOSE_OUTPUT: 'ON' 4 | 5 | local: 6 | env: 7 | - VERBOSE_OUTPUT: 'ON' 8 | -------------------------------------------------------------------------------- /99~参考资料/2021~BrightXiaoHan~CMake 中文实战教程/06.编写 Python 的 C 或 C++ 扩展/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2021~BrightXiaoHan~CMake 中文实战教程/06.编写 Python 的 C 或 C++ 扩展/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/static-versioned/library-1.0.0/include/useless/writer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace wrtr 4 | { 5 | void print(const char* message); 6 | } // namespace wrtr -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/04-static-analysis/cppcheck-compile-commands/run_test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | mkdir -p build && cd build && cmake -DCPPCHECK_ERROR_EXITCODE_ARG="" .. && make cppcheck-analysis 3 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/06-installer/deb/include/Hello.h: -------------------------------------------------------------------------------- 1 | #ifndef __HELLO_H__ 2 | #define __HELLO_H__ 3 | 4 | class Hello 5 | { 6 | public: 7 | void print(); 8 | }; 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/06-installer/deb/src/Hello.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "Hello.h" 4 | 5 | void Hello::print() 6 | { 7 | std::cout << "Hello Install!" << std::endl; 8 | } 9 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-05/cxx-example-3.5/menu.yml: -------------------------------------------------------------------------------- 1 | # OpenMP does not work with clang 2 | travis-osx: 3 | skip_generators: 4 | - 'Unix Makefiles' 5 | - 'Ninja' 6 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-05/cxx-example/menu.yml: -------------------------------------------------------------------------------- 1 | # OpenMP does not work with clang 2 | travis-osx: 3 | skip_generators: 4 | - 'Unix Makefiles' 5 | - 'Ninja' 6 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-07/cxx-example/external/conversion.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | std::string binary_representation(const int decimal); 6 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-07/cxx-example/src/initial/initial.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | std::vector initial_distribution(const int length); 6 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/recipe-03/abstract.md: -------------------------------------------------------------------------------- 1 | In this recipe we show 2 | how to download, build, and install the 3 | [FFTW library](http://www.fftw.org) using a superbuild. 4 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/recipe-01/abstract.md: -------------------------------------------------------------------------------- 1 | We will show how CMake can be used for a mixed-language project where a Fortran 2 | executable uses libraries written in C or C++. 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-03/cxx-example/account/implementation/c_cpp_interface.cpp: -------------------------------------------------------------------------------- 1 | ../../../../../chapter-09/recipe-06/cxx-example/account/implementation/c_cpp_interface.cpp -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/static-versioned/library-2.0.0/include/useless/writer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace wrtr 4 | { 5 | void print(const char* format, ...); 6 | } // namespace wrtr -------------------------------------------------------------------------------- /99~参考资料/2022~《An Introduction to Modern CMake》~中文版/codes/root-simple/SimpleExample.cxx: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | TLorentzVector v(1,2,3,4); 5 | v.Print(); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/C-static-library/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "static/Hello.h" 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | Hello hi; 6 | hi.print(); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/D-shared-library/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "shared/Hello.h" 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | Hello hi; 6 | hi.print(); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/E-installing/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "installing/Hello.h" 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | Hello hi; 6 | hi.print(); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/F-build-type/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | std::cout << "Hello Build Type!" << std::endl; 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/I-compiling-with-clang/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | std::cout << "Hello CMake!" << std::endl; 6 | return 0; 7 | } -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/J-building-with-ninja/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | std::cout << "Hello CMake!" << std::endl; 6 | return 0; 7 | } -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-10/abstract.md: -------------------------------------------------------------------------------- 1 | This recipe shows how to use loop construct [`foreach-endforeach`](https://cmake.org/cmake/help/latest/command/foreach.html) in CMake. 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-09/c-example-3.5/menu.yml: -------------------------------------------------------------------------------- 1 | # No pkg-config with Visual Studio generator 2 | appveyor-vs: 3 | skip_generators: 4 | - 'Visual Studio 15 2017 Win64' 5 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-09/fortran-example/src/io/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(io "") 2 | 3 | target_sources(io 4 | PUBLIC 5 | ${CMAKE_CURRENT_LIST_DIR}/io.f90 6 | ) 7 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-03/cxx-example/account/implementation/cpp_implementation.cpp: -------------------------------------------------------------------------------- 1 | ../../../../../chapter-09/recipe-06/cxx-example/account/implementation/cpp_implementation.cpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-03/cxx-example/account/implementation/cpp_implementation.hpp: -------------------------------------------------------------------------------- 1 | ../../../../../chapter-09/recipe-06/cxx-example/account/implementation/cpp_implementation.hpp -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/recipe-03/cxx-example/tests/leaky.cpp: -------------------------------------------------------------------------------- 1 | #include "buggy.hpp" 2 | 3 | int main() { 4 | int return_code = function_leaky(); 5 | return return_code; 6 | } 7 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/fetch-content/configure.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cmake -B build/debug -G Ninja -DCMAKE_BUILD_TYPE=Debug 4 | cmake -B build/release -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/nested-dependencies/library/lib-b/configure-build-install.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cmake -B build -DCMAKE_INSTALL_PREFIX=./install 4 | cmake --build build --target install 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/nested-dependencies/library/lib-b/configure-build-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cmake -B build -DCMAKE_INSTALL_PREFIX=./install 4 | cmake --build build --target install 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~《An Introduction to Modern CMake》~中文版/codes/root-usefile/SimpleExample.cxx: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | TLorentzVector v(1,2,3,4); 5 | v.Print(); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /99~参考资料/2016~全网最细的 CMake 教程/codes/Demo4/math/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 查找当前目录下的所有源文件 2 | # 并将名称保存到 DIR_LIB_SRCS 变量 3 | aux_source_directory(. DIR_LIB_SRCS) 4 | 5 | # 指定生成 MathFunctions 链接库 6 | add_library (MathFunctions ${DIR_LIB_SRCS}) -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/B-hello-headers/include/Hello.h: -------------------------------------------------------------------------------- 1 | #ifndef __HELLO_H__ 2 | #define __HELLO_H__ 3 | 4 | class Hello 5 | { 6 | public: 7 | void print(); 8 | }; 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/B-hello-headers/src/Hello.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "Hello.h" 4 | 5 | void Hello::print() 6 | { 7 | std::cout << "Hello Headers!" << std::endl; 8 | } 9 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-01/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-01/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-02/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-02/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-03/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-03/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-09/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-09/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-02/recipe-03/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-02/recipe-03/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-05/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-05/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-06/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-06/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-07/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-07/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-09/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-09/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-03/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-03/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-08/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-08/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-01/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-01/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-06/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-06/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-08/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-08/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-09/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-09/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-06/recipe-04/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-06/recipe-04/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-07/cxx-example/src/parser/parser.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | std::tuple parse_arguments(int argc, char *argv[]); 6 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/recipe-04/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/recipe-04/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/recipe-05/cxx-example/menu.yml: -------------------------------------------------------------------------------- 1 | # Fails to generate imported target for UUID 2 | circle-pgi: 3 | skip_generators: 4 | - 'Unix Makefiles' 5 | - 'Ninja' 6 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/recipe-01/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/recipe-01/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/recipe-06/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-09/recipe-06/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-03/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-03/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-03/cxx-example/account/interface_file_names.cfg.in: -------------------------------------------------------------------------------- 1 | [configuration] 2 | header_file_name = account.h 3 | library_file_name = $ 4 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-03/fortran-example/account/interface_file_names.cfg.in: -------------------------------------------------------------------------------- 1 | [configuration] 2 | header_file_name = account.h 3 | library_file_name = $ 4 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-13/recipe-02/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-13/recipe-02/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/recipe-03/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/recipe-03/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/testing/dependencies/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/testing/dependencies/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/fetch-content/configure.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cmake -B build/debug -G Ninja -DCMAKE_BUILD_TYPE=Debug 4 | cmake -B build/release -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/nested-dependencies/library/lib-b/lib-b-config.cmake.in: -------------------------------------------------------------------------------- 1 | include(CMakeFindDependencyMacro) 2 | find_dependency(lib-a) 3 | include(${CMAKE_CURRENT_LIST_DIR}/lib-b-targets.cmake) 4 | -------------------------------------------------------------------------------- /99~参考资料/2016~全网最细的 CMake 教程/codes/Demo3/math/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 查找当前目录下的所有源文件 2 | # 并将名称保存到 DIR_LIB_SRCS 变量 3 | aux_source_directory(. DIR_LIB_SRCS) 4 | 5 | # 指定生成 MathFunctions 链接库 6 | add_library (MathFunctions ${DIR_LIB_SRCS}) 7 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/B-hello-headers/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/C-static-library/include/static/Hello.h: -------------------------------------------------------------------------------- 1 | #ifndef __HELLO_H__ 2 | #define __HELLO_H__ 3 | 4 | class Hello 5 | { 6 | public: 7 | void print(); 8 | }; 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/D-shared-library/include/shared/Hello.h: -------------------------------------------------------------------------------- 1 | #ifndef __HELLO_H__ 2 | #define __HELLO_H__ 3 | 4 | class Hello 5 | { 6 | public: 7 | void print(); 8 | }; 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/E-installing/include/installing/Hello.h: -------------------------------------------------------------------------------- 1 | #ifndef __HELLO_H__ 2 | #define __HELLO_H__ 3 | 4 | class Hello 5 | { 6 | public: 7 | void print(); 8 | }; 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/E-installing/src/Hello.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "installing/Hello.h" 4 | 5 | void Hello::print() 6 | { 7 | std::cout << "Hello Install!" << std::endl; 8 | } 9 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/04-static-analysis/cppcheck/subproject1/main1.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | std::cout << "Hello Main1!" << std::endl; 6 | return 0; 7 | } -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-02/recipe-04/abstract.md: -------------------------------------------------------------------------------- 1 | This recipe shows how to detect on which host processor architecture we are 2 | building and which bit addressing is supported by the platform. 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-05/cxx-example/test.cpp: -------------------------------------------------------------------------------- 1 | #include "leaky_implementation.hpp" 2 | 3 | int main() { 4 | int return_code = do_some_work(); 5 | 6 | return return_code; 7 | } 8 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-08/using-cost-example/test/a.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import time 3 | 4 | # wait for 0.5 seconds 5 | time.sleep(0.5) 6 | 7 | # finally report success 8 | sys.exit(0) 9 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-08/using-cost-example/test/e.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import time 3 | 4 | # wait for 1.5 seconds 5 | time.sleep(1.5) 6 | 7 | # finally report success 8 | sys.exit(0) 9 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-08/using-cost-example/test/h.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import time 3 | 4 | # wait for 2.5 seconds 5 | time.sleep(2.5) 6 | 7 | # finally report success 8 | sys.exit(0) 9 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-08/using-cost-example/test/i.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import time 3 | 4 | # wait for 3.5 seconds 5 | time.sleep(3.5) 6 | 7 | # finally report success 8 | sys.exit(0) 9 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-08/using-cost-example/test/j.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import time 3 | 4 | # wait for 4.5 seconds 5 | time.sleep(4.5) 6 | 7 | # finally report success 8 | sys.exit(0) 9 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-09/example/test/benchmark-a.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import time 3 | 4 | # wait for 0.5 seconds 5 | time.sleep(0.5) 6 | 7 | # finally report success 8 | sys.exit(0) 9 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-09/example/test/feature-a.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import time 3 | 4 | # wait for 0.1 seconds 5 | time.sleep(0.1) 6 | 7 | # finally report success 8 | sys.exit(0) 9 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/components/library/phrases-config.cmake.in: -------------------------------------------------------------------------------- 1 | foreach(component ${@PROJECT_NAME@_FIND_COMPONENTS}) 2 | include(${CMAKE_CURRENT_LIST_DIR}/${component}-config.cmake) 3 | endforeach() 4 | -------------------------------------------------------------------------------- /99~参考资料/2018~cmake-project-template/codes/.idea/dictionaries/kig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | gredeskoul 5 | 6 | 7 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/F-build-type/cmake-gui-build-type.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/F-build-type/cmake-gui-build-type.png -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/04-static-analysis/clang-analyzer/run_test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | mkdir -p build \ 3 | && cd build \ 4 | && scan-build-3.6 -o scanbuildout cmake .. \ 5 | && scan-build-3.6 -o scanbuildout make 6 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/04-static-analysis/clang-analyzer/subproject1/main1.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | std::cout << "Hello Main1!" << std::endl; 6 | return 0; 7 | } -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/04-static-analysis/clang-format/subproject1/main1.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char* argv[]) 4 | { 5 | std::cout << "Hello Main1!" << std::endl; 6 | return 0; 7 | } -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-08/cxx-example/geometry_circle.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace geometry { 4 | namespace area { 5 | double circle(double area); 6 | } 7 | } // namespace geometry 8 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-08/cxx-example/geometry_square.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace geometry { 4 | namespace area { 5 | double square(double l); 6 | } 7 | } // namespace geometry 8 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-08/without-cost-example/test/a.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import time 3 | 4 | # wait for 0.5 seconds 5 | time.sleep(0.5) 6 | 7 | # finally report success 8 | sys.exit(0) 9 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-08/without-cost-example/test/e.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import time 3 | 4 | # wait for 1.5 seconds 5 | time.sleep(1.5) 6 | 7 | # finally report success 8 | sys.exit(0) 9 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-08/without-cost-example/test/h.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import time 3 | 4 | # wait for 2.5 seconds 5 | time.sleep(2.5) 6 | 7 | # finally report success 8 | sys.exit(0) 9 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-08/without-cost-example/test/i.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import time 3 | 4 | # wait for 3.5 seconds 5 | time.sleep(3.5) 6 | 7 | # finally report success 8 | sys.exit(0) 9 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-08/without-cost-example/test/j.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import time 3 | 4 | # wait for 4.5 seconds 5 | time.sleep(4.5) 6 | 7 | # finally report success 8 | sys.exit(0) 9 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-06/abstract.md: -------------------------------------------------------------------------------- 1 | We will show how to deprecate CMake functions, macros, and variables. This can 2 | be quite helpful when modernizing your CMake-based build system. 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-09/fortran-example/src/parser/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(parser "") 2 | 3 | target_sources(parser 4 | PUBLIC 5 | ${CMAKE_CURRENT_LIST_DIR}/parser.f90 6 | ) 7 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-03/fortran-example/account/implementation/fortran_implementation.f90: -------------------------------------------------------------------------------- 1 | ../../../../../chapter-09/recipe-06/fortran-example/account/implementation/fortran_implementation.f90 -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-04/cxx-example/example.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | std::cout << "hello from your conda package!" << std::endl; 5 | 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/recipe-03/cxx-example/tests/use_after_free.cpp: -------------------------------------------------------------------------------- 1 | #include "buggy.hpp" 2 | 3 | int main() { 4 | int return_code = function_use_after_free(); 5 | return return_code; 6 | } 7 | -------------------------------------------------------------------------------- /99~参考资料/2020~通过例子学习 CMake/02~sub-projects/A-basic/sublibrary1/include/sublib1/sublib1.h: -------------------------------------------------------------------------------- 1 | #ifndef __SUBLIB_1_H__ 2 | #define __SUBLIB_1_H__ 3 | 4 | class sublib1 5 | { 6 | public: 7 | void print(); 8 | }; 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-5-Test/run.sh: -------------------------------------------------------------------------------- 1 | # 自动化编译和运行的脚本 2 | rm -rf build 3 | mkdir build 4 | cd build/ 5 | cmake .. 6 | make # 使用并行编译会失败,https://blog.csdn.net/clarkness/article/details/86633681 7 | cd ../bin 8 | ./test5 -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-6-Test/README.md: -------------------------------------------------------------------------------- 1 | [Cmake命令之add_subdirectory介绍](https://www.jianshu.com/p/07acea4e86a3) 2 | 3 | 只有一个动态库subadd,另外生成一个引用该库的可执行文件main。 4 | 5 | 涉及到使用ADD_SUBDIRECTORY实现多个cmakelists的调用。 6 | 7 | -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-7-Test/run.sh: -------------------------------------------------------------------------------- 1 | # 自动化编译和运行的脚本 2 | rm -rf build 3 | mkdir build 4 | cd build/ 5 | cmake .. 6 | make # 使用并行编译会失败,https://blog.csdn.net/clarkness/article/details/86633681 7 | cd ../bin 8 | ./main -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-8-Test/run.sh: -------------------------------------------------------------------------------- 1 | # 自动化编译和运行的脚本 2 | rm -rf build 3 | mkdir build 4 | cd build/ 5 | cmake .. 6 | make # 使用并行编译会失败,https://blog.csdn.net/clarkness/article/details/86633681 7 | cd ../bin 8 | ./main -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/C-static-library/src/Hello.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "static/Hello.h" 4 | 5 | void Hello::print() 6 | { 7 | std::cout << "Hello Static Library!" << std::endl; 8 | } 9 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/D-shared-library/src/Hello.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "shared/Hello.h" 4 | 5 | void Hello::print() 6 | { 7 | std::cout << "Hello Shared Library!" << std::endl; 8 | } 9 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-04/abstract.md: -------------------------------------------------------------------------------- 1 | This recipe demonstrates how to use the [`if-else-endif`](https://cmake.org/cmake/help/latest/command/if.html) conditional construct in `CMakeLists.txt`. 2 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-09/abstract.md: -------------------------------------------------------------------------------- 1 | In this recipe, we present strategies to only run a selected subset of tests, 2 | either by their label, their name (regular expression), or their number. 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-01/cxx-example/menu.yml: -------------------------------------------------------------------------------- 1 | # Compiler errors due to some undefined alignment primitive 2 | circle-pgi: 3 | skip_generators: 4 | - 'Unix Makefiles' 5 | - 'Ninja' 6 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-09/fortran-example/src/initial/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(initial "") 2 | 3 | target_sources(initial 4 | PUBLIC 5 | ${CMAKE_CURRENT_LIST_DIR}/initial.f90 6 | ) 7 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-01/abstract.md: -------------------------------------------------------------------------------- 1 | We show how to use CPack to generate source and binary packages. 2 | We discuss the creation of native binary packages for GNU/Linux, macOS, and Windows. 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-02/cxx-example/account/__init__.py: -------------------------------------------------------------------------------- 1 | from .version import __version__ 2 | from .account import Account 3 | 4 | __all__ = [ 5 | '__version__', 6 | 'Account', 7 | ] 8 | -------------------------------------------------------------------------------- /99~参考资料/2020~通过例子学习 CMake/02~sub-projects/A-basic/sublibrary1/src/sublib1.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "sublib1/sublib1.h" 4 | 5 | void sublib1::print() 6 | { 7 | std::cout << "Hello sub-library 1!" << std::endl; 8 | } 9 | -------------------------------------------------------------------------------- /99~参考资料/2021~BrightXiaoHan~CMake 中文实战教程/05~编写 CUDA 应用程序/codes/imgs/cmake_cuda_support.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2021~BrightXiaoHan~CMake 中文实战教程/05~编写 CUDA 应用程序/codes/imgs/cmake_cuda_support.png -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/static-versioned/library-1.0.0/include/useless/calculator.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace calc 6 | { 7 | int64_t square(int64_t value); 8 | } // namespace calc -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-6-Test/main.cpp: -------------------------------------------------------------------------------- 1 | #include "add.h" 2 | #include 3 | 4 | int main() 5 | { 6 | int x = 3; 7 | int y = 5; 8 | add(x, y); 9 | std::cout << "end." << std::endl; 10 | } -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/04-static-analysis/cppcheck-compile-commands/subproject1/main1.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | std::cout << "Hello Main1!" << std::endl; 6 | return 0; 7 | } -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-08/cxx-example/geometry_rhombus.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace geometry { 4 | namespace area { 5 | double rhombus(double d1, double d2); 6 | } 7 | } // namespace geometry 8 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-02/recipe-06/abstract.md: -------------------------------------------------------------------------------- 1 | This recipe shows how to enable vectorization to speed up a simple executable 2 | using the [Eigen C++ library](http://eigen.tuxfamily.org) for linear algebra. 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-01/cxx-example/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-01/cxx-example/.DS_Store -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-07/cxx-example/asan-example.cpp: -------------------------------------------------------------------------------- 1 | int main(int argc, char **argv) { 2 | int stack_array[100]; 3 | stack_array[1] = 0; 4 | return stack_array[argc + 100]; // BOOM 5 | } 6 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-03/abstract.md: -------------------------------------------------------------------------------- 1 | Elaborating on [Recipe 7 in Chapter 5](../../chapter-05/recipe-07), we will show 2 | how to write a function to test and set compiler flags for your project. 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-09/fortran-example/external/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(conversion "") 2 | 3 | target_sources(conversion 4 | PUBLIC 5 | ${CMAKE_CURRENT_LIST_DIR}/conversion.f90 6 | ) 7 | -------------------------------------------------------------------------------- /99~参考资料/2022~《An Introduction to Modern CMake》~中文版/codes/extended-project/apps/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(app app.cpp) 2 | target_compile_features(app PRIVATE cxx_std_17) 3 | 4 | target_link_libraries(app PRIVATE modern_library fmt::fmt) 5 | -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/gtest-sample/third_party/gtest/.clang-format: -------------------------------------------------------------------------------- 1 | # Run manually to reformat a file: 2 | # clang-format -i --style=file 3 | Language: Cpp 4 | BasedOnStyle: Google 5 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/04-static-analysis/clang-analyzer/subproject1/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Set the project name 2 | project (subproject1) 3 | 4 | # Add an executable with the above sources 5 | add_executable(${PROJECT_NAME} main1.cpp) 6 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/04-static-analysis/clang-analyzer/subproject2/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Set the project name 2 | project (subproject2) 3 | 4 | # Add an executable with the above sources 5 | add_executable(${PROJECT_NAME} main2.cpp) 6 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/04-static-analysis/clang-format/subproject1/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Set the project name 2 | project (subproject1) 3 | 4 | # Add an executable with the above sources 5 | add_executable(${PROJECT_NAME} main1.cpp) 6 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/04-static-analysis/clang-format/subproject2/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Set the project name 2 | project (subproject2) 3 | 4 | # Add an executable with the above sources 5 | add_executable(${PROJECT_NAME} main2.cpp) 6 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-08/cxx-example/geometry_polygon.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace geometry { 4 | namespace area { 5 | double polygon(int nSides, double side); 6 | } 7 | } // namespace geometry 8 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-09/cxx-example-asan/asan-example.cpp: -------------------------------------------------------------------------------- 1 | int main(int argc, char **argv) { 2 | int stack_array[100]; 3 | stack_array[1] = 0; 4 | return stack_array[argc + 100]; // BOOM 5 | } 6 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/superbuild/configure.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cmake -B build/debug -G Ninja -DCMAKE_BUILD_TYPE=Debug -DSUPERBUILD=ON 4 | cmake -B build/release -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSUPERBUILD=ON 5 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/superbuild/configure.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cmake -B build/debug -G Ninja -DCMAKE_BUILD_TYPE=Debug -DSUPERBUILD=ON 4 | cmake -B build/release -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSUPERBUILD=ON 5 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/B-hello-headers/cmake-build-debug/.ninja_deps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/B-hello-headers/cmake-build-debug/.ninja_deps -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/B-hello-headers/cmake-build-debug/hello_headers: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/B-hello-headers/cmake-build-debug/hello_headers -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/02-sub-projects/A-basic/sublibrary1/include/sublib1/sublib1.h: -------------------------------------------------------------------------------- 1 | #ifndef __SUBLIB_1_H__ 2 | #define __SUBLIB_1_H__ 3 | 4 | class sublib1 5 | { 6 | public: 7 | void print(); 8 | }; 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/02-sub-projects/A-basic/sublibrary1/src/sublib1.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "sublib1/sublib1.h" 4 | 5 | void sublib1::print() 6 | { 7 | std::cout << "Hello sub-library 1!" << std::endl; 8 | } 9 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-04/abstract.md: -------------------------------------------------------------------------------- 1 | Boost test is a popular unit testing framework in the C++ community, and in 2 | this example, we demonstrate how to unit test a simple example code using Boost 3 | test. 4 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-08/recipe-01/cxx-example/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5 FATAL_ERROR) 2 | 3 | project(recipe-01_core LANGUAGES CXX) 4 | 5 | add_executable(hello-world hello-world.cpp) 6 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-13/recipe-02/abstract.md: -------------------------------------------------------------------------------- 1 | We show how to cross-compile an executable using [OpenMP](https://www.openmp.org/) threading from GNU/Linux to Windows. 2 | Both a C++ and a Fortran example are given. 3 | -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/subdirectory/project1/project1.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Wiki on 2021/2/17. 3 | // 4 | 5 | #include "project1.h" 6 | 7 | std::string Project1::GetName() { 8 | return "Project1"; 9 | } -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/subdirectory/project3/project3.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Wiki on 2021/2/17. 3 | // 4 | 5 | #include "project3.h" 6 | 7 | std::string Project3::GetName() { 8 | return "Project3"; 9 | } -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-06/recipe-03/README.md: -------------------------------------------------------------------------------- 1 | # Generating source code at build time using Python 2 | 3 | In this example, we generate C++ code 4 | by using Python at build time. 5 | 6 | 7 | - [cxx-example](cxx-example/) 8 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-07/cxx-example/external/README.md: -------------------------------------------------------------------------------- 1 | This library is artificially placed into "external" to simulate 2 | depending on a library which is not defined in the same CMake directory scope (src). 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-08/cxx-example/external/README.md: -------------------------------------------------------------------------------- 1 | This library is artificially placed into "external" to simulate 2 | depending on a library which is not defined in the same CMake directory scope (src). 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-09/fortran-example/external/README.md: -------------------------------------------------------------------------------- 1 | This library is artificially placed into "external" to simulate 2 | depending on a library which is not defined in the same CMake directory scope (src). 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-05/abstract.md: -------------------------------------------------------------------------------- 1 | We show how to package a C++ executable depending on the [MKL](https://en.wikipedia.org/wiki/Math_Kernel_Library) linear algebra libraries using [Conda](https://conda.io). 2 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/static-versioned/library-2.0.0/include/useless/calculator.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace calc 6 | { 7 | void square(int64_t value_in, int64_t& value_out); 8 | } // namespace calc -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/L-cpp-standard/i-common-method/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | auto message = "Hello C++11"; 6 | std::cout << message << std::endl; 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/L-cpp-standard/ii-cxx-standard/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | auto message = "Hello C++11"; 6 | std::cout << message << std::endl; 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/04-static-analysis/cppcheck-compile-commands/subproject1/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Set the project name 2 | project (subproject1) 3 | 4 | # Add an executable with the above sources 5 | add_executable(${PROJECT_NAME} main1.cpp) 6 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/04-static-analysis/cppcheck-compile-commands/subproject2/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Set the project name 2 | project (subproject2) 3 | 4 | # Add an executable with the above sources 5 | add_executable(${PROJECT_NAME} main2.cpp) 6 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-01/cxx-example/cmake/coffee.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-11/recipe-01/cxx-example/cmake/coffee.icns -------------------------------------------------------------------------------- /99~参考资料/2020~通过例子学习 CMake/02~sub-projects/A-basic/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 3.5) 2 | 3 | project(subprojects) 4 | 5 | # Add sub directories 6 | add_subdirectory(sublibrary1) 7 | add_subdirectory(sublibrary2) 8 | add_subdirectory(subbinary) 9 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/header-only-defines/application/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "favorite-color/color.h" 4 | 5 | int main(int, char**) 6 | { 7 | printf("%s\n", color::favorite()); 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /99~参考资料/2023-CMakeLists 模板系统/codes/CMakeLists-5-Test/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "add.h" 2 | #include "mul.h" 3 | #include 4 | 5 | int main() 6 | { 7 | printf("3 + 5 = %d\n", add(3, 5)); 8 | printf("3 * 5 = %d\n", mul(3, 5)); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/gtest-sample/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.17) 2 | project(test) 3 | add_executable(${PROJECT_NAME} main.cpp test.cpp) 4 | target_link_libraries(${PROJECT_NAME} gtest src) -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/01-basic/L-cpp-standard/iii-compile-features/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | auto message = "Hello C++11"; 6 | std::cout << message << std::endl; 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/04-static-analysis/cppcheck/subproject2/main2.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | std::cout << "Hello Main2!" << std::endl; 6 | char tmp[10]; 7 | tmp[11] = 's'; 8 | return 0; 9 | } -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-01/recipe-09/cxx-example/Animal.cpp: -------------------------------------------------------------------------------- 1 | #include "Animal.hpp" 2 | 3 | #include 4 | 5 | Animal::Animal(const std::string &n) : name_(n) {} 6 | 7 | std::string Animal::name() const { return name_impl(); } 8 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-03/recipe-01/abstract.md: -------------------------------------------------------------------------------- 1 | We will introduce the [`find_package`](https://cmake.org/cmake/help/latest/command/find_package.html) CMake command and use it to detect a 2 | working Python interpreter on the system. 3 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-09/abstract.md: -------------------------------------------------------------------------------- 1 | We show how to rewrite conditionals into [`generator expressions`]. 2 | 3 | [`generator expressions`]: https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html 4 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-07/recipe-07/cxx-example/src/evolution/evolution.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | std::vector evolve(const std::vector row, const std::string rule_binary); 7 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/recipe-03/fortran-example/tests/leaky.f90: -------------------------------------------------------------------------------- 1 | program test 2 | use buggy, only: function_leaky 3 | implicit none 4 | 5 | if (function_leaky() /= 0) then 6 | error stop 7 | end if 8 | end program 9 | -------------------------------------------------------------------------------- /99~参考资料/2021~BrightXiaoHan~CMake 中文实战教程/06.编写 Python 的 C 或 C++ 扩展/examples/stub.cc: -------------------------------------------------------------------------------- 1 | #define PY_SSIZE_T_CLEAN 2 | #include 3 | 4 | extern PyObject* initModule(); 5 | 6 | PyMODINIT_FUNC 7 | PyInit_matrix(void) 8 | { 9 | return initModule(); 10 | } -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-04/recipe-01/cxx-example/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | EXECUTABLE=$1 4 | 5 | OUTPUT=$($EXECUTABLE 1 2 3 4) 6 | 7 | if [ "$OUTPUT" = "10" ] 8 | then 9 | exit 0 10 | else 11 | exit 1 12 | fi 13 | -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-03/cxx-example/wrap_BLAS_LAPACK.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wx-chevalier/CMake-Notes/master/99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-05/recipe-03/cxx-example/wrap_BLAS_LAPACK.tar.gz -------------------------------------------------------------------------------- /99~参考资料/2020~《CMake Cookbook | CMake 完整使用教程》/codes/chapter-14/recipe-01/cxx-example/CTestConfig.cmake: -------------------------------------------------------------------------------- 1 | set(CTEST_DROP_METHOD "http") 2 | set(CTEST_DROP_SITE "my.cdash.org") 3 | set(CTEST_DROP_LOCATION "/submit.php?project=cmake-cookbook") 4 | set(CTEST_DROP_SITE_CDASH TRUE) 5 | -------------------------------------------------------------------------------- /99~参考资料/2021~BrightXiaoHan~CMake 中文实战教程/03.安装/codes/test_folder/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(TestInstallation) 2 | cmake_minimum_required(VERSION 3.5) 3 | 4 | find_package(MyMath 1.0) 5 | 6 | add_executable(mymathApp mymathApp.cc) 7 | target_link_libraries(mymathApp MyMath::mymath) -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/core/header-only/application/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "calculator/calculator.h" 4 | 5 | int main(int argc, char** argv) 6 | { 7 | std::cout << calc::add(4, 6) << "\n"; 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/core/shared/application/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "calculator-shared/calculator.h" 4 | 5 | int main(int argc, char** argv) 6 | { 7 | std::cout << calc_pow(5, 5) << "\n"; 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/core/static/application/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "calculator-static/calculator.h" 4 | 5 | int main(int argc, char** argv) 6 | { 7 | std::cout << calc::square(4) << "\n"; 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /99~参考资料/2022~cmake-examples/codes/examples/more/static-auto-install/application/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "calculator-static/calculator.h" 4 | 5 | int main(int argc, char** argv) 6 | { 7 | std::cout << calc::square(4) << "\n"; 8 | return 0; 9 | } -------------------------------------------------------------------------------- /03~外部库和程序/99~参考资料/2020~CMake 添加第三方库依赖 find_library、FetchContent、CPM 等/codes/gtest-sample/test/main.cpp: -------------------------------------------------------------------------------- 1 | #include "gtest/gtest.h" 2 | #include "add.h" 3 | 4 | int main(int argc, char **argv) { 5 | testing::InitGoogleTest(&argc, argv); 6 | return RUN_ALL_TESTS(); 7 | } 8 | -------------------------------------------------------------------------------- /99~参考资料/2019~ttroy50~cmake-examples/codes/02-sub-projects/A-basic/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 3.5) 2 | 3 | project(subprojects) 4 | 5 | # Add sub directories 6 | add_subdirectory(sublibrary1) 7 | add_subdirectory(sublibrary2) 8 | add_subdirectory(subbinary) 9 | --------------------------------------------------------------------------------