More Modern CMake - Deniz Bahadir - Meeting C++ 2018

  Рет қаралды 29,423

Meeting Cpp

Meeting Cpp

Күн бұрын

More Modern CMake (Reupload with slide recording provided by speaker, thanks Deniz!)
Deniz Bahadir
Meeting C++ 2018
Slides: meetingcpp.com/mcpp/slides

Пікірлер: 17
@retropaganda8442
@retropaganda8442 5 жыл бұрын
So, now that cmake finally joined the boat of build systems with sane concepts, it may be time to give it a sane syntax.
@yuricherkasov
@yuricherkasov 4 жыл бұрын
I was always dreaming of converting all that messy Perl-like syntax into something like Python
@ZhanhuiLi
@ZhanhuiLi 3 жыл бұрын
With knowledge from this lecture, projects managed by CMake become ever easier to understand and maintain. Big thanks!
@Deniz.Bahadir
@Deniz.Bahadir 4 жыл бұрын
The sequel to this talk can be found here: kzbin.info/www/bejne/r2rOhKVrmtOlic0
@petermuller9518
@petermuller9518 5 жыл бұрын
I always wondered why I have to define a source wenn adding a static library. Nice to see it fixed in 3.11 :)
@cykkm
@cykkm 3 жыл бұрын
The hardcoded /opt/boost path is not modern CMake. Try to run this in a CI pipeline...
@PeterPetrakis
@PeterPetrakis 5 жыл бұрын
A fantastic presentation. So good in fact that it's finally justified to me that I should take a serious look at other build systems, like meson, build2, and evoke. cmake is just too heavy to code in without requiring an IDE of it's own to be able to introspect the properties to keep you productive without getting killed by "off by one" variable name errors.
@anthonymonterrosa4383
@anthonymonterrosa4383 5 жыл бұрын
This seems rash, in my opinion, but maybe cmake isn't ideal for your projects. Terseness of a language is inversely related to its flexibility, and cmake made has made the deliberate decision to give us quite a bit of freedom in structuring our code. Also, I think it hurt the presentation to show the old cmake code. The right side is much more approachable when viewed by itself.
@addit2
@addit2 5 жыл бұрын
For everyone with no access to "More Modern CMake": In "Modern CMake" (since 3.1 because of target_sources) you can wrap your object library or imported library with an interface library. It's not pretty, but it's a decent workaround for most of the issues mentioned in this presentation. Here is an example: add_library(someexternallib OBJECT someexternallib/someexternallib.cpp someexternallib/someexternallib.h ) set_property(TARGET someexternallib PROPERTY POSITION_INDEPENDENT_CODE ON) target_compile_definitions(someexternallib PRIVATE SOME_MACRO ) add_library(someexternallib_interface INTERFACE) target_sources(someexternallib_interface INTERFACE $ ) target_compile_definitions(someexternallib_interface INTERFACE SOME_MACRO ) target_include_directories(someexternallib_interface INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/someexternallib" ) add_library(3rdparty::someexternallib ALIAS someexternallib_interface )
@afigegoznaet
@afigegoznaet 5 жыл бұрын
Normal slides, finally :)
@qili3532
@qili3532 4 жыл бұрын
thanks a lot, I'm wondering where can I find the sample code?
@qili3532
@qili3532 4 жыл бұрын
sorry, speaker attach the source code web link already in the slides: github.com/Bagira80/More-Modern-CMake
@mwont
@mwont 5 жыл бұрын
Before people were writing Makefiles to compile c++ code. But they got complicated, so cmake was created to generated the Makefiles. But now cmake is becoming so complex, that a new tool needs to be developed that will generate cmake for you, which in turn can generated Makefile.
@retropaganda8442
@retropaganda8442 4 жыл бұрын
That new tool could just be ... makefiles :p
@ovrskr
@ovrskr 2 ай бұрын
@@retropaganda8442 Makefiles work great until you try to do anything on a path with spaces. Which very helpfully is the case on just about every Windows system! Don't get me wrong, I love my Makefiles, just all the build tools suck in a way :-(
@ovrskr
@ovrskr 2 ай бұрын
if it's not broken, don't fix it. now there's so many ways to import and the build system is a mess -_-
@Stradigos
@Stradigos 3 жыл бұрын
I'm confused.
He sees meat everywhere 😄🥩
00:11
AngLova
Рет қаралды 9 МЛН
Just try to use a cool gadget 😍
00:33
123 GO! SHORTS
Рет қаралды 85 МЛН
Writing cache friendly C++ - Jonathan Müller - Meeting C++ 2018
54:38
How to Do 90% of What Plugins Do (With Just Vim)
1:14:03
thoughtbot
Рет қаралды 870 М.
Deep CMake for Library Authors - Craig Scott - CppCon 2019
1:01:35
Does CMake Only Work for C++? And Other Questions...
5:32
Kea Sigma Delta
Рет қаралды 215
The Tragedy of systemd
47:18
linux.conf.au
Рет қаралды 1,1 МЛН
Lecture 6: Version Control (git) (2020)
1:25:00
Missing Semester
Рет қаралды 666 М.
CppCon 2018: Jason Turner “Applied Best Practices”
1:03:19
Неразрушаемый смартфон
1:00
Status
Рет қаралды 2 МЛН
Best mobile of all time💥🗿 [Troll Face]
0:24
Special SHNTY 2.0
Рет қаралды 856 М.
Урна с айфонами!
0:30
По ту сторону Гугла
Рет қаралды 7 МЛН