{"id":35268,"date":"2025-03-25T17:19:55","date_gmt":"2025-03-25T17:19:55","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cppblog\/?p=35268"},"modified":"2025-03-25T17:21:33","modified_gmt":"2025-03-25T17:21:33","slug":"boost-your-cmake-development-with-copilot-custom-instructions","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/boost-your-cmake-development-with-copilot-custom-instructions\/","title":{"rendered":"Boost Your CMake Development with Copilot Custom Instructions"},"content":{"rendered":"<h3>Introduction<\/h3>\n<p>Creating a new CMake project that uses unfamiliar libraries can be daunting and time-consuming. This blog post takes you along on my journey using Copilot to make this easier, and leveraging <a href=\"https:\/\/learn.microsoft.com\/en-us\/visualstudio\/ide\/copilot-chat-context?view=vs-2022#enable-custom-instructions\">Custom Instructions<\/a> to tailor Copilot responses. For a sneak peek, see the outcome of this journey in this <a href=\"https:\/\/github.com\/microsoft\/DogDetector\">repository<\/a>.<\/p>\n<h3>Background<\/h3>\n<p>As C++ developers who use Copilot every day, we\u2019ve experienced how it can improve our day-to-day productivity. Copilot really shines in scenarios like new codebases or unfamiliar topics, significantly reducing ramp-up. There are multiple ways to engage with it in Visual Studio, including <a href=\"https:\/\/learn.microsoft.com\/en-us\/visualstudio\/ide\/visual-studio-github-copilot-extension?view=vs-2022\">Completions<\/a> and <a href=\"https:\/\/learn.microsoft.com\/en-us\/visualstudio\/ide\/visual-studio-github-copilot-chat?view=vs-2022\">Copilot Chat<\/a>. This blog is focused on leveraging Copilot Chat to be more productive.<\/p>\n<h3>What project should I create?<\/h3>\n<p>Being a maintainer of the CMake experience, I have always been aware of a popular computer vision library, <a href=\"https:\/\/github.com\/opencv\/opencv\">OpenCV<\/a>, that is built on CMake to power 2500+ algorithms. However, I\u2019ve never actually played with it and used it in my own code. The first idea that came to mind, being a dog-lover myself, was to create my own real-time dog detector using OpenCV. I set out to create a Dog Detector using CMake and Copilot in Visual Studio.<\/p>\n<h3>Import OpenCV into CMake Project<\/h3>\n<p>Starting with a new CMake Project in Visual Studio, the first problem to solve was: \u201cHow do I import OpenCV into my CMake project?\u201d. Using CMake can sometimes be complex, and I wanted to make sure I used OpenCV in a cross-platform way, so to figure out how to do this, I asked Copilot.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/vcpkg-v2.png\"><img decoding=\"async\" class=\"alignnone wp-image-35294 size-full\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/vcpkg-v2-e1742845014677.png\" alt=\"Asking Copilot chat how to use OpenCV in the project\" width=\"918\" height=\"1186\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/vcpkg-v2-e1742845014677.png 918w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/vcpkg-v2-e1742845014677-232x300.png 232w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/vcpkg-v2-e1742845014677-793x1024.png 793w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/vcpkg-v2-e1742845014677-768x992.png 768w\" sizes=\"(max-width: 918px) 100vw, 918px\" \/><\/a><\/p>\n<p>Copilot was able to give me CMakeLists.txt modifications that I can make to my project. However, you\u2019ll notice that it mentions that OpenCV must be installed and that I can use vcpkg. <a href=\"https:\/\/vcpkg.io\/en\/\">Vcpkg is a cross-platform C\/C++ package manager<\/a>.<\/p>\n<p>Prior to doing this, while the suggested CMakeLists.txt changes are correct, CMake fails the configure step with an error indicating that OpenCV cannot be found. This is because I haven\u2019t yet installed OpenCV.<\/p>\n<h3>Use vcpkg to install OpenCV<\/h3>\n<p>Now, how do I take Copilot\u2019s suggestion to use vcpkg to install OpenCV? Let\u2019s ask Copilot.<\/p>\n<p>Copilot gave the following response:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/vcpkg-opencv.png\"><img decoding=\"async\" class=\"alignnone wp-image-35297\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/vcpkg-opencv.png\" alt=\"Image vcpkg opencv\" width=\"908\" height=\"582\" \/><\/a><\/p>\n<p>You\u2019ll notice that it gave only command-line suggestions for how to install OpenCV with vcpkg. Our team typically uses vcpkg in <a href=\"https:\/\/learn.microsoft.com\/en-us\/vcpkg\/concepts\/manifest-mode\">manifest mode<\/a> and I\u2019d prefer to use that. Also, you\u2019ll notice that Copilot suggested a CMake command line. We are in Visual Studio, so the command line is driven by our CMake Presets file, and I\u2019d rather make modifications there.<\/p>\n<p>Let\u2019s ask Copilot again with those requests in mind.<\/p>\n<p style=\"padding-left: 80px; text-align: right;\"><em>\u00a0<\/em><em>\ud83d\udca1Hm, wouldn\u2019t it be nice if I didn\u2019t have to specify manifest mode?<\/em><\/p>\n<p style=\"text-align: right;\"><em>\ud83d\udca1It would also be nice if I didn\u2019t have to specify that I prefer using CMakePresets.json when I ask Copilot questions? <\/em><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/vcpkg-manifest.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-35298\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/vcpkg-manifest.png\" alt=\"Asking Copilot how to use vcpkg in manifest mode to install openCV\" width=\"1809\" height=\"789\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>These suggestions are much more aligned with what I\u2019d like to do in my project. Following a combination of the Copilot suggestions and this <a href=\"https:\/\/learn.microsoft.com\/en-us\/vcpkg\/get_started\/get-started-vs?pivots=shell-powershell\">documentation<\/a>, I did the following:<\/p>\n<ol>\n<li>Installed vcpkg and ran the bootstrap script.<\/li>\n<li>Created the necessary vcpkg.json and vcpkg-configuration.json files defining opencv as a dependency.<\/li>\n<li>Modified the <code>CMAKE_TOOLCHAIN_FILE<\/code> using the CMakePresets file.<\/li>\n<\/ol>\n<p>At this point, we were closer, but we still failed to configure. After asking Copilot for help, I realized that it wasn\u2019t finding the toolchain file, and that I should specify the <code>VCPKG_ROOT<\/code> in an environment variable in the preset and use that variable in the <code>CMAKE_TOOLCHAIN_FILE<\/code> setting to successfully find it.<\/p>\n<p>At this point, CMake configured successfully and OpenCV had been included in my CMake project.<\/p>\n<h3>Use OpenCV to detect dogs<\/h3>\n<p>Now that OpenCV was properly included in my CMake project, the next step was to figure out how to use the library and how to get it to detect dogs. From my little background knowledge of OpenCV, I knew that it would need a model trained to detect certain objects. To start, I asked Copilot if OpenCV can detect dogs already, and it told me that there were already publicly available models and, upon further questioning, pointed me to some links where I could download configuration files, weights files, and class names from <a href=\"https:\/\/github.com\/AlexeyAB\/darknet\">this repository<\/a>.<\/p>\n<p>Now that I had downloaded models I could use, I asked Copilot to give me a code snippet that would allow me to detect dogs.<\/p>\n<p>One thing that I hit errors on and had to modify was that Copilot suggested relative paths, and this didn\u2019t work, since it was running the executable from the build location. I found it easier to always use absolute paths to make this simpler.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/absolute-paths.png\"><img decoding=\"async\" class=\"alignnone wp-image-35299\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/absolute-paths.png\" alt=\"Asking Copilot to modify paths to absolute paths.\" width=\"890\" height=\"297\" \/><\/a><\/p>\n<p style=\"text-align: right;\">\ud83d\udca1<em>It would be great if I could tell Copilot to always use absolute paths.<\/em><\/p>\n<p>After modifying the paths, I was able to detect dogs in images!<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/dog-detector.png\"><img decoding=\"async\" class=\"alignnone wp-image-35300 size-full\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/dog-detector-e1742845236222.png\" alt=\"Using OpenCV, we can now detect dogs\" width=\"957\" height=\"539\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/dog-detector-e1742845236222.png 957w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/dog-detector-e1742845236222-300x169.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/dog-detector-e1742845236222-768x433.png 768w\" sizes=\"(max-width: 957px) 100vw, 957px\" \/><\/a><\/p>\n<h3>Switch to livestream<\/h3>\n<p>I didn\u2019t want to only be able to detect dogs in images, I also wanted to be able to detect dogs using a livestream. I went back to Copilot and asked it to help me make these changes: \u201cHow can I modify this code to livestream from a camera rather than reading a single image?\u201d.<\/p>\n<p>Copilot was able to suggest slight modifications to the code, and I was able to integrate a while loop and slightly modify the camera capture mechanism to accomplish this. See the original code versus the suggested livestream code below.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/livestream.png\"><img decoding=\"async\" class=\"alignnone wp-image-35301 size-full\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/livestream-e1742845270306.png\" alt=\"Copilot helps suggest code to read from a livestream context.\" width=\"1306\" height=\"678\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/livestream-e1742845270306.png 1306w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/livestream-e1742845270306-300x156.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/livestream-e1742845270306-1024x532.png 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/livestream-e1742845270306-768x399.png 768w\" sizes=\"(max-width: 1306px) 100vw, 1306px\" \/><\/a><\/p>\n<p>To my surprise, the model could detect other objects as well.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/9.png\"><img decoding=\"async\" class=\"alignnone wp-image-35279 size-full\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/9.png\" alt=\"Image 9\" width=\"339\" height=\"271\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/9.png 339w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/9-300x240.png 300w\" sizes=\"(max-width: 339px) 100vw, 339px\" \/><\/a><\/p>\n<h3>Add UI<\/h3>\n<p>To make a more well-rounded application, I wanted to add a user interface to make it easier to control what models are used and to make it easier to operate overall. Through some conversations with Copilot, I was able to add qt5 as a vcpkg.json dependency and add components that allow you to select the .cfg, the .weights, the class names file, and to start and stop the livestream.<\/p>\n<p>The below partial screenshot shows the initial suggestions that copilot gave:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/FixBlurryScreenshot.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-35314\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/FixBlurryScreenshot.png\" alt=\"Image FixBlurryScreenshot\" width=\"1336\" height=\"552\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/FixBlurryScreenshot.png 1336w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/FixBlurryScreenshot-300x124.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/FixBlurryScreenshot-1024x423.png 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/FixBlurryScreenshot-768x317.png 768w\" sizes=\"(max-width: 1336px) 100vw, 1336px\" \/><\/a><\/p>\n<p>After refining the UI with more conversation with UI and code improvements, the pictures below show The Dog Detector when the camera isn\u2019t on versus when it is.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/person-dog-detector.png\"><img decoding=\"async\" class=\"alignnone wp-image-35303\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/person-dog-detector.png\" alt=\"Image person dog detector\" width=\"751\" height=\"416\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/person-dog-detector.png 1696w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/person-dog-detector-300x166.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/person-dog-detector-1024x567.png 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/person-dog-detector-768x425.png 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/person-dog-detector-1536x850.png 1536w\" sizes=\"(max-width: 751px) 100vw, 751px\" \/><\/a><\/p>\n<p>Also, the ultimate test was to test out the \u201cDog Detector\u201d with my dog.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/Dog.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-35313\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/Dog.gif\" alt=\"GIF of a dog \" width=\"400\" height=\"441\" \/><\/a><\/p>\n<h3>Build the project statically<\/h3>\n<p>Finally, I wanted to be able to share the executable of this project easily with others so that they could use this project without having to worry about the runtime, the build process, etc. To do this, I asked Copilot: \u201cHow to statically link a library with CMake and vcpkg?\u201d<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/static-link.png\"><img decoding=\"async\" class=\"alignnone wp-image-35305\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/static-link.png\" alt=\"Asking Copilot how to Static link a library using vcpkg\" width=\"561\" height=\"970\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/static-link.png 685w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/static-link-173x300.png 173w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/static-link-592x1024.png 592w\" sizes=\"(max-width: 561px) 100vw, 561px\" \/><\/a><\/p>\n<p>Copilot gave a suggestion to set the vcpkg triplet, but it gave suggestions to modify it in CMakeLists.txt or in the command line. To get better suggestions, I asked again, adding that we want to modify the CMakePresets.json.<\/p>\n<p style=\"text-align: right;\"><em>\ud83d\udca1This is another instance where it\u2019d be nice to not have to specify this every time I ask.<\/em><\/p>\n<p>I took these suggestions and modified them to use CMakePresets.json, so I set the <code>VCPKG_TRIPLET_TARGET<\/code> in CMakePresets.json.<\/p>\n<p>With these changes, configuration succeeded, but I still got the following build errors:<\/p>\n<pre>mismatch detected for \u2018RuntimeLibrary\u2019: value \u2018MTd_StaticDebug\u2019 doesn\u2019t match value \u2018MDd_DynamicDebug\u2019 in DogDetector.cpp.obj.<\/pre>\n<p>To help me fix this problem, I asked Copilot to help. Copilot told me to ensure I set the variable <code>OpenCV_STATIC<\/code> to <code>ON<\/code>. Since this variable is specific to only the target that includes OpenCV, I set this in the CMakeLists.txt. Additionally, CMake told me that I should set the <code>CMAKE_MSVC_RUNTIME_LIBRARY<\/code> to <code>MultiThreaded$&lt;$&lt;CONFIG:Debug&gt;:Debug&gt;<\/code>. However, after making these changes, I was still getting the error.<\/p>\n<p>After much conversation with Copilot, I realized it may have something to do with CMake Policies associated with the <code>CMAKE_MSVC_RUNTIME_LIBRARY<\/code>. Looking at the <a href=\"https:\/\/cmake.org\/cmake\/help\/latest\/variable\/CMAKE_MSVC_RUNTIME_LIBRARY.html\">documentation<\/a>, the variable only takes effect when the CMP0091 policy is set to \u201cnew\u201d, which is only \u201cnew\u201d by default in version 3.15 and beyond.<\/p>\n<p style=\"text-align: right;\"><em>\ud83d\udca1It would have been great to be informed about CMake Policies that affect CMake variables that Copilot suggested I use.<\/em><\/p>\n<p>After updating the CMake project to have a minimum required version of 3.15, the project built statically with no errors.<\/p>\n<h3>Custom Instructions<\/h3>\n<p>After completing the project, looking back at all the questions and interactions I had with Copilot through Copilot Chat, there were many times where I thought, \u201cHm, it would be great if I didn\u2019t have to continually specify this information in each question.\u201d. You may have noticed this internal dialog above.<\/p>\n<p>To solve this, I used the <a href=\"https:\/\/docs.github.com\/en\/copilot\/customizing-copilot\/adding-repository-custom-instructions-for-github-copilot?tool=webui\">Copilot Custom Instructions feature.<\/a> This feature allows you to create a .github\/copilot-instructions.md file that contains additional context you want to be added to every question that you ask Copilot Chat.<\/p>\n<p>Based on the various observations I made, I created a copilot-instructions.md file and added the following custom instructions:<\/p>\n<ul>\n<li>This project uses vcpkg in manifest mode. Please keep this in mind when giving vcpkg suggestions. Do not provide suggestions like vcpkg install library, as they will not work as expected.<\/li>\n<li>Prefer setting cache variables and other types of things through CMakePresets.json if possible.<\/li>\n<li>Give information about any CMake Policies that might affect CMake variables that are suggested or mentioned.<\/li>\n<li>This project needs to be cross-platform and cross-compiler for MSVC, Clang, and GCC.<\/li>\n<li>When providing OpenCV samples that use the file system to read files, please always use absolute file paths rather than file names, or relative file paths. For example, use <code>video.open(\"C:\/project\/file.mp4\")<\/code>, not <code>video.open(\"file.mp4\")<\/code><\/li>\n<\/ul>\n<p>After adding this file, it was immediately obvious that answers were better when asking the same questions that had been asked previously. For example, I created a new project again and asked how I should use vcpkg to use OpenCV with CMake, and this is part of the response I received.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/new-vcpkg-opencv.png\"><img decoding=\"async\" class=\"alignnone wp-image-35306\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/new-vcpkg-opencv.png\" alt=\"Now asking vcpkg to open openCV with custom instructions provides tailored results.\" width=\"669\" height=\"929\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/new-vcpkg-opencv.png 765w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/new-vcpkg-opencv-216x300.png 216w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/03\/new-vcpkg-opencv-738x1024.png 738w\" sizes=\"(max-width: 669px) 100vw, 669px\" \/><\/a><\/p>\n<p>I was able to repeat the process of creating this project, and by utilizing the Custom Instructions feature, it took me far fewer iterations with Copilot to get answers that I wanted when asking questions related to the custom instructions.<\/p>\n<h3>Conclusion<\/h3>\n<p>By utilizing the CMake experience along with Copilot in Visual Studio, I was able to quickly get a Dog Detector program up and running, complete with vcpkg integration, an easy-to-use UI, and static linking to share the executable.<\/p>\n<p>I was also able to use the Custom Instructions feature provided by Copilot to make my conversations more useful without having to provide as much repetitive, contextual information in each message to Copilot.<\/p>\n<p>Copilot helped me speed up my development process by answering my questions and helping me navigate CMake and vcpkg. Custom instructions helped Copilot provide more relevant and straightforward answers, without me having to take the time to provide additional context in every question.<\/p>\n<p>To play with the Dog Detector yourself, you can find the source code <a href=\"https:\/\/github.com\/microsoft\/DogDetector\">here,<\/a> which is released as a sample under MIT license on GitHub.<\/p>\n<h3>Disclaimer<\/h3>\n<p>The screenshots and responses from Copilot shown above may vary. There is no guarantee that if you attempt to replicate this blog post you will get the same responses.<\/p>\n<h3>Author &amp; Team<\/h3>\n<p>CMake is a widely adopted cross-platform build system that plays a crucial role in modern C++ development. It is consistently ranked among the top build tools due to its flexibility, scalability, toolability, and extensive ecosystem support. Given its popularity, the team is dedicated to improving its integration, performance, and usability within Microsoft&#8217;s products, enabling C++ developers to build, configure, and manage their projects more efficiently. Read more about our CMake support in <a href=\"https:\/\/learn.microsoft.com\/en-us\/cpp\/build\/cmake-projects-in-visual-studio?view=msvc-170\">Visual Studio<\/a> and <a href=\"https:\/\/github.com\/microsoft\/vscode-cmake-tools\/blob\/main\/docs\/README.md\">VS Code<\/a>.<\/p>\n<p>Garrett Campbell is a Senior Software Engineer who works on all things CMake, from the Visual Studio CMake experience to the VS Code CMake Tools extension. Also featured in this blog post is Owen. Owen is a mix of lab, Pitbull, and golden retriever!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Creating a new CMake project that uses unfamiliar libraries can be daunting and time-consuming. This blog post takes you along on my journey using Copilot to make this easier, and leveraging Custom Instructions to tailor Copilot responses. For a sneak peek, see the outcome of this journey in this repository. Background As C++ developers [&hellip;]<\/p>\n","protected":false},"author":75387,"featured_media":35304,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,266,3949,269,272],"tags":[],"class_list":["post-35268","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cplusplus","category-cmake","category-copilot-2","category-openfolder","category-vcpkg"],"acf":[],"blog_post_summary":"<p>Introduction Creating a new CMake project that uses unfamiliar libraries can be daunting and time-consuming. This blog post takes you along on my journey using Copilot to make this easier, and leveraging Custom Instructions to tailor Copilot responses. For a sneak peek, see the outcome of this journey in this repository. Background As C++ developers [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/35268","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/users\/75387"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=35268"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/35268\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/35304"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=35268"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=35268"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=35268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}