This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Author: Manu Sánchez (Manu343726). Aug 2014 | |
//Everything started from this: http://stackoverflow.com/questions/25338795/is-there-a-name-for-this-tuple-creation-idiom | |
//Now, play with C++14! | |
#include <utility> | |
#include <iostream> | |
#include <exception> | |
template<typename... Ls> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* A simple Copy On Write (COW) string implementation. | |
* | |
* Copyright © 2014 Manu Sanchez. @Manu343726 on GitHub, Stack Overflow, etc. | |
* | |
* manu343726.github.io | |
* | |
* This program is free software. It comes without any warranty, to | |
* the extent permitted by applicable law. You can redistribute it | |
* and/or modify it under the terms of the Do What The Fuck You Want |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Custom target to do all the work with a simple command: | |
add_custom_target(run_all COMMAND ${CMAKE_COMMAND} -E echo \">>>> Running all variants\" WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) | |
set(common_flags "-DGENERATE_ASSEMBLY=${GENERATE_ASSEMBLY} -DCPU_MODEL=\"${CPU_MODEL}\"") | |
if(WIN32) | |
list(APPEND VARIANTS "-G \"Visual Studio 14\" -DCMAKE_BUILD_TYPE=Release") | |
list(APPEND VARIANTS "-G \"Visual Studio 14\" -DCMAKE_BUILD_TYPE=Debug") | |
list(APPEND VARIANTS "-G \"Unix Makefiles\" -DCMAKE_BUILD_TYPE=Release") | |
list(APPEND VARIANTS "-G \"Unix Makefiles\" -DCMAKE_BUILD_TYPE=Debug") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install quemu, docker, etc | |
yaourt -S qemu qemu-user-static binfmt-support | |
# The quemu-user-static AUR package is outdated and broken. The .deb package they pull is no longer in the ubuntu repository. | |
# Edit the PKGBUILD and use qemu-user-static_2.4+dfsg-3_amd64.deb (With SHA1 sum "84d83a16c60c82b6c579f2f750b04a3ac26c249b") | |
# Enable ARM emulation | |
update-binfmts --enable qemu-arm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Variables: | |
# | |
# OUTPUT_DIRECTORY: Directory where the assemblu file will be placed (For example "/home/manu/listings") | |
# ASSEMBLY_LISTING_FILE: Assembly listing filename (For example "foo.s") | |
# SOURCE_FILENAME: Name of the sourcefile being compiled (See bellow). For example "foo", from foo.cpp. | |
# TARGET: Target being compiled (Mostly an executable target). For example "foo". | |
if(MSVC) | |
# Trust me, Microsoft docs suck. | |
target_compile_options(${TARGET} "/Fa${OUTPUT_PATH}/${ASSEMBLY_LISTING_FILE}" /FA) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.4) | |
project(MyProject) | |
if(NOT MY_PROJECT_PROTOBUF_VERSION) | |
set(MY_PROJECT_PROTOBUF_VERSION 2.6.1) | |
endif() | |
option(MY_PROJECT_SHARED_LIBS "Build proto modules as shared libraries" OFF) | |
message(STATUS "Google Protocol Buffers version: ${MY_PROJECT_PROTOBUF_VERSION}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <tuple> | |
#include <cstdint> | |
#include <iostream> | |
namespace foonathan { | |
namespace string_id { | |
namespace detail | |
{ | |
using hash_type = std::uint64_t; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
external_dependency(rttr https://github.com/rttrorg/rttr.git v0.9.6) 17 external_dependency(MetaStuff https://github.com/Manu343726/MetaStuff master) + 18 mark_as_external_target(rttr_core) | |
mark_as_external_target(rttr) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef TEST_STRUCTS_H | |
#define TEST_STRUCTS_H | |
#include <string> | |
#include <vector> | |
#include <set> | |
namespace test_structs | |
{ | |
enum class Enum |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef TEST_STRUCTS_H | |
#define TEST_STRUCTS_H | |
#include <string> | |
#include <vector> | |
#include <set> | |
namespace test_structs | |
{ | |
enum class Enum |
NewerOlder