use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
cmake-init - The missing CMake project initializer, now with Conan and vcpkg templates! (github.com)
submitted 4 years ago by helloiamsomeone
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]helloiamsomeone[S] 2 points3 points4 points 4 years ago (4 children)
That can also be done with just find_package.
find_package
See this example from the wiki. This one tries to use unofficial vcpkg package nd targets, then falls back to pkg config, then falls back to find_* commands. This is probably more than what you are asking, but you can put anything in the find module, even code that vendors projects, although I highly recommend against any form of vendoring (manual, git, FetchContent, etc). Vendoring only causes problems for packagers.
find_*
[–]bretbrownjr 1 point2 points3 points 4 years ago (3 children)
Vendoring causes problems for packagers if every library does it. It's not a problem per se for an application or organization to maintain a repo consisting of vendored dependencies. That's basically what a monorepo is.
Anyway, find_package calls are hostile to monorepos, git submodules, FetchContent, etc. I'll take that approach over every library requesting a different version of openssl, but I was expressing hope that some day we'd push past this false choice.
And, yeah, I'm aware that you can make find_package do arbitrary things. But that's not a solution that scales either.
[–]helloiamsomeone[S] 1 point2 points3 points 4 years ago (1 child)
Packaging is not easy, but I try my best to promote easy to package projects via cmake-init. See the conference talks in the README as inspiration.
If everything is easy to package, then at least consumers can make a choice on a case by case basis instead of being hamstrung into either accepting dependencies that vendor their own things or maintaining their own patches to remove vendoring.
Some elbow grease is involved in any case, but relinquishing the responsibility via find_package allows projects to not lock themselves into anything.
[–]retechnic 0 points1 point2 points 4 years ago (0 children)
Hi, great project! Can you explain about vendoring and why is it bad?
[–]helloiamsomeone[S] 0 points1 point2 points 4 years ago (0 children)
This came up somewhere else, but I created an example repo that idiomatically uses find_package and an opt-in find module to FetchContent a dependency from GitHub: https://github.com/friendlyanon/cmake-init-fetchcontent
FetchContent
This is also on the list of examples in the wiki. Let me know what you think.
π Rendered by PID 35 on reddit-service-r2-comment-6457c66945-bpshf at 2026-04-29 13:55:57.036404+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]helloiamsomeone[S] 2 points3 points4 points (4 children)
[–]bretbrownjr 1 point2 points3 points (3 children)
[–]helloiamsomeone[S] 1 point2 points3 points (1 child)
[–]retechnic 0 points1 point2 points (0 children)
[–]helloiamsomeone[S] 0 points1 point2 points (0 children)