{"id":36686,"date":"2019-10-31T22:13:09","date_gmt":"2019-10-31T19:13:09","guid":{"rendered":"https:\/\/prohoster.info\/blog\/cmake-i-c-bratya-navek\/"},"modified":"2019-10-31T22:13:09","modified_gmt":"2019-10-31T19:13:09","slug":"cmake-i-c-bratya-navek","status":"publish","type":"post","link":"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/cmake-i-c-bratya-navek","title":{"rendered":"CMake und C++ \u2014 f\u00fcr immer Br\u00fcder","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><img decoding=\"async\" alt=\"CMake \u0438 C++ &mdash; \u0431\u0440\u0430\u0442\u044c\u044f \u043d\u0430\u0432\u0435\u043a\" src=\"\/wp-content\/uploads\/2019\/07\/1f675752bc01725a3ef0a3c0392d9210.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u044f \u043b\u044e\u0431\u043b\u044e \u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b, \u0440\u0435\u0436\u0438\u043c\u044b \u0441\u0431\u043e\u0440\u043a\u0438, \u0432\u0435\u0440\u0441\u0438\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437, \u0437\u0430\u043c\u0435\u0440\u044f\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0438 \u0442.\u0434. \u0418 \u043e\u0447\u0435\u043d\u044c \u043b\u044e\u0431\u043b\u044e CMake, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043c\u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0451 \u0442\u043e, \u0447\u0442\u043e \u044f \u0445\u043e\u0447\u0443.<\/p>\n<p><\/p>\n<p>\u041c\u043d\u043e\u0433\u0438\u0435 \u0440\u0443\u0433\u0430\u044e\u0442 CMake, \u0438 \u0447\u0430\u0441\u0442\u043e \u0437\u0430\u0441\u043b\u0443\u0436\u0435\u043d\u043d\u043e, \u043d\u043e \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u0442\u043e \u043d\u0435 \u0432\u0441\u0451 \u0442\u0430\u043a \u043f\u043b\u043e\u0445\u043e, \u0430 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f <strong>\u043e\u0447\u0435\u043d\u044c \u0434\u0430\u0436\u0435 \u043d\u0435\u043f\u043b\u043e\u0445\u043e<\/strong>, \u0438 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u0432\u043f\u043e\u043b\u043d\u0435 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u043e\u0435.<\/p>\n<p><\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0437\u0430\u043c\u0435\u0442\u043a\u0435 \u044f \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 C++ \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 CMake, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c:<\/p>\n<p><\/p>\n<ol>\n<li>\u0421\u0431\u043e\u0440\u043a\u0443;<\/li>\n<li>\u0410\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a \u0442\u0435\u0441\u0442\u043e\u0432;<\/li>\n<li>\u0417\u0430\u043c\u0435\u0440 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u043a\u043e\u0434\u0430;<\/li>\n<li>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443;<\/li>\n<li>\u0410\u0432\u0442\u043e\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435;<\/li>\n<li>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u043e\u043d\u043b\u0430\u0439\u043d-\u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u044b;<\/li>\n<li>\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437.<\/li>\n<\/ol>\n<p><\/p>\n<blockquote><p>\u041a\u0442\u043e \u0438 \u0442\u0430\u043a \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u043b\u044e\u0441\u0430\u0445 \u0438 \u0441\u0438-\u043c\u0435\u0439\u043a\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/izvolov\/mylib\">\u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a><\/noindex> \u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p><\/blockquote>\n<p><noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><br \/>\n<noindex><a rel=\"nofollow\" name=\"contents\"><\/a><\/noindex><\/p>\n<h2>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/h2>\n<p><\/p>\n<ol>\n<li><noindex><a rel=\"nofollow\" href=\"#project-from-the-inside\">\u041f\u0440\u043e\u0435\u043a\u0442 \u0438\u0437\u043d\u0443\u0442\u0440\u0438<\/a><\/noindex>\n<ol>\n<li><noindex><a rel=\"nofollow\" href=\"#project-structure\">\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a><\/noindex><\/li>\n<li><noindex><a rel=\"nofollow\" href=\"#cmakeliststxt\">\u0413\u043b\u0430\u0432\u043d\u044b\u0439 CMake-\u0444\u0430\u0439\u043b (.\/CMakeLists.txt)<\/a><\/noindex>\n<ol>\n<li><noindex><a rel=\"nofollow\" href=\"#project-information\">\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0435<\/a><\/noindex><\/li>\n<li><noindex><a rel=\"nofollow\" href=\"#project-options\">\u041e\u043f\u0446\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a><\/noindex><\/li>\n<li><noindex><a rel=\"nofollow\" href=\"#compile-options\">\u041e\u043f\u0446\u0438\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438<\/a><\/noindex><\/li>\n<li><noindex><a rel=\"nofollow\" href=\"#main-target\">\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0446\u0435\u043b\u044c<\/a><\/noindex><\/li>\n<li><noindex><a rel=\"nofollow\" href=\"#installation\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/a><\/noindex><\/li>\n<li><noindex><a rel=\"nofollow\" href=\"#tests\">\u0422\u0435\u0441\u0442\u044b<\/a><\/noindex><\/li>\n<li><noindex><a rel=\"nofollow\" href=\"#documentation\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/a><\/noindex><\/li>\n<li><noindex><a rel=\"nofollow\" href=\"#online-sandbox\">\u041e\u043d\u043b\u0430\u0439\u043d-\u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0430<\/a><\/noindex><\/li>\n<\/ol>\n<\/li>\n<li><noindex><a rel=\"nofollow\" href=\"#testcmakeliststxt\">\u0421\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432 (test\/CMakeLists.txt)<\/a><\/noindex>\n<ol>\n<li><noindex><a rel=\"nofollow\" href=\"#testing\">\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/a><\/noindex><\/li>\n<li><noindex><a rel=\"nofollow\" href=\"#code-coverage\">\u041f\u043e\u043a\u0440\u044b\u0442\u0438\u0435<\/a><\/noindex><\/li>\n<\/ol>\n<\/li>\n<li><noindex><a rel=\"nofollow\" href=\"#doccmakeliststxt\">\u0421\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 (doc\/CMakeLists.txt)<\/a><\/noindex><\/li>\n<li><noindex><a rel=\"nofollow\" href=\"#onlinecmakeliststxt\">\u0421\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u043e\u043d\u043b\u0430\u0439\u043d-\u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u044b (online\/CMakeLists.txt)<\/a><\/noindex><\/li>\n<\/ol>\n<\/li>\n<li><noindex><a rel=\"nofollow\" href=\"#project-from-the-outside\">\u041f\u0440\u043e\u0435\u043a\u0442 \u0441\u043d\u0430\u0440\u0443\u0436\u0438<\/a><\/noindex>\n<ol>\n<li><noindex><a rel=\"nofollow\" href=\"#build\">\u0421\u0431\u043e\u0440\u043a\u0430<\/a><\/noindex>\n<ol>\n<li><noindex><a rel=\"nofollow\" href=\"#generate\">\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f<\/a><\/noindex><\/li>\n<li><noindex><a rel=\"nofollow\" href=\"#project-build\">\u0421\u0431\u043e\u0440\u043a\u0430<\/a><\/noindex><\/li>\n<\/ol>\n<\/li>\n<li><noindex><a rel=\"nofollow\" href=\"#options\">\u041e\u043f\u0446\u0438\u0438<\/a><\/noindex>\n<ol>\n<li><noindex><a rel=\"nofollow\" href=\"#MYLIB_COVERAGE\">MYLIB_COVERAGE<\/a><\/noindex><\/li>\n<li><noindex><a rel=\"nofollow\" href=\"#MYLIB_TESTING\">MYLIB_TESTING<\/a><\/noindex><\/li>\n<li><noindex><a rel=\"nofollow\" href=\"#MYLIB_DOXYGEN_LANGUAGE\">MYLIB_DOXYGEN_LANGUAGE<\/a><\/noindex><\/li>\n<\/ol>\n<\/li>\n<li><noindex><a rel=\"nofollow\" href=\"#build-targets\">\u0421\u0431\u043e\u0440\u043e\u0447\u043d\u044b\u0435 \u0446\u0435\u043b\u0438<\/a><\/noindex>\n<ol>\n<li><noindex><a rel=\"nofollow\" href=\"#default-target\">\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/a><\/noindex><\/li>\n<li><noindex><a rel=\"nofollow\" href=\"#mylib-unit-tests\">mylib-unit-tests<\/a><\/noindex><\/li>\n<li><noindex><a rel=\"nofollow\" href=\"#check\">check<\/a><\/noindex><\/li>\n<li><noindex><a rel=\"nofollow\" href=\"#coverage\">coverage<\/a><\/noindex><\/li>\n<li><noindex><a rel=\"nofollow\" href=\"#doc\">doc<\/a><\/noindex><\/li>\n<li><noindex><a rel=\"nofollow\" href=\"#wandbox\">wandbox<\/a><\/noindex><\/li>\n<\/ol>\n<\/li>\n<li><noindex><a rel=\"nofollow\" href=\"#examples\">\u041f\u0440\u0438\u043c\u0435\u0440\u044b<\/a><\/noindex><\/li>\n<\/ol>\n<\/li>\n<li><noindex><a rel=\"nofollow\" href=\"#tools\">\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b<\/a><\/noindex><\/li>\n<li><noindex><a rel=\"nofollow\" href=\"#static-analysis\">\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437<\/a><\/noindex><\/li>\n<li><noindex><a rel=\"nofollow\" href=\"#afterword\">\u041f\u043e\u0441\u043b\u0435\u0441\u043b\u043e\u0432\u0438\u0435<\/a><\/noindex><\/li>\n<\/ol>\n<p>\n<noindex><a rel=\"nofollow\" name=\"project-from-the-inside\"><\/a><\/noindex><\/p>\n<h2><noindex><a rel=\"nofollow\" href=\"#contents\">\u041f\u0440\u043e\u0435\u043a\u0442 \u0438\u0437\u043d\u0443\u0442\u0440\u0438<\/a><\/noindex><\/h2>\n<p>\n<noindex><a rel=\"nofollow\" name=\"project-structure\"><\/a><\/noindex><\/p>\n<h3 id=\"struktura-proektacontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a><\/noindex><\/h3>\n<p><\/p>\n<pre><code class=\"plaintext\">.\n\u251c\u2500\u2500 CMakeLists.txt\n\u251c\u2500\u2500 README.en.md\n\u251c\u2500\u2500 README.md\n\u251c\u2500\u2500 doc\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 CMakeLists.txt\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 Doxyfile.in\n\u251c\u2500\u2500 include\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 mylib\n\u2502\u00a0\u00a0     \u2514\u2500\u2500 myfeature.hpp\n\u251c\u2500\u2500 online\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 CMakeLists.txt\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 mylib-example.cpp\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 wandbox.py\n\u2514\u2500\u2500 test\n    \u251c\u2500\u2500 CMakeLists.txt\n    \u251c\u2500\u2500 mylib\n    \u2502\u00a0\u00a0 \u2514\u2500\u2500 myfeature.cpp\n    \u2514\u2500\u2500 test_main.cpp<\/code><\/pre>\n<p><\/p>\n<p>\u0413\u043b\u0430\u0432\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c CMake-\u0441\u043a\u0440\u0438\u043f\u0442\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d\u044b \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0439 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/izvolov\/mylib\">\u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430-\u0448\u0430\u0431\u043b\u043e\u043d\u0430<\/a><\/noindex>.<\/p>\n<p>\n<noindex><a rel=\"nofollow\" name=\"cmakeliststxt\"><\/a><\/noindex><\/p>\n<h3 id=\"glavnyy-cmake-fayl-cmakeliststxtcontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">\u0413\u043b\u0430\u0432\u043d\u044b\u0439 CMake-\u0444\u0430\u0439\u043b (.\/CMakeLists.txt)<\/a><\/noindex><\/h3>\n<p>\n<noindex><a rel=\"nofollow\" name=\"project-information\"><\/a><\/noindex><\/p>\n<h4 id=\"informaciya-o-proektecontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0435<\/a><\/noindex><\/h4>\n<p><\/p>\n<p>\u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u044b CMake. CMake \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u044b \u043a\u043e\u043c\u0430\u043d\u0434, \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445. \u0427\u0442\u043e\u0431\u044b CMake \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043d\u0438\u043c\u0430\u043b, \u0447\u0435\u0433\u043e \u043c\u044b \u043e\u0442 \u043d\u0435\u0433\u043e \u0445\u043e\u0442\u0438\u043c, \u043d\u0443\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u043a \u043d\u0435\u043c\u0443 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p><\/p>\n<pre><code class=\"cmake\">cmake_minimum_required(VERSION 3.13)<\/code><\/pre>\n<p><\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c \u043d\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442, \u0435\u0433\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435, \u0432\u0435\u0440\u0441\u0438\u044e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u044f\u0437\u044b\u043a\u0438 \u0438 \u043f\u0440\u043e\u0447\u0435\u0435 (\u0441\u043c. <noindex><a rel=\"nofollow\" href=\"https:\/\/cmake.org\/cmake\/help\/v3.8\/command\/project.html\"><code>\u043a\u043e\u043c\u0430\u043d\u0434\u0443 project<\/code><\/a><\/noindex>).<\/p>\n<p><\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u044f\u0437\u044b\u043a <code>CXX<\/code> (\u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442 C++), \u0447\u0442\u043e\u0431\u044b CMake \u043d\u0435 \u043d\u0430\u043f\u0440\u044f\u0433\u0430\u043b\u0441\u044f \u0438 \u043d\u0435 \u0438\u0441\u043a\u0430\u043b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u044f\u0437\u044b\u043a\u0430 C (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432 CMake \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0434\u0432\u0430 \u044f\u0437\u044b\u043a\u0430: C \u0438 C++).<\/p>\n<p><\/p>\n<pre><code class=\"cmake\">project(Mylib VERSION 1.0 LANGUAGES CXX)<\/code><\/pre>\n<p><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0432\u043a\u043b\u044e\u0447\u0451\u043d \u043b\u0438 \u043d\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u0434\u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u042d\u0442\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c.<\/p>\n<p><\/p>\n<pre><code class=\"cmake\">get_directory_property(IS_SUBPROJECT PARENT_DIRECTORY)<\/code><\/pre>\n<p>\n<noindex><a rel=\"nofollow\" name=\"project-options\"><\/a><\/noindex><\/p>\n<h4 id=\"opcii-proektacontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">\u041e\u043f\u0446\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a><\/noindex><\/h4>\n<p><\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0432\u0435 \u043e\u043f\u0446\u0438\u0438.<\/p>\n<p><\/p>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u043e\u043f\u0446\u0438\u044f \u2014 <noindex><a rel=\"nofollow\" href=\"#MYLIB_TESTING\"><code>MYLIB_TESTING<\/code><\/a><\/noindex> \u2014 \u0434\u043b\u044f \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u043c\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0441 \u0442\u0435\u0441\u0442\u0430\u043c\u0438 \u0432\u0441\u0451 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0430 \u043c\u044b \u0445\u043e\u0442\u0438\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u043b\u0438 \u0437\u0430\u043f\u0430\u043a\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442. \u0418\u043b\u0438 \u043d\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432\u043a\u043b\u044e\u0447\u0451\u043d \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u0434\u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u2014 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u0442\u0435\u0441\u0442\u044b. \u0412\u044b \u0436\u0435 \u043d\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u0442\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435\u0441\u044c?<\/p>\n<p><\/p>\n<pre><code class=\"cmake\">option(MYLIB_TESTING \"\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\" ON)<\/code><\/pre>\n<p><\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u043e\u043f\u0446\u0438\u044e <noindex><a rel=\"nofollow\" href=\"#MYLIB_COVERAGE\"><code>MYLIB_COVERAGE<\/code><\/a><\/noindex> \u0434\u043b\u044f \u0437\u0430\u043c\u0435\u0440\u043e\u0432 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u043a\u043e\u0434\u0430 \u0442\u0435\u0441\u0442\u0430\u043c\u0438, \u043d\u043e \u043e\u043d\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0435\u0451 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u044f\u0432\u043d\u043e.<\/p>\n<p><\/p>\n<pre><code class=\"cmake\">option(MYLIB_COVERAGE \"\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u043a\u043e\u0434\u0430 \u0442\u0435\u0441\u0442\u0430\u043c\u0438\" OFF)<\/code><\/pre>\n<p>\n<noindex><a rel=\"nofollow\" name=\"compile-options\"><\/a><\/noindex><\/p>\n<h4 id=\"opcii-kompilyaciicontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">\u041e\u043f\u0446\u0438\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438<\/a><\/noindex><\/h4>\n<p><\/p>\n<p>\u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u043c\u044b \u043a\u0440\u0443\u0442\u044b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b-\u043f\u043b\u044e\u0441\u043e\u0432\u0438\u043a\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0445\u043e\u0442\u0438\u043c \u043e\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u041d\u0438 \u043e\u0434\u043d\u0430 \u043c\u044b\u0448\u044c \u043d\u0435 \u043f\u0440\u043e\u0441\u043a\u043e\u0447\u0438\u0442.<\/p>\n<p><\/p>\n<pre><code class=\"cmake\">add_compile_options(\n    -Werror\n\n    -Wall\n    -Wextra\n    -Wpedantic\n\n    -Wcast-align\n    -Wcast-qual\n    -Wconversion\n    -Wctor-dtor-privacy\n    -Wenum-compare\n    -Wfloat-equal\n    -Wnon-virtual-dtor\n    -Wold-style-cast\n    -Woverloaded-virtual\n    -Wredundant-decls\n    -Wsign-conversion\n    -Wsign-promo\n)<\/code><\/pre>\n<p><\/p>\n<p>\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0442\u043e\u0436\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443 \u044f\u0437\u044b\u043a\u0430 C++. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432 CMake \u043e\u043d\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b.<\/p>\n<p><\/p>\n<pre><code class=\"cmake\">if(NOT CMAKE_CXX_EXTENSIONS)\n    set(CMAKE_CXX_EXTENSIONS OFF)\nendif()<\/code><\/pre>\n<p>\n<noindex><a rel=\"nofollow\" name=\"main-target\"><\/a><\/noindex><\/p>\n<h4 id=\"osnovnaya-celcontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0446\u0435\u043b\u044c<\/a><\/noindex><\/h4>\n<p><\/p>\n<p>\u041d\u0430\u0448\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u043c\u044b \u043d\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c \u043a\u0430\u043a\u0438\u043c-\u043b\u0438\u0431\u043e \u0432\u044b\u0445\u043b\u043e\u043f\u043e\u043c \u0432 \u0432\u0438\u0434\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438\u043b\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0441\u043d\u0430\u0440\u0443\u0436\u0438, \u0435\u0451 \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c, \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0435\u0451 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a \u0441\u0432\u043e\u0435\u043c\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0443, \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043d\u0435\u0439 \u0431\u044b\u043b\u0438 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u044b \u044d\u0442\u0438 \u0441\u0430\u043c\u044b\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430.<\/p>\n<p><\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0439 \u0446\u0435\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443.<\/p>\n<p><\/p>\n<pre><code class=\"cmake\">add_library(mylib INTERFACE)<\/code><\/pre>\n<p><\/p>\n<p>\u041f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u043a \u043d\u0430\u0448\u0435\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435.<\/p>\n<p><\/p>\n<p>\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435, \u043c\u043e\u0434\u043d\u043e\u0435, \u043c\u043e\u043b\u043e\u0434\u0451\u0436\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 CMake \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438, \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u0442.\u043f. \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043e\u0434\u043d\u0443 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0446\u0435\u043b\u044c. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c <noindex><a rel=\"nofollow\" href=\"https:\/\/cmake.org\/cmake\/help\/v3.8\/command\/target_link_libraries.html#libraries-for-a-target-and-or-its-dependents\"><code>target_link_libraries(target PRIVATE dependency)<\/code><\/a><\/noindex>, \u0438 \u0432\u0441\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0441 \u0446\u0435\u043b\u044c\u044e <code>dependency<\/code>, \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0434\u043b\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432, \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0449\u0438\u0445 \u0446\u0435\u043b\u0438 <code>target<\/code>. \u0418 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0438\u043a\u0430\u043a\u0438\u0445 <code>[target_]include_directories<\/code>. \u042d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u043d\u0438\u0436\u0435 \u043f\u0440\u0438 \u0440\u0430\u0437\u0431\u043e\u0440\u0435 <noindex><a rel=\"nofollow\" href=\"#testcmakeliststxt\">CMake-\u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0434\u043b\u044f \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432<\/a><\/noindex>.<\/p>\n<p><\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442.\u043d. <noindex><a rel=\"nofollow\" href=\"https:\/\/cmake.org\/cmake\/help\/v3.8\/manual\/cmake-generator-expressions.7.html\"><code>\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f-\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b: $&lt;...&gt;<\/code><\/a><\/noindex>.<\/p>\n<p><\/p>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u0442 \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0441 \u043d\u0430\u0448\u0435\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439, \u043f\u0440\u0438\u0447\u0451\u043c, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043d\u0430\u0448\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u043a \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0446\u0435\u043b\u0438 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0439 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 CMake, \u0442\u043e \u0441 \u043d\u0435\u0439 \u0431\u0443\u0434\u0443\u0442 \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0438\u0437 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>${CMAKE_CURRENT_SOURCE_DIR}\/include<\/code>, \u0430 \u0435\u0441\u043b\u0438 \u043d\u0430\u0448\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <noindex><a rel=\"nofollow\" href=\"https:\/\/cmake.org\/cmake\/help\/v3.8\/command\/find_package.html\"><code>find_package<\/code><\/a><\/noindex>, \u0442\u043e \u0441 \u043d\u0435\u0439 \u0431\u0443\u0434\u0443\u0442 \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0438\u0437 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>include<\/code> \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438.<\/p>\n<p><\/p>\n<pre><code class=\"cmake\">target_include_directories(mylib INTERFACE\n    $&lt;BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}\/include&gt;\n    $&lt;INSTALL_INTERFACE:include&gt;\n)<\/code><\/pre>\n<p><\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u044f\u0437\u044b\u043a\u0430. \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0441\u0430\u043c\u044b\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442, \u043d\u043e \u0438 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u043c \u0435\u0433\u043e \u043d\u0430 \u0442\u0435\u0445, \u043a\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443. \u042d\u0442\u043e \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u0437\u0430 \u0441\u0447\u0451\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u0435\u0442 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044e <code>INTERFACE<\/code> (\u0441\u043c. <noindex><a rel=\"nofollow\" href=\"https:\/\/cmake.org\/cmake\/help\/v3.8\/command\/target_compile_features.html\">\u043a\u043e\u043c\u0430\u043d\u0434\u0443 target_compile_features<\/a><\/noindex>).<\/p>\n<p><\/p>\n<pre><code class=\"cmake\">target_compile_features(mylib INTERFACE cxx_std_17)<\/code><\/pre>\n<p><\/p>\n<p>\u0417\u0430\u0432\u043e\u0434\u0438\u043c \u043f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u041f\u0440\u0438\u0447\u0451\u043c \u0434\u043b\u044f \u043a\u0440\u0430\u0441\u043e\u0442\u044b \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0432 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c &#171;\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0451\u043d&#187;. \u042d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0432 \u043d\u0430\u0448\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438, \u0438 \u043c\u044b \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0438\u0445 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430. <noindex><a rel=\"nofollow\" href=\"https:\/\/cmake.org\/cmake\/help\/v3.8\/module\/FindBoost.html\">\u041a\u0430\u043a \u0432 \u0411\u0443\u0441\u0442\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440<\/a><\/noindex>.<\/p>\n<p><\/p>\n<pre><code class=\"cmake\">add_library(Mylib::mylib ALIAS mylib)<\/code><\/pre>\n<p>\n<noindex><a rel=\"nofollow\" name=\"installation\"><\/a><\/noindex><\/p>\n<h4 id=\"ustanovkacontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/a><\/noindex><\/h4>\n<p><\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0430\u0448\u0438\u0445 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443. \u0422\u0443\u0442 \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e. \u0413\u043e\u0432\u043e\u0440\u0438\u043c, \u0447\u0442\u043e \u043f\u0430\u043f\u043a\u0430 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430\u043c\u0438 \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <code>include<\/code> \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0435\u0441\u0442\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438.<\/p>\n<p><\/p>\n<pre><code class=\"cmake\">install(DIRECTORY include\/mylib DESTINATION include)<\/code><\/pre>\n<p><\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0437\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>find_package(Mylib)<\/code> \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0446\u0435\u043b\u044c <code>Mylib::mylib<\/code>.<\/p>\n<p><\/p>\n<pre><code class=\"cmake\">install(TARGETS mylib EXPORT MylibConfig)\ninstall(EXPORT MylibConfig NAMESPACE Mylib:: DESTINATION share\/Mylib\/cmake)<\/code><\/pre>\n<p><\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0437\u0430\u043a\u043b\u0438\u043d\u0430\u043d\u0438\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u0442\u0430\u043a. \u041a\u043e\u0433\u0434\u0430 \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043c\u044b \u0432\u044b\u0437\u043e\u0432\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>find_package(Mylib 1.2.3 REQUIRED)<\/code>, \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0440\u0435\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0439 \u0441 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 <code>1.2.3<\/code>, CMake \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0443. \u0422\u043e \u0435\u0441\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/p>\n<p><\/p>\n<pre><code class=\"cmake\">include(CMakePackageConfigHelpers)\nwrite_basic_package_version_file(\"${PROJECT_BINARY_DIR}\/MylibConfigVersion.cmake\"\n    VERSION\n        ${PROJECT_VERSION}\n    COMPATIBILITY\n        AnyNewerVersion\n)\ninstall(FILES \"${PROJECT_BINARY_DIR}\/MylibConfigVersion.cmake\" DESTINATION share\/Mylib\/cmake)<\/code><\/pre>\n<p>\n<noindex><a rel=\"nofollow\" name=\"tests\"><\/a><\/noindex><\/p>\n<h4 id=\"testycontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">\u0422\u0435\u0441\u0442\u044b<\/a><\/noindex><\/h4>\n<p><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0442\u0435\u0441\u0442\u044b \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u044f\u0432\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <noindex><a rel=\"nofollow\" href=\"#MYLIB_TESTING\">\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043e\u043f\u0446\u0438\u0438<\/a><\/noindex> \u0438\u043b\u0438 \u043d\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0451\u043d \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 CMake-\u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <noindex><a rel=\"nofollow\" href=\"https:\/\/cmake.org\/cmake\/help\/v3.8\/command\/add_subdirectory.html\"><code>add_subdirectory<\/code><\/a><\/noindex>, \u043c\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0434\u0430\u043b\u044c\u0448\u0435 \u043f\u043e \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438, \u0438 \u0441\u043a\u0440\u0438\u043f\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432, \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p><\/p>\n<pre><code class=\"cmake\">if(NOT MYLIB_TESTING)\n    message(STATUS \"\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Mylib \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043e\")\nelseif(IS_SUBPROJECT)\n    message(STATUS \"Mylib \u043d\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043f\u043e\u0434\u043c\u043e\u0434\u0443\u043b\u044f\")\nelse()\n    add_subdirectory(test)\nendif()<\/code><\/pre>\n<p>\n<noindex><a rel=\"nofollow\" name=\"documentation\"><\/a><\/noindex><\/p>\n<h4 id=\"dokumentaciyacontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/a><\/noindex><\/h4>\n<p><\/p>\n<p>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u0434\u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p><\/p>\n<pre><code class=\"cmake\">if(NOT IS_SUBPROJECT)\n    add_subdirectory(doc)\nendif()<\/code><\/pre>\n<p>\n<noindex><a rel=\"nofollow\" name=\"online-sandbox\"><\/a><\/noindex><\/p>\n<h4 id=\"onlayn-pesochnicacontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">\u041e\u043d\u043b\u0430\u0439\u043d-\u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0430<\/a><\/noindex><\/h4>\n<p><\/p>\n<p>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u043e\u043d\u043b\u0430\u0439\u043d-\u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u044b \u0443 \u043f\u043e\u0434\u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0442\u043e\u0436\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.<\/p>\n<p><\/p>\n<pre><code class=\"cmake\">if(NOT IS_SUBPROJECT)\n    add_subdirectory(online)\nendif()<\/code><\/pre>\n<p>\n<noindex><a rel=\"nofollow\" name=\"testcmakeliststxt\"><\/a><\/noindex><\/p>\n<h3 id=\"skript-dlya-testov-testcmakeliststxtcontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">\u0421\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432 (test\/CMakeLists.txt)<\/a><\/noindex><\/h3>\n<p>\n<noindex><a rel=\"nofollow\" name=\"testing\"><\/a><\/noindex><\/p>\n<h4 id=\"testirovaniecontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/a><\/noindex><\/h4>\n<p><\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043f\u0430\u043a\u0435\u0442 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u043c (\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0441\u0432\u043e\u0439 \u043b\u044e\u0431\u0438\u043c\u044b\u0439).<\/p>\n<p><\/p>\n<pre><code class=\"cmake\">find_package(doctest 2.3.3 REQUIRED)<\/code><\/pre>\n<p><\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u0430\u0448 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b \u0441 \u0442\u0435\u0441\u0442\u0430\u043c\u0438. \u041e\u0431\u044b\u0447\u043d\u043e \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a \u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>main<\/code>.<\/p>\n<p><\/p>\n<pre><code class=\"cmake\">add_executable(mylib-unit-tests test_main.cpp)<\/code><\/pre>\n<p><\/p>\n<p>\u0410 \u0444\u0430\u0439\u043b\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0441\u0430\u043c\u0438 \u0442\u0435\u0441\u0442\u044b, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u043f\u043e\u0437\u0436\u0435. \u041d\u043e \u0442\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p><\/p>\n<pre><code class=\"cmake\">target_sources(mylib-unit-tests PRIVATE mylib\/myfeature.cpp)<\/code><\/pre>\n<p><\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u0443 \u043c\u044b \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c CMake-\u0446\u0435\u043b\u0438, \u0438 \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>target_include_directories<\/code>. \u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0438\u0437 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u0438 \u0438\u0437 \u043d\u0430\u0448\u0435\u0439 <code>Mylib::mylib<\/code>, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0431\u043e\u0440\u043a\u0438 (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u044f\u0437\u044b\u043a\u0430 C++) \u043f\u0440\u043e\u043b\u0435\u0437\u043b\u0438 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u044d\u0442\u0438\u043c\u0438 \u0446\u0435\u043b\u044f\u043c\u0438.<\/p>\n<p><\/p>\n<pre><code class=\"cmake\">target_link_libraries(mylib-unit-tests\n    PRIVATE\n        Mylib::mylib\n        doctest::doctest\n)<\/code><\/pre>\n<p><\/p>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0444\u0438\u043a\u0442\u0438\u0432\u043d\u0443\u044e \u0446\u0435\u043b\u044c, &#171;\u0441\u0431\u043e\u0440\u043a\u0430&#187; \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u0442\u0435\u0441\u0442\u043e\u0432, \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u044d\u0442\u0443 \u0446\u0435\u043b\u044c \u0432 \u0441\u0431\u043e\u0440\u043a\u0443 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e (\u0437\u0430 \u044d\u0442\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>ALL<\/code>). \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0441\u0431\u043e\u0440\u043a\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u0443\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a \u0442\u0435\u0441\u0442\u043e\u0432, \u0442\u043e \u0435\u0441\u0442\u044c \u043c\u044b \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u0435\u043c \u0438\u0445 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c.<\/p>\n<p><\/p>\n<pre><code class=\"cmake\">add_custom_target(check ALL COMMAND mylib-unit-tests)<\/code><\/pre>\n<p>\n<noindex><a rel=\"nofollow\" name=\"code-coverage\"><\/a><\/noindex><\/p>\n<h4 id=\"pokrytiecontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">\u041f\u043e\u043a\u0440\u044b\u0442\u0438\u0435<\/a><\/noindex><\/h4>\n<p><\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0437\u0430\u043c\u0435\u0440 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u043a\u043e\u0434\u0430, \u0435\u0441\u043b\u0438 \u0437\u0430\u0434\u0430\u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u043e\u043f\u0446\u0438\u044f. \u0412 \u0434\u0435\u0442\u0430\u043b\u0438 \u0432\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0443, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d\u0438 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435 \u043a \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0443 \u0434\u043b\u044f \u0437\u0430\u043c\u0435\u0440\u043e\u0432 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f, \u0447\u0435\u043c \u043a CMake. \u0412\u0430\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0446\u0435\u043b\u044c <noindex><a rel=\"nofollow\" href=\"#coverage\"><code>coverage<\/code><\/a><\/noindex>, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0443\u0434\u043e\u0431\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0437\u0430\u043c\u0435\u0440 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f.<\/p>\n<p><\/p>\n<pre><code class=\"cmake\">find_program(GCOVR_EXECUTABLE gcovr)\nif(MYLIB_COVERAGE AND GCOVR_EXECUTABLE)\n    message(STATUS \"\u0418\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u043a\u043e\u0434\u0430 \u0442\u0435\u0441\u0442\u0430\u043c\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043e\")\n\n    target_compile_options(mylib-unit-tests PRIVATE --coverage)\n    target_link_libraries(mylib-unit-tests PRIVATE gcov)\n\n    add_custom_target(coverage\n        COMMAND\n            ${GCOVR_EXECUTABLE}\n                --root=${PROJECT_SOURCE_DIR}\/include\/\n                --object-directory=${CMAKE_CURRENT_BINARY_DIR}\n        DEPENDS\n            check\n    )\nelseif(MYLIB_COVERAGE AND NOT GCOVR_EXECUTABLE)\n    set(MYLIB_COVERAGE OFF)\n    message(WARNING \"\u0414\u043b\u044f \u0437\u0430\u043c\u0435\u0440\u043e\u0432 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u043a\u043e\u0434\u0430 \u0442\u0435\u0441\u0442\u0430\u043c\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 gcovr\")\nendif()<\/code><\/pre>\n<p>\n<noindex><a rel=\"nofollow\" name=\"doccmakeliststxt\"><\/a><\/noindex><\/p>\n<h3 id=\"skript-dlya-dokumentacii-doccmakeliststxtcontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">\u0421\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 (doc\/CMakeLists.txt)<\/a><\/noindex><\/h3>\n<p><\/p>\n<p><noindex><a rel=\"nofollow\" href=\"https:\/\/cmake.org\/cmake\/help\/v3.8\/module\/FindDoxygen.html\">\u041d\u0430\u0448\u043b\u0438 Doxygen<\/a><\/noindex>.<\/p>\n<p><\/p>\n<pre><code class=\"cmake\">find_package(Doxygen)<\/code><\/pre>\n<p><\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0441 \u044f\u0437\u044b\u043a\u043e\u043c. \u0415\u0441\u043b\u0438 \u0434\u0430, \u0442\u043e \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u0435\u043c, \u0435\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u0431\u0435\u0440\u0451\u043c \u0440\u0443\u0441\u0441\u043a\u0438\u0439. \u0417\u0430\u0442\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b Doxygen. \u0412\u0441\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u044f\u0437\u044b\u043a \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0442\u0443\u0434\u0430 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 (\u0441\u043c. <noindex><a rel=\"nofollow\" href=\"https:\/\/cmake.org\/cmake\/help\/v3.8\/command\/configure_file.html\"><code>\u043a\u043e\u043c\u0430\u043d\u0434\u0443 configure_file<\/code><\/a><\/noindex>).<\/p>\n<p><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0446\u0435\u043b\u044c <noindex><a rel=\"nofollow\" href=\"#doc\"><code>doc<\/code><\/a><\/noindex>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u2014 \u043d\u0435 \u0441\u0430\u043c\u0430\u044f \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0442\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0446\u0435\u043b\u044c \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442, \u0435\u0451 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u044f\u0432\u043d\u043e.<\/p>\n<p><\/p>\n<pre><code class=\"cmake\">if (Doxygen_FOUND)\n    if (NOT MYLIB_DOXYGEN_LANGUAGE)\n        set(MYLIB_DOXYGEN_LANGUAGE Russian)\n    endif()\n    message(STATUS \"Doxygen documentation will be generated in ${MYLIB_DOXYGEN_LANGUAGE}\")\n    configure_file(Doxyfile.in Doxyfile)\n    add_custom_target(doc COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}\/Doxyfile)\nendif ()<\/code><\/pre>\n<p>\n<noindex><a rel=\"nofollow\" name=\"onlinecmakeliststxt\"><\/a><\/noindex><\/p>\n<h3 id=\"skript-dlya-onlayn-pesochnicy-onlinecmakeliststxtcontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">\u0421\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u043e\u043d\u043b\u0430\u0439\u043d-\u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u044b (online\/CMakeLists.txt)<\/a><\/noindex><\/h3>\n<p><\/p>\n<p>\u0422\u0443\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0442\u0440\u0435\u0442\u0438\u0439 \u041f\u0438\u0442\u043e\u043d \u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0446\u0435\u043b\u044c <noindex><a rel=\"nofollow\" href=\"#wandbox\"><code>wandbox<\/code><\/a><\/noindex>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 API \u0441\u0435\u0440\u0432\u0438\u0441\u0430 <noindex><a rel=\"nofollow\" href=\"https:\/\/wandbox.org\">Wandbox<\/a><\/noindex>, \u0438 \u043e\u0442\u0441\u044b\u043b\u0430\u0435\u0442 \u0435\u0433\u043e. \u0412 \u043e\u0442\u0432\u0435\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0433\u043e\u0442\u043e\u0432\u0443\u044e \u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0443.<\/p>\n<p><\/p>\n<pre><code class=\"cmake\">find_program(PYTHON3_EXECUTABLE python3)\nif(PYTHON3_EXECUTABLE)\n    set(WANDBOX_URL \"https:\/\/wandbox.org\/api\/compile.json\")\n\n    add_custom_target(wandbox\n        COMMAND\n            ${PYTHON3_EXECUTABLE} wandbox.py mylib-example.cpp \"${PROJECT_SOURCE_DIR}\" include |\n            curl -H \"Content-type: application\/json\" -d @- ${WANDBOX_URL}\n        WORKING_DIRECTORY\n            ${CMAKE_CURRENT_SOURCE_DIR}\n        DEPENDS\n            mylib-unit-tests\n    )\nelse()\n    message(WARNING \"\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u043d\u043b\u0430\u0439\u043d-\u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u044b \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 \u042f\u041f python 3-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438\")\nendif()<\/code><\/pre>\n<p>\n<noindex><a rel=\"nofollow\" name=\"project-from-the-outside\"><\/a><\/noindex><\/p>\n<h2><noindex><a rel=\"nofollow\" href=\"#contents\">\u041f\u0440\u043e\u0435\u043a\u0442 \u0441\u043d\u0430\u0440\u0443\u0436\u0438<\/a><\/noindex><\/h2>\n<p><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u044d\u0442\u0438\u043c \u0432\u0441\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>\n<noindex><a rel=\"nofollow\" name=\"build\"><\/a><\/noindex><\/p>\n<h3 id=\"sborkacontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">\u0421\u0431\u043e\u0440\u043a\u0430<\/a><\/noindex><\/h3>\n<p><\/p>\n<p>\u0421\u0431\u043e\u0440\u043a\u0430 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043a\u0430\u043a \u0438 \u043b\u044e\u0431\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 CMake, \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0434\u0432\u0443\u0445 \u044d\u0442\u0430\u043f\u043e\u0432:<\/p>\n<p>\n<noindex><a rel=\"nofollow\" name=\"generate\"><\/a><\/noindex><\/p>\n<h4 id=\"generaciyacontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f<\/a><\/noindex><\/h4>\n<p><\/p>\n<pre><code class=\"plaintext\">cmake -S \u043f\u0443\u0442\u044c\/\u043a\/\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c -B \u043f\u0443\u0442\u044c\/\u043a\/\u0441\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0439\/\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 [\u043e\u043f\u0446\u0438\u0438 ...]<\/code><\/pre>\n<p><\/p>\n<blockquote><p>\u0415\u0441\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432\u044b\u0448\u0435 \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0438\u0437-\u0437\u0430 \u0441\u0442\u0430\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 CMake, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c <code>-S<\/code>:<\/p>\n<pre><code class=\"plaintext\">cmake \u043f\u0443\u0442\u044c\/\u043a\/\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c -B \u043f\u0443\u0442\u044c\/\u043a\/\u0441\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0439\/\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 [\u043e\u043f\u0446\u0438\u0438 ...]<\/code><\/pre>\n<p>\n<\/p><\/blockquote>\n<p><noindex><a rel=\"nofollow\" href=\"#options\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u043e\u043f\u0446\u0438\u0438<\/a><\/noindex>.<\/p>\n<p>\n<noindex><a rel=\"nofollow\" name=\"project-build\"><\/a><\/noindex><\/p>\n<h4 id=\"sborka-proektacontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">\u0421\u0431\u043e\u0440\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a><\/noindex><\/h4>\n<p><\/p>\n<pre><code class=\"plaintext\">cmake --build \u043f\u0443\u0442\u044c\/\u043a\/\u0441\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0439\/\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 [--target target]<\/code><\/pre>\n<p><\/p>\n<p><noindex><a rel=\"nofollow\" href=\"#build-targets\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u0441\u0431\u043e\u0440\u043e\u0447\u043d\u044b\u0435 \u0446\u0435\u043b\u0438<\/a><\/noindex>.<\/p>\n<p>\n<noindex><a rel=\"nofollow\" name=\"options\"><\/a><\/noindex><\/p>\n<h3 id=\"opciicontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">\u041e\u043f\u0446\u0438\u0438<\/a><\/noindex><\/h3>\n<p>\n<noindex><a rel=\"nofollow\" name=\"MYLIB_COVERAGE\"><\/a><\/noindex><\/p>\n<h4 id=\"mylib_coveragecontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">MYLIB_COVERAGE<\/a><\/noindex><\/h4>\n<p><\/p>\n<pre><code class=\"plaintext\">cmake -S ... -B ... -DMYLIB_COVERAGE=ON [\u043f\u0440\u043e\u0447\u0438\u0435 \u043e\u043f\u0446\u0438\u0438 ...]<\/code><\/pre>\n<p><\/p>\n<p>\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0446\u0435\u043b\u044c <noindex><a rel=\"nofollow\" href=\"#coverage\"><code>coverage<\/code><\/a><\/noindex>, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0437\u0430\u043c\u0435\u0440 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u043a\u043e\u0434\u0430 \u0442\u0435\u0441\u0442\u0430\u043c\u0438.<\/p>\n<p>\n<noindex><a rel=\"nofollow\" name=\"MYLIB_TESTING\"><\/a><\/noindex><\/p>\n<h4 id=\"mylib_testingcontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">MYLIB_TESTING<\/a><\/noindex><\/h4>\n<p><\/p>\n<pre><code class=\"plaintext\">cmake -S ... -B ... -DMYLIB_TESTING=OFF [\u043f\u0440\u043e\u0447\u0438\u0435 \u043e\u043f\u0446\u0438\u0438 ...]<\/code><\/pre>\n<p><\/p>\n<p>\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0443 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u0438 \u0446\u0435\u043b\u044c <noindex><a rel=\"nofollow\" href=\"#check\"><code>check<\/code><\/a><\/noindex>. \u041a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435, \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043c\u0435\u0440 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u043a\u043e\u0434\u0430 \u0442\u0435\u0441\u0442\u0430\u043c\u0438 (\u0441\u043c. <noindex><a rel=\"nofollow\" href=\"#MYLIB_COVERAGE\"><code>MYLIB_COVERAGE<\/code><\/a><\/noindex>).<\/p>\n<p><\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u0434\u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <noindex><a rel=\"nofollow\" href=\"https:\/\/cmake.org\/cmake\/help\/v3.8\/command\/add_subdirectory.html\"><code>add_subdirectory<\/code><\/a><\/noindex>.<\/p>\n<p>\n<noindex><a rel=\"nofollow\" name=\"MYLIB_DOXYGEN_LANGUAGE\"><\/a><\/noindex><\/p>\n<h4 id=\"mylib_doxygen_languagecontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">MYLIB_DOXYGEN_LANGUAGE<\/a><\/noindex><\/h4>\n<p><\/p>\n<pre><code class=\"plaintext\">cmake -S ... -B ... -DMYLIB_DOXYGEN_LANGUAGE=English [\u043f\u0440\u043e\u0447\u0438\u0435 \u043e\u043f\u0446\u0438\u0438 ...]<\/code><\/pre>\n<p><\/p>\n<p>\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u044f\u0437\u044b\u043a \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0446\u0435\u043b\u044c <noindex><a rel=\"nofollow\" href=\"#doc\"><code>doc<\/code><\/a><\/noindex> \u043d\u0430 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439. \u0421\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u0441\u043c. \u043d\u0430 <noindex><a rel=\"nofollow\" href=\"http:\/\/www.doxygen.nl\/manual\/config.html#cfg_output_language\">\u0441\u0430\u0439\u0442\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b Doxygen<\/a><\/noindex>.<\/p>\n<p><\/p>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432\u043a\u043b\u044e\u0447\u0451\u043d \u0440\u0443\u0441\u0441\u043a\u0438\u0439.<\/p>\n<p>\n<noindex><a rel=\"nofollow\" name=\"build-targets\"><\/a><\/noindex><\/p>\n<h3 id=\"sborochnye-celicontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">\u0421\u0431\u043e\u0440\u043e\u0447\u043d\u044b\u0435 \u0446\u0435\u043b\u0438<\/a><\/noindex><\/h3>\n<p>\n<noindex><a rel=\"nofollow\" name=\"default-target\"><\/a><\/noindex><\/p>\n<h4 id=\"po-umolchaniyucontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/a><\/noindex><\/h4>\n<p><\/p>\n<pre><code class=\"plaintext\">cmake --build path\/to\/build\/directory\ncmake --build path\/to\/build\/directory --target all<\/code><\/pre>\n<p><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0446\u0435\u043b\u044c \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u0430 (\u0447\u0442\u043e \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e \u0446\u0435\u043b\u0438 <code>all<\/code>), \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0432\u0441\u0451, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0446\u0435\u043b\u044c <noindex><a rel=\"nofollow\" href=\"#check\"><code>check<\/code><\/a><\/noindex>.<\/p>\n<p>\n<noindex><a rel=\"nofollow\" name=\"mylib-unit-tests\"><\/a><\/noindex><\/p>\n<h4 id=\"mylib-unit-testscontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">mylib-unit-tests<\/a><\/noindex><\/h4>\n<p><\/p>\n<pre><code class=\"plaintext\">cmake --build path\/to\/build\/directory --target mylib-unit-tests<\/code><\/pre>\n<p><\/p>\n<p>\u041a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b. \u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<p>\n<noindex><a rel=\"nofollow\" name=\"check\"><\/a><\/noindex><\/p>\n<h4 id=\"checkcontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">check<\/a><\/noindex><\/h4>\n<p><\/p>\n<pre><code class=\"plaintext\">cmake --build \u043f\u0443\u0442\u044c\/\u043a\/\u0441\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0439\/\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 --target check<\/code><\/pre>\n<p><\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0435 (\u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442, \u0435\u0441\u043b\u0438 \u0435\u0449\u0451 \u043d\u0435) \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b. \u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<p><\/p>\n<p>\u0421\u043c. \u0442\u0430\u043a\u0436\u0435 <noindex><a rel=\"nofollow\" href=\"#mylib-unit-tests\"><code>mylib-unit-tests<\/code><\/a><\/noindex>.<\/p>\n<p>\n<noindex><a rel=\"nofollow\" name=\"coverage\"><\/a><\/noindex><\/p>\n<h4 id=\"coveragecontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">coverage<\/a><\/noindex><\/h4>\n<p><\/p>\n<pre><code class=\"plaintext\">cmake --build \u043f\u0443\u0442\u044c\/\u043a\/\u0441\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0439\/\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 --target coverage<\/code><\/pre>\n<p><\/p>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 (\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442, \u0435\u0441\u043b\u0438 \u0435\u0449\u0451 \u043d\u0435) \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b \u043d\u0430 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u043a\u043e\u0434\u0430 \u0442\u0435\u0441\u0442\u0430\u043c\u0438 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b <noindex><a rel=\"nofollow\" href=\"https:\/\/gcovr.com\">gcovr<\/a><\/noindex>.<\/p>\n<p><\/p>\n<p>\u0412\u044b\u0445\u043b\u043e\u043f \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">------------------------------------------------------------------------------\n                           GCC Code Coverage Report\nDirectory: \/path\/to\/cmakecpptemplate\/include\/\n------------------------------------------------------------------------------\nFile                                       Lines    Exec  Cover   Missing\n------------------------------------------------------------------------------\nmylib\/myfeature.hpp                            2       2   100%   \n------------------------------------------------------------------------------\nTOTAL                                          2       2   100%\n------------------------------------------------------------------------------<\/code><\/pre>\n<p><\/p>\n<p>\u0426\u0435\u043b\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0432\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u043e\u0439 \u043e\u043f\u0446\u0438\u0438 <noindex><a rel=\"nofollow\" href=\"#MYLIB_COVERAGE\"><code>MYLIB_COVERAGE<\/code><\/a><\/noindex>.<\/p>\n<p><\/p>\n<p>\u0421\u043c. \u0442\u0430\u043a\u0436\u0435 <noindex><a rel=\"nofollow\" href=\"#check\"><code>check<\/code><\/a><\/noindex>.<\/p>\n<p>\n<noindex><a rel=\"nofollow\" name=\"doc\"><\/a><\/noindex><\/p>\n<h4 id=\"doccontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">doc<\/a><\/noindex><\/h4>\n<p><\/p>\n<pre><code class=\"plaintext\">cmake --build \u043f\u0443\u0442\u044c\/\u043a\/\u0441\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0439\/\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 --target doc<\/code><\/pre>\n<p><\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043a \u043a\u043e\u0434\u0443 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b <noindex><a rel=\"nofollow\" href=\"http:\/\/doxygen.nl\">Doxygen<\/a><\/noindex>.<\/p>\n<p>\n<noindex><a rel=\"nofollow\" name=\"wandbox\"><\/a><\/noindex><\/p>\n<h4 id=\"wandboxcontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">wandbox<\/a><\/noindex><\/h4>\n<p><\/p>\n<pre><code class=\"plaintext\">cmake --build \u043f\u0443\u0442\u044c\/\u043a\/\u0441\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0439\/\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 --target wandbox<\/code><\/pre>\n<p><\/p>\n<p>\u041e\u0442\u0432\u0435\u0442 \u043e\u0442 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<p><\/p>\n<pre><code class=\"json\">{\n    \"permlink\" :    \"QElvxuMzHgL9fqci\",\n    \"status\" :  \"0\",\n    \"url\" : \"https:\/\/wandbox.org\/permlink\/QElvxuMzHgL9fqci\"\n}<\/code><\/pre>\n<p><\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0438\u0441 <noindex><a rel=\"nofollow\" href=\"https:\/\/wandbox.org\">Wandbox<\/a><\/noindex>. \u041d\u0435 \u0437\u043d\u0430\u044e, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443 \u043d\u0438\u0445 \u0440\u0435\u0437\u0438\u043d\u043e\u0432\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043d\u043e \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u0437\u043b\u043e\u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043d\u0435 \u0441\u0442\u043e\u0438\u0442.<\/p>\n<p>\n<noindex><a rel=\"nofollow\" name=\"examples\"><\/a><\/noindex><\/p>\n<h3 id=\"primerycontents\"><noindex><a rel=\"nofollow\" href=\"#contents\">\u041f\u0440\u0438\u043c\u0435\u0440\u044b<\/a><\/noindex><\/h3>\n<p><\/p>\n<h4 id=\"sborka-proekta-v-otladochnom-rezhime-s-zamerom-pokrytiya\">\u0421\u0431\u043e\u0440\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u0441 \u0437\u0430\u043c\u0435\u0440\u043e\u043c \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f<\/h4>\n<p><\/p>\n<pre><code class=\"plaintext\">cmake -S \u043f\u0443\u0442\u044c\/\u043a\/\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c -B \u043f\u0443\u0442\u044c\/\u043a\/\u0441\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0439\/\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 -DCMAKE_BUILD_TYPE=Debug -DMYLIB_COVERAGE=ON\ncmake --build \u043f\u0443\u0442\u044c\/\u043a\/\u0441\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0439\/\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 --target coverage --parallel 16<\/code><\/pre>\n<p><\/p>\n<h4 id=\"ustanovka-proekta-bez-predvaritelnoy-sborki-i-testirovaniya\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0431\u0435\u0437 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/h4>\n<p><\/p>\n<pre><code class=\"plaintext\">cmake -S \u043f\u0443\u0442\u044c\/\u043a\/\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c -B \u043f\u0443\u0442\u044c\/\u043a\/\u0441\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0439\/\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 -DMYLIB_TESTING=OFF -DCMAKE_INSTALL_PREFIX=\u043f\u0443\u0442\u044c\/\u043a\/\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0439\u043d\u043e\u0439\/\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438\ncmake --build \u043f\u0443\u0442\u044c\/\u043a\/\u0441\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0439\/\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 --target install<\/code><\/pre>\n<p><\/p>\n<h4 id=\"sborka-v-vypusknom-rezhime-zadannym-kompilyatorom\">\u0421\u0431\u043e\u0440\u043a\u0430 \u0432 \u0432\u044b\u043f\u0443\u0441\u043a\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c<\/h4>\n<p><\/p>\n<pre><code class=\"plaintext\">cmake -S \u043f\u0443\u0442\u044c\/\u043a\/\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c -B \u043f\u0443\u0442\u044c\/\u043a\/\u0441\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0439\/\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++-8 -DCMAKE_PREFIX_PATH=\u043f\u0443\u0442\u044c\/\u043a\/\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438\/\u043a\u0443\u0434\u0430\/\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b\/\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438\ncmake --build \u043f\u0443\u0442\u044c\/\u043a\/\u0441\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0439\/\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 --parallel 4<\/code><\/pre>\n<p><\/p>\n<h4 id=\"generirovanie-dokumentacii-na-angliyskom\">\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c<\/h4>\n<p><\/p>\n<pre><code class=\"plaintext\">cmake -S \u043f\u0443\u0442\u044c\/\u043a\/\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c -B \u043f\u0443\u0442\u044c\/\u043a\/\u0441\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0439\/\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 -DCMAKE_BUILD_TYPE=Release -DMYLIB_DOXYGEN_LANGUAGE=English\ncmake --build \u043f\u0443\u0442\u044c\/\u043a\/\u0441\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0439\/\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 --target doc<\/code><\/pre>\n<p>\n<noindex><a rel=\"nofollow\" name=\"tools\"><\/a><\/noindex><\/p>\n<h2><noindex><a rel=\"nofollow\" href=\"#contents\">\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b<\/a><\/noindex><\/h2>\n<p><\/p>\n<ol>\n<li>\n<p><noindex><a rel=\"nofollow\" href=\"https:\/\/cmake.org\">CMake<\/a><\/noindex> 3.13<\/p>\n<p><\/p>\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0432\u0435\u0440\u0441\u0438\u044f CMake 3.13 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u043f\u0440\u0430\u0432\u043a\u0435. \u0421 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 CMake-\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u0435\u0440\u0441\u0438\u0438 3.8, \u0435\u0441\u043b\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438.<\/p>\n<p>\n<\/li>\n<li>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/onqtam\/doctest\">doctest<\/a><\/noindex><\/p>\n<p><\/p>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0442\u044c (\u0441\u043c. <noindex><a rel=\"nofollow\" href=\"#MYLIB_TESTING\"><code>\u043e\u043f\u0446\u0438\u044e MYLIB_TESTING<\/code><\/a><\/noindex>).<\/p>\n<p>\n<\/li>\n<li>\n<p><noindex><a rel=\"nofollow\" href=\"http:\/\/doxygen.nl\">Doxygen<\/a><\/noindex><\/p>\n<p><\/p>\n<p>\u0414\u043b\u044f \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u044f\u0437\u044b\u043a\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f, \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0430 \u043e\u043f\u0446\u0438\u044f <noindex><a rel=\"nofollow\" href=\"#MYLIB_DOXYGEN_LANGUAGE\"><code>MYLIB_DOXYGEN_LANGUAGE<\/code><\/a><\/noindex>.<\/p>\n<p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 \u042f\u041f <noindex><a rel=\"nofollow\" href=\"https:\/\/www.python.org\">Python 3<\/a><\/noindex><\/p>\n<p><\/p>\n<p>\u0414\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 <noindex><a rel=\"nofollow\" href=\"#wandbox\">\u043e\u043d\u043b\u0430\u0439\u043d-\u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u044b<\/a><\/noindex>.<\/p>\n<p>\n<\/li>\n<\/ol>\n<p>\n<noindex><a rel=\"nofollow\" name=\"static-analysis\"><\/a><\/noindex><\/p>\n<h2><noindex><a rel=\"nofollow\" href=\"#contents\">\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437<\/a><\/noindex><\/h2>\n<p><\/p>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e CMake \u0438 \u043f\u0430\u0440\u044b \u0445\u043e\u0440\u043e\u0448\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0442\u0435\u043b\u043e\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<p><\/p>\n<h4 id=\"cppcheck\">Cppcheck<\/h4>\n<p><\/p>\n<p>\u0412 CMake \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 <noindex><a rel=\"nofollow\" href=\"http:\/\/cppcheck.sourceforge.net\">Cppcheck<\/a><\/noindex>.<\/p>\n<p><\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u043f\u0446\u0438\u0435\u0439 <noindex><a rel=\"nofollow\" href=\"https:\/\/cmake.org\/cmake\/help\/v3.10\/variable\/CMAKE_LANG_CPPCHECK.html#variable:CMAKE_&lt;LANG&gt;_CPPCHECK\"><code>CMAKE_CXX_CPPCHECK<\/code><\/a><\/noindex>:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">cmake -S \u043f\u0443\u0442\u044c\/\u043a\/\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c -B \u043f\u0443\u0442\u044c\/\u043a\/\u0441\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0439\/\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_CPPCHECK=\"cppcheck;--enable=all;-I\u043f\u0443\u0442\u044c\/\u043a\/\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c\/include\"<\/code><\/pre>\n<p><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0431\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0438 \u043f\u0435\u0440\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432. \u041d\u0438\u0447\u0435\u0433\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e.<\/p>\n<p><\/p>\n<h4 id=\"clang\">Clang<\/h4>\n<p><\/p>\n<p>\u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0447\u0443\u0434\u0435\u0441\u043d\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 <noindex><a rel=\"nofollow\" href=\"https:\/\/clang-analyzer.llvm.org\/scan-build\"><code>scan-build<\/code><\/a><\/noindex> \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0432 \u0434\u0432\u0430 \u0441\u0447\u0451\u0442\u0430:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">scan-build cmake -S \u043f\u0443\u0442\u044c\/\u043a\/\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c -B \u043f\u0443\u0442\u044c\/\u043a\/\u0441\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0439\/\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 -DCMAKE_BUILD_TYPE=Debug\nscan-build cmake --build \u043f\u0443\u0442\u044c\/\u043a\/\u0441\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0439\/\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438<\/code><\/pre>\n<p><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u044f \u0441 Cppcheck, \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0443 \u0447\u0435\u0440\u0435\u0437 <code>scan-build<\/code>.<\/p>\n<p>\n<noindex><a rel=\"nofollow\" name=\"afterword\"><\/a><\/noindex><\/p>\n<h2><noindex><a rel=\"nofollow\" href=\"#contents\">\u041f\u043e\u0441\u043b\u0435\u0441\u043b\u043e\u0432\u0438\u0435<\/a><\/noindex><\/h2>\n<p><\/p>\n<p>CMake \u2014 \u043e\u0447\u0435\u043d\u044c \u043c\u043e\u0449\u043d\u0430\u044f \u0438 \u0433\u0438\u0431\u043a\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u0432\u043a\u0443\u0441 \u0438 \u0446\u0432\u0435\u0442. \u0418, \u0445\u043e\u0442\u044f, \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043f\u043e\u0440\u043e\u0439 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0436\u0435\u043b\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435\u0433\u043e, \u0432\u0441\u0451 \u0436\u0435 \u043d\u0435 \u0442\u0430\u043a \u0441\u0442\u0440\u0430\u0448\u0435\u043d \u0447\u0451\u0440\u0442, \u043a\u0430\u043a \u0435\u0433\u043e \u043c\u0430\u043b\u044e\u044e\u0442. \u041f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0438 CMake \u043d\u0430 \u0431\u043b\u0430\u0433\u043e \u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 \u0438 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0439 \u0434\u043b\u044f \u0437\u0434\u043e\u0440\u043e\u0432\u044c\u044f.<\/p>\n<p>\u2192 <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/izvolov\/mylib\">\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a><\/noindex><\/p>\n<p>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/461817\/\">habr.com<\/a><\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u044f \u043b\u044e\u0431\u043b\u044e \u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b, \u0440\u0435\u0436\u0438\u043c\u044b \u0441\u0431\u043e\u0440\u043a\u0438, \u0432\u0435\u0440\u0441\u0438\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437, \u0437\u0430\u043c\u0435\u0440\u044f\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0438 \u0442.\u0434. \u0418 \u043e\u0447\u0435\u043d\u044c \u043b\u044e\u0431\u043b\u044e CMake, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043c\u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0451 \u0442\u043e, \u0447\u0442\u043e \u044f \u0445\u043e\u0447\u0443. \u041c\u043d\u043e\u0433\u0438\u0435 \u0440\u0443\u0433\u0430\u044e\u0442 CMake, \u0438 \u0447\u0430\u0441\u0442\u043e \u0437\u0430\u0441\u043b\u0443\u0436\u0435\u043d\u043d\u043e, \u043d\u043e \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u0442\u043e \u043d\u0435 \u0432\u0441\u0451 \u0442\u0430\u043a \u043f\u043b\u043e\u0445\u043e, \u0430 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":27477,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-36686","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u044f \u043b\u044e\u0431\u043b\u044e \u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b, \u0440\u0435\u0436\u0438\u043c\u044b \u0441\u0431\u043e\u0440\u043a\u0438, \u0432\u0435\u0440\u0441\u0438\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437, \u0437\u0430\u043c\u0435\u0440\u044f\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0438 \u0442.\u0434. \u0418 \u043e\u0447\u0435\u043d\u044c \u043b\u044e\u0431\u043b\u044e CMake, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043c\u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0451 \u0442\u043e, \u0447\u0442\u043e \u044f \u0445\u043e\u0447\u0443. \u041c\u043d\u043e\u0433\u0438\u0435 \u0440\u0443\u0433\u0430\u044e\u0442 CMake, \u0438 \u0447\u0430\u0441\u0442\u043e \u0437\u0430\u0441\u043b\u0443\u0436\u0435\u043d\u043d\u043e, \u043d\u043e \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u0442\u043e \u043d\u0435 \u0432\u0441\u0451 \u0442\u0430\u043a \u043f\u043b\u043e\u0445\u043e, \u0430 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/cmake-i-c-bratya-navek\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"de_DE\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47CMake \u0438 C++ \u2014 \u0431\u0440\u0430\u0442\u044c\u044f \u043d\u0430\u0432\u0435\u043a | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u044f \u043b\u044e\u0431\u043b\u044e \u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b, \u0440\u0435\u0436\u0438\u043c\u044b \u0441\u0431\u043e\u0440\u043a\u0438, \u0432\u0435\u0440\u0441\u0438\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437, \u0437\u0430\u043c\u0435\u0440\u044f\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0438 \u0442.\u0434. \u0418 \u043e\u0447\u0435\u043d\u044c \u043b\u044e\u0431\u043b\u044e CMake, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043c\u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0451 \u0442\u043e, \u0447\u0442\u043e \u044f \u0445\u043e\u0447\u0443. \u041c\u043d\u043e\u0433\u0438\u0435 \u0440\u0443\u0433\u0430\u044e\u0442 CMake, \u0438 \u0447\u0430\u0441\u0442\u043e \u0437\u0430\u0441\u043b\u0443\u0436\u0435\u043d\u043d\u043e, \u043d\u043e \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u0442\u043e \u043d\u0435 \u0432\u0441\u0451 \u0442\u0430\u043a \u043f\u043b\u043e\u0445\u043e, \u0430 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/cmake-i-c-bratya-navek\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-10-31T19:13:09+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T19:13:09+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47CMake und C++ \u2014 Br\u00fcder f\u00fcr immer | ProHoster","description":"W\u00e4hrend der Entwicklung wechsle ich gerne Compiler, Build-Modi, Abh\u00e4ngigkeitsversionen, f\u00fchre statische Analysen durch, messe die Leistung, erstelle Abdeckungsberichte, generiere Dokumentation usw. Ich liebe CMake, weil es mir erm\u00f6glicht, all das zu tun, was ich m\u00f6chte. Viele kritisieren CMake, und oft zu Recht, aber wenn man genauer hinschaut, ist nicht alles so schlimm, besonders in letzter Zeit.","canonical_url":"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/cmake-i-c-bratya-navek","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"de_DE","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47CMake \u0438 C++ \u2014 \u0431\u0440\u0430\u0442\u044c\u044f \u043d\u0430\u0432\u0435\u043a | ProHoster","og:description":"\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u044f \u043b\u044e\u0431\u043b\u044e \u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b, \u0440\u0435\u0436\u0438\u043c\u044b \u0441\u0431\u043e\u0440\u043a\u0438, \u0432\u0435\u0440\u0441\u0438\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437, \u0437\u0430\u043c\u0435\u0440\u044f\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0438 \u0442.\u0434. \u0418 \u043e\u0447\u0435\u043d\u044c \u043b\u044e\u0431\u043b\u044e CMake, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043c\u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0451 \u0442\u043e, \u0447\u0442\u043e \u044f \u0445\u043e\u0447\u0443. \u041c\u043d\u043e\u0433\u0438\u0435 \u0440\u0443\u0433\u0430\u044e\u0442 CMake, \u0438 \u0447\u0430\u0441\u0442\u043e \u0437\u0430\u0441\u043b\u0443\u0436\u0435\u043d\u043d\u043e, \u043d\u043e \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u0442\u043e \u043d\u0435 \u0432\u0441\u0451 \u0442\u0430\u043a \u043f\u043b\u043e\u0445\u043e, \u0430 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f","og:url":"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/cmake-i-c-bratya-navek","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-10-31T19:13:09+00:00","article:modified_time":"2019-10-31T19:13:09+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"36686","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-22 04:24:50","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 01:40:23","updated":"2026-01-22 04:24:50"},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/posts\/36686","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/comments?post=36686"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/posts\/36686\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/media\/27477"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/media?parent=36686"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/categories?post=36686"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/tags?post=36686"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}