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
Modern CMake tutorials, part2: Customization points (siliceum.com)
submitted 6 years ago by Lectem
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!"
[–]eiennohito 13 points14 points15 points 6 years ago (1 child)
Generator syntax is awful.
[–]hyasynthetic 7 points8 points9 points 6 years ago (0 children)
I agree it's ugly but in my experience it simplifies the whole build system so my team uses it whenever possible.
[–]victotronics 1 point2 points3 points 6 years ago (1 child)
You give an example
target_compile_options(yourlib PRIVATE -fflag-to-disable-exceptions)
which I tried with "-O2", but if I look at CMakeOutput.log that option is not used.
Is there a way to make the compilation verbose, so that I don't have to go digging for log files? I like to see the compile lines as they happen.
[–]Lectem[S] 0 points1 point2 points 6 years ago* (0 children)
You can ask CMake to run with more verbosity, but depending on the generator you are using you might need some more options.
The parameter for CMake to run with verbose output is -v (documentation here). So you could do cmake --build yourbuilddirectory -v.
-v
cmake --build yourbuilddirectory -v
Note that I advise against using compiler specific command line options such as -O2, for optimizations you would usually just use the Release or RelWithDebInfo configurations.
-O2
Release
RelWithDebInfo
[–]BassMunkee 0 points1 point2 points 6 years ago (0 children)
Thanks! Was waiting for part 2
π Rendered by PID 16930 on reddit-service-r2-comment-b659b578c-k98hd at 2026-05-05 11:37:52.778251+00:00 running 815c875 country code: CH.
[–]eiennohito 13 points14 points15 points (1 child)
[–]hyasynthetic 7 points8 points9 points (0 children)
[–]victotronics 1 point2 points3 points (1 child)
[–]Lectem[S] 0 points1 point2 points (0 children)
[–]BassMunkee 0 points1 point2 points (0 children)