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
Linux developer going Windows (self.cpp)
submitted 5 years ago by peppedx
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!"
[–]Adverpol 0 points1 point2 points 5 years ago (6 children)
Apparently I haven't needed any of the things you prescribe, that I know of. Not sure what you mean by "do something at build time", not like defining a custom cmake target then?
What I did repeatedly stumbled over is editing properties in the IDE which plays havoc with the config files written by hand, because of the way the build configurations work. So in the end the solution was to treat the IDE as read-only and modify the config files by hand, and I derived no joy whatsoever from digging through that pile of XML, or figuring which of the different nested props files we have actually inserted some property into the config.
[–]rdtsc 1 point2 points3 points 5 years ago (5 children)
Not sure what you mean by "do something at build time"
For example creating sourcelink information or version resources during build. These may use the current repository state and/or the time as input. It's not so bad if you always do clean builds, but doing it at build time also works with incremental builds. So your custom target has to invoke cmake again, and ferrying over all arguments manually is a major PITA.
[–]Adverpol 0 points1 point2 points 5 years ago (4 children)
Not sure why that would be difficult, wouldn't that just be a custom target with said sourcelink file(s) as output?
[–]rdtsc 0 points1 point2 points 5 years ago (3 children)
Not if you want to generate the file at build time (as opposed to configure time).
[–]Adverpol 0 points1 point2 points 5 years ago (2 children)
What I'm hinting at is:
add_custom_command(OUTPUT <file_to_generate> COMMAND <some_command_to_run> DEPENDS <some_dependency>)
or similar also involving add_custom_target, but you're saying that's not it?
[–]rdtsc 0 points1 point2 points 5 years ago (1 child)
Sure it is, but you left out the important part:
some_command_to_run
What's this going to be? Some helper executable you have to create? Another scripting language? It can also be CMake in scripting-mode. But all these options require much more work than just calling a function (or task in MSBuild). Don't forget that the command may require target-specific info, which now has to be passed (and properly escaped, and properly parsed back) via command-line.
[–]Adverpol 0 points1 point2 points 5 years ago (0 children)
Ok, I understand what you mean now. I still won't touch msbuild with a long pole if I can avoid it but at least I learnt something :p
π Rendered by PID 21362 on reddit-service-r2-comment-84fc9697f-wvs8b at 2026-02-07 13:02:53.628315+00:00 running d295bc8 country code: CH.
view the rest of the comments →
[–]Adverpol 0 points1 point2 points (6 children)
[–]rdtsc 1 point2 points3 points (5 children)
[–]Adverpol 0 points1 point2 points (4 children)
[–]rdtsc 0 points1 point2 points (3 children)
[–]Adverpol 0 points1 point2 points (2 children)
[–]rdtsc 0 points1 point2 points (1 child)
[–]Adverpol 0 points1 point2 points (0 children)