Ghasem Ramezani(My opinions aren't mine)
A C++ jerk who is living with his beautiful ThinkPad
Contents:
PDF File(GhasemRamezani.pdf)
Contents:
Configuring CMake properly can be challenging. Here are some of my frequently used configurations that may help:
- #Executables: This configuration helps you to set up an executable target with RPATH defined as $ORIGIN/lib -> $ORIGIN/../lib -> $ORIGIN, and all the required config files for find_package are exported including ConfigVersion.cmake.
- #SharedLibrary: This setup will assist you in creating a target that is fully versioned. With this you can install multi-version of the same library in your system.
- #FetchContents: Two code snippet for fetching Google Benchmark and Google Test.
- #QtCreatorPlainCpp: Template for Qt Creator project.
Here are some of the utility functions that make life easier:
- #Core_Utility_FethQMakeContent: Using this module you can clone/patch/build QMake projects at the CMake Configuration time.
Example:
include(CMakeCommon)
Core_Utility_FetchQMakeContents(
GIT_REPOSITORY https://github.com/SMR76/knight-pen.git
QMAKE_CONFIG_DIRECTORY src/knight-pen
APPLY_PATCH ${CMAKE_CURRENT_SOURCE_DIR}/Knight-pen.diff
)
- #Core_Details_FetchQMakeContents_ConfigureQMake: Executes qmake -project and qmake -makefile on the input.
- #Core_Details_FetchQMakeContents_BuildQMake: Executes make -j on build_dir.
- #Core_Details_FetchQMakeContents_InstallQMake: Executes make install on build_dir.
- #Core_Utility_CloneRepository: This is a helper function for cloning the GIT repositories.
- #Core_Details_Git_Clone: Low level function for cloning repositories.
- #Core_Details_Git_Pull: Uses git specified by binary to perform a git pull on output.
- #Core_Details_Git_Update_Submodules: Updates all the submodules recursivly using binary path for git in output directory.
- #Core_Details_Git_Reset: Performs a git reset -- at output with binary git binary file.
- #Core_Details_Git_Apply: Applying a patch file refered by patch_file in output directory using binary file.
- #Core_Utility_GetRepoName: Take a url ended with .git and returns the repository name in repo_name using a regex.
Here are some simple examples of C++ programming language.
A simple template for my stupid QWidget projects.
Contents:
- Learn CS from CS101++
- Learn Modern C++ from LearnC++
- Learn Concurrency from "C++ Concurrency in Action", Anthony Williams, 2th Edition
- Read up to Chapter 5: Memory Model
- Learn Template and Metaprogramming from "C++ Templates: The Complete Guide"
- Learn CMake from my course CMake Intro
- Learn Git from Jadi
- Checkout the awesome git repository for beginners in open source contribuions
Why doesn't it end?