Skip to content

Instantly share code, notes, and snippets.

View zheltkov's full-sized avatar

Alex Zheltkov zheltkov

  • Düsseldorf, Germany
View GitHub Profile
@dlime
dlime / CMakeLists.txt
Last active May 13, 2024 12:59
Install Google Test and Google Mock on Ubuntu
cmake_minimum_required(VERSION 3.5)
project(example LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(GTest REQUIRED)
include_directories(${GTEST_INCLUDE_DIRS})
@mbinna
mbinna / effective_modern_cmake.md
Last active May 31, 2024 16:02
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@hi2p-perim
hi2p-perim / dynamiccastunique.cpp
Created March 22, 2015 17:37
dynamic_cast with unique_ptr
#include <iostream>
#include <memory>
struct A
{
virtual ~A() {}
};
struct B : public A
{
@doole
doole / install_python3.sh
Last active April 11, 2024 15:41
Python 3.3 installation script for Debian Wheezy
PY_VER="3.3.3"
# Update
apt-get update && apt-get dist-upgrade -y
# Install required packages
apt-get install -y build-essential libsqlite3-dev sqlite3 bzip2 libbz2-dev zlib1g-dev libssl-dev libgdbm-dev libreadline-dev libc6-dev
# Get, compile and install python3
cd /usr/local/src