CMake if() is NOT short circuit.
This requires care with undefined variables, which we show by example.
# syntax error if "undef1" is undefined
# if(1 AND ${undef1})
# endif()
if(0ORundef2)message(FATAL_ERROR"unexpected behavior with undefined variable evaluated as string.")endif()
CMake --debug-find option gives extensive human-readable trace output for where the CMake find_ operations are looking for files.
In most CMake projects, there are many find_ operations, and so the cmake --debug-find output can be overwhelming to scroll through.
The example commands refer to this CMake script:
# arbitrary other packages not of interest to trace finding
find_package(Git)# package that's not working right, to debug
find_package(LAPACK)# arbitrary find_* to trace variable
find_library(MYLIBNAMESmylib)
Package-specific debug-find is available:
cmake --debug-find-pkg=LAPACK
Variable-specific debug-find is available:
cmake --debug-find-var=MYLIB
It’s also possible to target specific find_* calls via
CMAKE_FIND_DEBUG_MODE.
To debug only the finding of LAPACK:
# arbitrary other packages that are not of interest to trace finding
find_package(Git)# package that's not working right, to debug
set(CMAKE_FIND_DEBUG_MODEon)find_package(LAPACK)set(CMAKE_FIND_DEBUG_MODEoff)
This is an informal discussion based on personal experience from late 1990s to present day in the United States during various non-local domestic incidents.
Always follow advice from authorities as priority.
The phone tree has become
derided
as a first choice for organizational awareness.
For more informal situations like connecting family groups spread out across states and regions, an informal phone tree can be a backup choice.
A key element of this approach is that before a crisis emerges, give/collect phone numbers to several people in a city or region.
At least some of these should be people more on the fringes of your social network but still connected in some other way (perhaps a relative in another city of someone you know locally).
In this way, the remote and local connections to you are motivated to keep the chain going since there is a friend or family connection beyond yourself.
This technique is ideally copied across each ’node’ of the phone tree.
Instead of blast group SMS text messages, which can get delayed and become overwhelming in alerting the recipients with a flood of messages, a phone text tree allows each node to decide which subset is best served by passing on that message.
For example, the more maker-savvy folks may appreciate new info on fan filter box construction, while those needing particular supplies may appreciate knowing a store or website suddenly has availability.
Blast group text message sent informally even in family groups may suffer from a cascading effect where too much chit chat causes recipients to “tune out” their attention and miss more important messages.
A key idea is to target messaging from each human node using their knowledge of connecting human nodes.
This is like a Mechanical Turk for urgent text messaging.
The more targeted nature of the messaging incentives spreading more carefully curated information.
Government authorities can broadcast text messages using
WEA
to cell phones–I have generally had positive experiences with this during severe weather events.
The non-WEA, non-CMAS SMS text alert services commonly used by universities and other campuses too often experience delays, where one person may receive an alert minutes after others in the same vicinity.
The original 5 watt Qi was good for overnight charging.
USB-PD quick charging can yield charging in 20 minutes for 50%, full charge in an hour.
Qi EPP can yield 15 watt charge with appropriate devices, which is close enough to wired USB-PD useful for top-off day charging.
Using the manufacturer recommended charger (typically USB-PD) to power the wireless charger is vital to meet full power specs.
The closer the phone (thinner the case) and better aligned the phone is, the faster and cooler it will charge.
If the device is getting too hot, it will backoff the charge rate to maintain appropriate temperature.
The thermal insulating effect of the phone case retains extra heat from charging.
Be aware that some stands like the Pixel Stand 2 do not allow for sideways (landscape) device orientation while charging.
GNU Octave
prerelease binaries
give the latest features.
Note that the latest prerelease may be older than the latest stable release.
The
NEWS
file shows significant feature highlights that are easier to discern than the Changelog.
The
Tablicious
package gives GNU Octave support for newer Matlab classes including:
string akin to Python strings–note quite limited and distinct support.
CMake can create
relocatable installer or archive packages
with
CPack.
CPack creates an archive or installer from a CMake project.
C and C++ programs generally use header files (.h or .hpp) that must be part of an installed package.
Fortran programs likewise use module files (.mod) that must be installed.
A basic structure for a CMake project that can create a CMake config-file package is shown in
cmake-package-install.
The boilerplate code under cmake/ directory is only slightly modified between projects.
For example, see h5fortran for more advanced example in cmake/install.cmake and cmake/config.cmake.in.
On Windows, Anaconda Python can install GCC libraries such as libstdc++ and libgfortran et al under miniconda3/Library/mingw-w64/bin.
This path is put by default by fresh Anaconda installation on Path by “conda activate”, but no files are installed there until certain packages are installed.
These libraries are for a particular GCC version, and are not necessarily ABI compatible with the GCC version on the system perhaps from MSYS2.
This problem can manifest as Windows error code 139 when running other executables that need say libstdc++ but Anaconda’s path is overriding the desired GCC lower on Path.
The solution to this problem could be either:
uninstall the conda Python package that installed those libraries
rename the Library/mingw-w64/bin e.g. to bin-backup and see if the needed Python packages still work
We generally recommend using
Ninja with CMake,
especially for large projects.
Ninja speeds up rebuild times significantly and avoids erratic problems with slower GNU Make.
CMake also has the
Ninja Multi-Config
generator
cmake -G "Ninja Multi-Config"
that allows building multiple build configuration types e.g. Debug, Release without CMake regenerating build*.ninja files for each build type with totally distinct build root directories.
Ninja Multi-Config generator options may be used transparently with older CMake and different generators.
The default CMake generator can be set with environment variable:
Patching files with
GNU Patch
has been a common task for decades.
Due to
technical issues
with potential patch library implementation, CMake does not include a native patch function.
We use CMake to detect if “patch” is available, which it virtually always is on Unix-like systems.
For Windows, we use
MSYS2
or
WSL.
CMake Patch file repository example
uses standard GNU Patch files across operating systems.
We put the patched file into the binary directory to avoid ambiguity.
The file patching occurs only if the source file changes using canonical CMake approach.
With slight modification, this patching can occur on files obtained via CMake FetchContent, header files, or other resources.