moved to https://github.com/geospace-code/trustedqsl-wsjtx-upload-lotw
[flake8] | |
max-line-length = 100 |
FetchContent_Declare(boost_ut | |
GIT_REPOSITORY https://github.com/boost-ext/ut.git | |
GIT_TAG v2.3.1) | |
FetchContent_MakeAvailable(boost_ut) | |
# link this object to your test executable, then call discover_boost_ut_test() on it | |
add_library(boost_ut_runner OBJECT test_runner.cpp) | |
target_link_libraries(boost_ut_runner PUBLIC Boost::ut) |
cmake_minimum_required(VERSION 3.19...4.2) | |
project(InstructionSet LANGUAGES CXX) | |
set(CMAKE_CXX_SCAN_FOR_MODULES OFF) | |
enable_testing() | |
include(CheckIncludeFileCXX) |
Using GitHub Actions cache is a little more complicated than not caching, but makes the setup time dramatically shorter.
This example uses MKL and MPI.
To avoid problems with the CI executing the scripts, do one time:
#!/usr/bin/env -S uv run --script | |
# /// script | |
# requires-python = ">=3.9" | |
# dependencies = ["zstandard; python_version < '3.14'"] | |
# /// | |
""" | |
https://docs.python.org/3.14/library/compression.zstd.html#compression.zstd.ZstdFile | |
""" |
# This file is for use with a Hugo blog. | |
# be careful using this on real-life site, so that the patterns below don't dump legitimate traffic! | |
# we use 410 to be more aggressive than 404, and to unclutter Netlify statistics | |
/.env /bot.html 410 | |
/blog.zip /bot.html 410 | |
/.git/* /bot.html 410 | |
/browserconfig.xml /bot.html 410 | |
/OLD/* /bot.html 410 | |
/404.html /bot.html 410 |
What is strict aliasing? First we will describe what is aliasing and then we can learn what being strict about it means.
In C and C++ aliasing has to do with what expression types we are allowed to access stored values through. In both C and C++ the standard specifies which expression types are allowed to alias which types. The compiler and optimizer are allowed to assume we follow the aliasing rules strictly, hence the term strict aliasing rule. If we attempt to access a value using a type not allowed it is classified as undefined behavior(UB). Once we have undefined behavior all bets are off, the results of our program are no longer reliable.
Unfortunately with strict aliasing violations, we will often obtain the results we expect, leaving the possibility the a future version of a compiler with a new optimization will break code we th
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
env = Environment( | |
CCFLAGS = ['-Wall', '-Werror'], | |
) | |
env.Program('mkdir_p_test', ['mkdir_p.c', 'test.c']) |