CMake Tutorial EP 4 | Versioning Source Code

  Рет қаралды 31,226

Code, Tech, and Tutorials

Code, Tech, and Tutorials

4 жыл бұрын

full CMake playlist: • CMake Tutorial EP 1 | ...
Find me, support me:
Stream: / overridetheprogram
Patreon: / codetechtuts
One time donations: www.paypal.com/paypalme/matte...
Shop via my Amazon Affiliates Link: amzn.to/3bVQ9X0
Business inquiries: codetechtuts@gmail.com
Thanks for coming to the channel to check out a video on Code, Tech, and Tutorials.

Пікірлер: 23
@dmcdcm
@dmcdcm 3 жыл бұрын
just fyi, this vid has highest vid quality of 360p. sometimes i dont notice when i upload. oh and hey, you are a life saver with these videos. Everything you are covering is necessary knowledge, except no one at university covers it, no online courses cover it, and the few youtubers who do don't do it well. So from the bottom of my heart, thank you.
@gabrielciordas3369
@gabrielciordas3369 2 жыл бұрын
Your CMake tutorials are so good that I subbed and enabled notifications.
@YourCRTube
@YourCRTube 3 жыл бұрын
BTW one can also use the regular ${} syntax instead of @@. The second one is only needed if the file to be transformed already use the first one
@chuongnguyen4980
@chuongnguyen4980 3 жыл бұрын
Great tutorial. I follow from EP1 to here, but have the error: the main.cpp can not find the "#include " when building, although this file is in build folder after run configure. I have to manually add #include "build/OLASConfig.h". Am I missing sth ? Thanks.
@chuongnguyen4980
@chuongnguyen4980 3 жыл бұрын
Oh, so I found that using this line does not work for my case (Cmake 3.16.3), : target_link_directories(${PROJECT_NAME} PUBLIC ${PROJECT_BINARY_DIR}) Replace it with the following works now: include_directories(${CMAKE_CURRENT_BINARY_DIR}) Source: cmake.org/cmake/help/latest/command/configure_file.html
@rodrickedwards2759
@rodrickedwards2759 Жыл бұрын
@@chuongnguyen4980 Worked for me. Thanks!
@followthewhiterabbit7559
@followthewhiterabbit7559 2 жыл бұрын
I am really binged on your videos for a couple of hours now, everything is great just the video quality seems to be pretty low in this one. hard to keep up with the things written in files.
@KP-nc9gk
@KP-nc9gk Жыл бұрын
add_compile_definitions in cmake can simplify this right?
@benmclemor2714
@benmclemor2714 2 жыл бұрын
hello, it does not work for me. I get the error, that OLAFConfig.h cannot be opened. No such file or directory. Does anyone have an idea why?
@rodrickedwards2759
@rodrickedwards2759 Жыл бұрын
Same here
@gru74ik
@gru74ik 3 жыл бұрын
I didn't get the point how the project can be built if we didn't create OLASConfig.h header (only OLASConfig.h.in has been created)?
@rexyliusde7681
@rexyliusde7681 3 жыл бұрын
I believe CMake auto-generates the OLASConfig.h file based on OLASConfig.h.in . The Make file then uses the auto-generated OLASConfig.h .
@user-do9qv8ex8y
@user-do9qv8ex8y 2 жыл бұрын
Why should we need two header files, which are h.in and .h ?
@salvadorhernandezlopez953
@salvadorhernandezlopez953 Жыл бұрын
because the h.in have the reference if you want to view of the other perspective it have the name of the constant, and the .h have the value
@sammyiboi
@sammyiboi 3 жыл бұрын
I'm finding that the best quality for this video is 360p. Maybe try re-uploading?
@CodeTechandTutorials
@CodeTechandTutorials 3 жыл бұрын
AHH I did not notice, not sure why that happened. Thanks for the heads up.
@0xredact3d
@0xredact3d 3 жыл бұрын
@@CodeTechandTutorials Is there an updated version now?
@masoodkamandy5370
@masoodkamandy5370 3 жыл бұрын
Can't tell if they're there or not because of the video quality, but the macro should look like this *with quotes*: #define MYPROJECT_VERSION_MAJOR "@MyProject_VERSION_MAJOR@" #define MYPROJECT_VERSION_MINOR "@MyProject_VERSION_MINOR@"
@realishak
@realishak 2 жыл бұрын
^^^THIS^^^
@glacierxs6646
@glacierxs6646 Жыл бұрын
thanks!!
@tharmarajahajantharajah2182
@tharmarajahajantharajah2182 Жыл бұрын
U save my day
@Ashish_singh_dev
@Ashish_singh_dev 7 ай бұрын
project(test VERSION 1.0) //didn't work for me //working code NOTE: ORDER SHOULD BE SAME project(test) set(TEST_VERSION_MAJOR "1") set(TEST_VERSION_MINOR "0") configure_file(TESTConfig.h.in TESTConfig.h) // In TESTConfig.h.in #define TEST_VERSION_MAJOR "@TEST_VERSION_MAJOR@" #define TEST_VERSION_MINOR "@TEST_VERSION_MINOR@"
CMake Tutorial EP 5 | Making Libs Optional
18:21
Code, Tech, and Tutorials
Рет қаралды 24 М.
CMake Tutorial EP 2 | Libraries and Subdirectories
17:29
Code, Tech, and Tutorials
Рет қаралды 117 М.
Was ist im Eis versteckt? 🧊 Coole Winter-Gadgets von Amazon
00:37
SMOL German
Рет қаралды 38 МЛН
How Many Balloons Does It Take To Fly?
00:18
MrBeast
Рет қаралды 111 МЛН
Этот Пёс Кое-Что Наделал 😳
00:31
Глеб Рандалайнен
Рет қаралды 2,8 МЛН
🤔Какой Орган самый длинный ? #shorts
00:42
Simplified CMake Tutorial
27:47
kandodev
Рет қаралды 113 М.
How-To Use C++ Libraries (without relying on a package manager)
30:22
Code, Tech, and Tutorials
Рет қаралды 52 М.
How One Line of Code Almost Blew Up the Internet
13:47
Kevin Fang
Рет қаралды 2 МЛН
Makefiles Make Your Life Easier
12:05
NeuralNine
Рет қаралды 87 М.
Simulating the Evolution of Rock, Paper, Scissors
15:00
Primer
Рет қаралды 557 М.
Naming Things in Code
7:25
CodeAesthetic
Рет қаралды 2 МЛН
Better CMake Part 3 -- The Basics of Targets
16:23
Jefferson Amstutz
Рет қаралды 19 М.
3 Tips To Write Clean Code (from an ex-Google software engineer)
17:12
Clément Mihailescu
Рет қаралды 192 М.
МЛАДШАЯ СЕСТРА И МОРОЖЕНОЕ ИЗ АРБУЗА
0:41
ОЛЯ ПЕРЧИК
Рет қаралды 3,5 МЛН
Простой дворник с большим сердцем 🫶
0:25
POR QUEEE DIVERTIDA MENTE 2 !!! #SHORTS
0:15
Figuritalo
Рет қаралды 44 МЛН
БУДЕТ ЗНАТЬ КАК ОБИЖАТЬ БАБУШКУ
0:18
МАКАРОН
Рет қаралды 1,3 МЛН
Ай ай 🤣
0:27
Dragon Нургелды 🐉
Рет қаралды 1,5 МЛН