This file contains hidden or 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
| # an example of the way how undocumented option of MSVC compiler, /d1reportallclasslayout, | |
| # can be used to generate static reflection information for C++ sources | |
| import sys | |
| import re | |
| import subprocess | |
| cl_exe = 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\Hostx64\\x64\\cl.exe' | |
| file = 'test.cc' |
This file contains hidden or 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
| if(NOT MAX_BUILD_JOBS) | |
| set(MAX_BUILD_JOBS 15) | |
| endif() | |
| # A simple function for importing a cmake-friendly buildable (and installable!) project | |
| function(build_cmake_package SRC_DIR BIN_DIR PKG_DIR CFG_TYPE CFG_ARGS) | |
| set(_CFG_ARGS -G ${CMAKE_GENERATOR}) | |
| if(CMAKE_GENERATOR_PLATFORM) | |
| set(_CFG_ARGS ${_CFG_ARGS} -A ${CMAKE_GENERATOR_PLATFORM}) |
This file contains hidden or 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
| # universal function for adding a standard layout module | |
| # usage: add_module({MODULE_NAME} [NO_CONSOLE] [DIR direcory] [TYPE executable|library] [DEPENDS target1 target2 ...]) | |
| # NO_CONSOLE (Win32): set entry point to WinMain instead of main() | |
| # TYPE: module type, default is library | |
| # DIR: module base directory | |
| # DEPENDS: list of libraries(another modules) to link with | |
| # DEBUG_DIR: debugger startup directory (Visual Studio only) | |
| function(add_module MODULE_NAME) | |
| if(NOT MODULE_NAME) | |
| message("add_module(): module name not specified") |
This file contains hidden or 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 <cstddef> | |
| #include <type_traits> | |
| #include <tuple> | |
| #include <iostream> | |
| namespace tuple_utils { | |
| template<typename ElementType, const size_t TypeOrdinal, size_t MatchCounter, size_t OverallCounter, typename Tuple> | |
| ElementType & get_by_index_and_type(Tuple && tuple) { |
This file contains hidden or 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
| #pragma once | |
| #include <algorithm> | |
| /* | |
| * Convenient and scalable value statistics wrapper | |
| */ | |
| template<typename T> | |
| struct Statistics | |
| { |
This file contains hidden or 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
| /* | |
| * Device Tree overlay for Waveshare 3.5inch TFT LCD and Orange Pi Zero | |
| * This dts is a compilation of two different dts files: | |
| * 1. olehs' dts for ili9486/xpt2046 and Orange Pi PC: | |
| * https://gist.github.com/olehs/1cd3e5ddf45066380df68a70d6f8462a | |
| * 2. Viroid's dts set for ili9341/xpt2046 and Orange Pi Zero: | |
| https://4pda.to/forum/index.php?s=&showtopic=782242&view=findpost&p=112401076 | |
| * The dts was tested at Orange Pi Zero LTS | |
| * uname -a: | |
| * `Linux opi-fbg5 5.15.48-sunxi #22.05.3 SMP Wed Jun 22 07:35:10 UTC 2022 armv7l GNU/Linux` |
OlderNewer