CMake Tutorial EP 4 | Versioning Source Code

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

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 М.
WHO LAUGHS LAST LAUGHS BEST 😎 #comedy
00:18
HaHaWhat
Рет қаралды 20 МЛН
That's how money comes into our family
00:14
Mamasoboliha
Рет қаралды 11 МЛН
Best father #shorts by Secret Vlog
00:18
Secret Vlog
Рет қаралды 21 МЛН
HAPPY BIRTHDAY @mozabrick 🎉 #cat #funny
00:36
SOFIADELMONSTRO
Рет қаралды 13 МЛН
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 М.
Naming Things in Code
7:25
CodeAesthetic
Рет қаралды 2 МЛН
ASMR Programming - Spinning Cube - No Talking
20:45
Servet Gulnaroglu
Рет қаралды 3,7 МЛН
When RESTful architecture isn't enough...
21:02
Dreams of Code
Рет қаралды 246 М.
Simulating the Evolution of Rock, Paper, Scissors
15:00
Primer
Рет қаралды 546 М.
What is Semantic Versioning?
4:46
Bogdan Stashchuk
Рет қаралды 33 М.
❌🔵⚫️ WHO DID WIN!?🥇🥈🥉
0:10
ag_soccer team
Рет қаралды 4,5 МЛН
КАК ДУМАЕТЕ КТО ВЫЙГРАЕТ😂
0:29
МЯТНАЯ ФАНТА
Рет қаралды 1,9 МЛН