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
# 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
# Workaround to make VS behave like unique-configuration generator: | |
if(WIN32 AND MSVC) | |
set_target_properties([TARGET] | |
PROPERTIES EXCLUDE_FROM_ALL TRUE) | |
# Build [TARGET] using CMAKE_BUILD_TYPE always, as unique-configuration makefiles | |
add_custom_target(build_msvc ALL | |
COMMAND ${CMAKE_COMMAND} --build \".\" --target [TARGET] --config ${CMAKE_BUILD_TYPE} | |
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) | |
endif() |
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
#include "tuple.hpp" | |
#include <iostream> | |
template<typename T> | |
std::intptr_t between(const T& lhs, const T& rhs) | |
{ | |
return reinterpret_cast<std::intptr_t>(&lhs) - reinterpret_cast<std::intptr_t>(&rhs); | |
} | |
template<typename 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
clang++ -std=c++14 main.cpp -o ctti.s -O3 -S -Wno-unused-value -ftemplate-depth=2048 -DCTTI_MAX_STRING_LENGTH=128 |
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
g++ main.cpp -o ctti.s -S -O3 -Wno-unused-value -ftemplate-depth=2048 -DCTTI_MAX_STRING_LENGTH=128 |
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 "piecewise_construct.hpp" | |
struct foo | |
{ | |
foo(int i, int j) : | |
i{i}, j{j} | |
{} | |
int i = 0, j = 0; | |
}; |
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
// | |
// Created by manu343726 on 16/06/15. | |
// | |
#ifndef ERASED_RANGE_HPP | |
#define ERASED_RANGE_HPP | |
#include <range/v3/all.hpp> | |
#include <type_traits> |
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
# This file has been auto-generated by i3-config-wizard(1). | |
# It will not be overwritten, so edit it as you like. | |
# | |
# Should you change your keyboard layout some time, delete | |
# this file and re-run i3-config-wizard(1). | |
# | |
# i3 config file (v4) | |
# | |
# Please see http://i3wm.org/docs/userguide.html for a complete reference! |