Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 42 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@ name: CI
on:
push:
branches:
- boilerplate
- master
- dev
- boilerplate
- cmake-fix
- idiomatic
- master
- rc1
- rc2
- rc3
- rc4
- rc5
- update
pull_request:

concurrency:
Expand Down Expand Up @@ -100,13 +104,15 @@ jobs:
mingw-w64-x86_64-cmake
mingw-w64-x86_64-make

- name: Install STLSoft dependency
- name: Install STLSoft and b64 dependencies
shell: bash
run: |
set -euo pipefail
DEPS="${RUNNER_TEMP}/sis-deps"
STLSRC="${RUNNER_TEMP}/stlsoft-src"
STLBUILD="${RUNNER_TEMP}/stlsoft-build"
B64SRC="${RUNNER_TEMP}/b64-src"
B64BUILD="${RUNNER_TEMP}/b64-build"
mkdir -p "$DEPS"
git clone --depth 1 https://github.com/synesissoftware/STLSoft "$STLSRC"
if [ "${{ matrix.c_compiler }}" = "cl" ]; then
Expand Down Expand Up @@ -137,6 +143,38 @@ jobs:
cmake --build "$STLBUILD" --parallel
cmake --install "$STLBUILD"
fi
git clone --depth 1 https://github.com/synesissoftware/b64 "$B64SRC"
if [ "${{ matrix.c_compiler }}" = "cl" ]; then
cmake -S "$B64SRC" -B "$B64BUILD" \
-DCMAKE_DISABLE_FIND_PACKAGE_MFC=TRUE \
-DCMAKE_PREFIX_PATH="$DEPS" \
-DCMAKE_INSTALL_PREFIX="$DEPS" \
-DBUILD_EXAMPLES=OFF \
-DBUILD_TESTING=OFF
cmake --build "$B64BUILD" --config "${{ env.BUILD_TYPE }}" --parallel
cmake --install "$B64BUILD" --config "${{ env.BUILD_TYPE }}"
elif [ "${{ matrix.c_compiler }}" = "mingw" ]; then
export PATH="/mingw64/bin:$PATH"
cmake -S "$B64SRC" -B "$B64BUILD" -G "MinGW Makefiles" \
-DCMAKE_BUILD_TYPE="${{ env.BUILD_TYPE }}" \
-DCMAKE_PREFIX_PATH="$DEPS" \
-DCMAKE_INSTALL_PREFIX="$DEPS" \
-DBUILD_EXAMPLES=OFF \
-DBUILD_TESTING=OFF
cmake --build "$B64BUILD" --parallel 2
cmake --install "$B64BUILD"
else
cmake -S "$B64SRC" -B "$B64BUILD" \
-DCMAKE_BUILD_TYPE="${{ env.BUILD_TYPE }}" \
-DCMAKE_C_COMPILER="${{ matrix.c_compiler }}" \
-DCMAKE_CXX_COMPILER="${{ matrix.cpp_compiler }}" \
-DCMAKE_PREFIX_PATH="$DEPS" \
-DCMAKE_INSTALL_PREFIX="$DEPS" \
-DBUILD_EXAMPLES=OFF \
-DBUILD_TESTING=OFF
cmake --build "$B64BUILD" --parallel
cmake --install "$B64BUILD"
fi
echo "SIS_DEPS=$DEPS" >> "$GITHUB_ENV"

- name: Configure
Expand Down Expand Up @@ -209,7 +247,7 @@ jobs:
cat > "$CONSUMER/CMakeLists.txt" <<'EOF'
cmake_minimum_required(VERSION 3.13)
project(pantheios_install_smoke CXX)
find_package(STLSoft REQUIRED)
# STLSoft and b64 must come from pantheios-config.cmake's find_dependency().
find_package(Pantheios REQUIRED)
add_executable(consumer consumer.cpp)
# Link order matters for GNU ld (static archives are single-pass):
Expand Down
15 changes: 15 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"editor.tabSize": 4,
},
"[c]": {
"editor.defaultFormatter": "ms-vscode.cpptools",
"editor.formatOnSave": true,
"editor.insertSpaces": true,
"editor.rulers": [ 60, 64, 68, 72, 76 ],
"editor.tabSize": 4,
Expand All @@ -14,6 +16,8 @@
"editor.tabSize": 4,
},
"[cpp]": {
"editor.defaultFormatter": "ms-vscode.cpptools",
"editor.formatOnSave": true,
"editor.insertSpaces": true,
"editor.rulers": [ 60, 64, 68, 72, 76 ],
"editor.tabSize": 4,
Expand Down Expand Up @@ -49,7 +53,17 @@
"editor.insertSpaces": true,
"editor.tabSize": 2,
},
"C_Cpp.autocompleteAddParentheses": true,
"C_Cpp.clang_format_fallbackStyle": "none",
"C_Cpp.clang_format_style": "file",
"C_Cpp.default.cStandard": "c17",
"C_Cpp.default.cppStandard": "c++17",
"C_Cpp.enhancedColorization": "enabled",
"C_Cpp.errorSquiggles": "enabled",
"C_Cpp.formatting": "clangFormat",
"C_Cpp.intelliSenseEngine": "default",
"cmake.configureOnOpen": false,
"debug.allowBreakpointsEverywhere": true,
"editor.detectIndentation": false,
"editor.insertSpaces": false,
"editor.renderWhitespace": "all",
Expand Down Expand Up @@ -128,6 +142,7 @@
"numeric": "cpp",
"optional": "cpp",
"ostream": "cpp",
"print": "cpp",
"queue": "cpp",
"random": "cpp",
"ranges": "cpp",
Expand Down
11 changes: 10 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# Pantheios - CHANGES <!-- omit in toc -->
# Pantheios - Changes <!-- omit in toc -->


## 1.0.1-rc2 - 6th September 2026

* **CMake** package configuration: loaded `CMakeFindDependencyMacro` and added conditional `find_dependency()` calls for **STLSoft** and **b64** in **`pantheios-config.cmake`**; ensures exported static targets (such as `Pantheios::Pantheios.core`) provide transitive interface link dependencies (`b64::core`, `STLSoft::STLSoft`) to downstream consumers without requiring callers to invoke `find_package(b64)` manually;
* version definition: added `PANTHEIOS_VER_1_0_1_RC2` (`0x010001e2`) and updated `PANTHEIOS_VER` to RC2 in **include/pantheios/pantheios.h**;
* tooling and configuration: added **`.vscode/settings.json`**;
* documentation and release alignment: updated **NEWS.md**, **INSTALL.md**, and **KNOWN_ISSUES.md** for the 1.0.1-rc2 release;


## 1.0.1-rc1 - 5th August 2026
Expand All @@ -7,6 +15,7 @@
* documentation modernisation: **CHANGES.md** (from **CHANGES.txt**), removal of **HISTORY.md** and **README.txt**, and updates to **README.md**, **FAQ.md**, **INSTALL.md**, **TODO.md**, **KNOWN_ISSUES.md**, **AUTHORS.md**, and **HOW_YOU_CAN_HELP.md**;
* new stock back-end **bec.AnsiConsole** / **be.AnsiConsole** (bel/ber, colouring flags, argument parsing, unit and scratch tests);
* **CMake** enhancements: **Threads** / `PANTHEIOS_FORCE_MT`, `BUILD_TESTING`, optional **b64** via `NO_B64` / **`--no-b64`**, CMP0177, lowercase export package (**`pantheios-config.cmake`**), improved **STLSoft** include handling, and **`_BUILD_AS_UNIX`** / **`_BUILD_AS_WIN32`** OS discrimination;
* **CMake** package config: `find_dependency()` for **STLSoft** and (when built with it) **b64**, so consumers of **`Pantheios::Pantheios.core`** no longer see a missing **`b64::core`** imported target;
* modern composite **`PANTHEIOS_VER`** (`MAJOR` / `MINOR` / `PATCH` / `ALPHABETA`); **`test.unit.getversion`** covers those fields via **xTests** terse-api assertions; scratch **`libver`** + top-level **`libver.sh`**;
* helper scripts: **`.sis/project_name.txt`** / **`.sis/script_info_lines.txt`** wired into **`--help`** and status messages; **run_all_examples.sh**; **run_all_unit_tests.sh** gains **`--unit-only`** / **`--component-only`**; test runners exclude **`*.log`** from discovery;
* **bec.file**: create log files without execute permission (was `S_IRWXU`/`S_IRWXG`, which made suite-named logs executable and runnable by test discovery);
Expand Down
12 changes: 6 additions & 6 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ The **prepare_cmake.sh** script has a bunch of command-line flags/options to cus

```plaintext
Pantheios is an efficient, flexible, and robust C/C++ diagnostic logging library
Copyright (c) 2019-2024, Matthew Wilson and Synesis Information Systems
Copyright (c) 2019-2026, Matthew Wilson and Synesis Information Systems
Copyright (c) 2005-2019, Matthew Wilson and Synesis Software
Creates/reinitialises the CMake build script(s)

Expand Down Expand Up @@ -128,7 +128,7 @@ $ sudo cmake --install ${SIS_CMAKE_BUILD_DIR:-./_build} --config Release
1. Download the latest distributions;

Obtain the latest releases of **Pantheios** and **STLSoft** from:
* [Pantheios GitHub project](https://github.com/synesissoftware/Pantheios/tags), e.g. [**Pantheios-1.0.1-rc1.zip**](https://github.com/synesissoftware/Pantheios/archive/refs/tags/1.0.1-rc1.zip);
* [Pantheios GitHub project](https://github.com/synesissoftware/Pantheios/tags), e.g. [**Pantheios-1.0.1-rc2.zip**](https://github.com/synesissoftware/Pantheios/archive/refs/tags/1.0.1-rc2.zip);
* [STLSoft GitHub project](https://github.com/synesissoftware/STLSoft/tags), e.g. [**STLSoft-1.11.1-rc4**](https://github.com/synesissoftware/STLSoft/archive/refs/tags/STLSoft-1.11.1-rc4);


Expand All @@ -137,7 +137,7 @@ Obtain the latest releases of **Pantheios** and **STLSoft** from:
```bash
$ mkdir -p ~/open-source
$ cd ~/open-source
$ unzip Pantheios-1.0.1-rc1.zip
$ unzip Pantheios-1.0.1-rc2.zip
$ unzip STLSoft-1.11.1-rc4
```

Expand All @@ -146,7 +146,7 @@ $ unzip STLSoft-1.11.1-rc4
4. Select and change to the appropriate build subdirectory under your **Pantheios** directory, e.g. **build/gcc48.unix**, and then execute make

```bash
$ cd Pantheios-1.0.1-rc1
$ cd Pantheios-1.0.1-rc2
$ cd build/gcc48.unix
$ make
```
Expand Down Expand Up @@ -185,8 +185,8 @@ $ make

This project comes with a number of scripts useful for building with **CMake**, as follows:

| Script | Purpose |
| ------------------------- | ------- |
| Script | Purpose |
| ------ | ------- |
| **build_cmake.sh** | Executes **CMake**-generated artefacts to (re)build project.<br/><br/>Performs a (re)build, meaningful only once `prepare_cmake.sh` has been run once to generate all the **CMake** build artefacts.<br/><br/>Use `./build_cmake.sh --help` for further information. |
| **clean_cmake.sh** | Executes **CMake**-generated artefacts to clean project.<br/><br/>Performs a (re)build, meaningful only once `prepare_cmake.sh` has been run once to generate all the **CMake** build artefacts and a build has been run.<br/><br/>Use `./clean_cmake.sh --help` for further information. |
| **libver.sh** | Builds (unless suppressed) and runs the **libver** scratch program, which prints composite version macros for **Pantheios** and its discovered dependencies.<br/><br/>Use `./libver.sh --help` for further information. |
Expand Down
4 changes: 2 additions & 2 deletions KNOWN_ISSUES.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Pantheios - Known Issues <!-- omit in toc -->


## Pantheios 1.0.1-rc1 Known Issues
## Pantheios 1.0.1-rc2 Known Issues

* still a few build artefacts not cleaned up for some makefiles;
* distribution contains makefiles and project files for obsolete compilers (such as VC++ 5, Comeau, …);


## Pantheios 1.0.1-rc1 Suspected Issues
## Pantheios 1.0.1-rc2 Suspected Issues

* \<none>

Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

| Date | News Item |
| -------------- | -------------------------------------------------------------------------------- |
| 6th Sep 2026 | [Pantheios 1.0.1-rc2 released](https://github.com/synesissoftware/Pantheios/releases/tag/1.0.1-rc2) |
| 5th Aug 2026 | [Pantheios 1.0.1-rc1 released](https://github.com/synesissoftware/Pantheios/releases/tag/1.0.1-rc1) |
| 18th Nov 2024 | Pantheios 1.0.1-beta222 released |
| 24th Oct 2024 | Pantheios 1.0.1-beta221 released |
Expand Down
74 changes: 74 additions & 0 deletions cmake/pantheios-config.cmake.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,77 @@
@PACKAGE_INIT@

include(CMakeFindDependencyMacro)

# ##########################################################################
# Transitive Dependencies
#
# Pantheios builds and exports static library targets
# (Pantheios::Pantheios.core, Pantheios::Pantheios.util, back-ends,
# front-ends, and utilities).
#
# In CMake, private link dependencies of static libraries are exported into
# INTERFACE_LINK_LIBRARIES (wrapped in $<LINK_ONLY:...>) in the generated
# pantheios-targets.cmake file so downstream consumers linking static
# archives can resolve all referenced symbols at final link time.
#
# When downstream consumers call find_package(pantheios), CMake loads
# pantheios-targets.cmake and verifies that any targets named in
# INTERFACE_LINK_LIBRARIES already exist in the imported target namespace.
# If an imported target (e.g. b64::core or STLSoft::STLSoft) has not been
# defined yet, CMake reports a configuration error:
#
# "The link interface of target ... contains: ... but the target was not found."
#
# and the build fails during linking because the linker attempts to resolve
# the target name as a literal file or library flag (e.g. -lb64::core).
#
# Using CMakeFindDependencyMacro's find_dependency() solves this by loading
# cleanly the required imported target definitions while forwarding the
# calling project's QUIET and REQUIRED flags.
#
# Why these calls are strictly CONDITIONAL:
#
# 1. STLSoft (@STLSoft_FOUND@):
# Pantheios public headers and internals depend on STLSoft. When
# Pantheios was configured and built with STLSoft discovered via CMake
# find_package() (@STLSoft_FOUND@ is true), exported targets reference
# STLSoft::STLSoft, and downstream consumers must find that CMake
# package. If STLSoft was provided via a manual include path (e.g. via
# the STLSOFT variable or environment variable without CMake package
# export), @STLSoft_FOUND@ is empty/false and no CMake target dependency
# is exported or required.
#
# 2. b64 (@b64_FOUND@):
# b64 is an OPTIONAL dependency for Pantheios, providing the
# pantheios::b64 inserter class in Pantheios.core.
# - If Pantheios was built WITH b64 (@b64_FOUND@ is true), Pantheios.core
# compiles b64 support and links b64::core. The exported targets file
# therefore requires b64::core in its link interface, and downstream
# consumers must locate b64.
# - If Pantheios was built WITHOUT b64 (e.g. via NO_B64 or because b64
# was not present at build time), b64 support is omitted and
# pantheios-targets.cmake contains no reference to b64::core. In that
# scenario, calling find_dependency(b64) unconditionally would fail on
# systems where b64 is not installed, needlessly breaking downstream
# consumers.
#
# Guarding with @STLSoft_FOUND@ and @b64_FOUND@ ensures downstream discovery
# precisely mirrors the dependencies linked into the installed Pantheios
# binary.
# ##########################################################################

if(@STLSoft_FOUND@)

find_dependency(STLSoft)
endif()

if(@b64_FOUND@)

find_dependency(b64)
endif()

include("${CMAKE_CURRENT_LIST_DIR}/@EXPORT_NAME@-targets.cmake")


# ############################## end of file ############################# #

5 changes: 3 additions & 2 deletions include/pantheios/pantheios.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Purpose: Pantheios Core and Util APIs.
*
* Created: 21st June 2005
* Updated: 5th August 2026
* Updated: 6th September 2026
*
* Home: http://www.pantheios.org/
*
Expand Down Expand Up @@ -118,13 +118,14 @@
# endif
# define PANTHEIOS_VER_1_0_1_B224 0x010001e0
# define PANTHEIOS_VER_1_0_1_RC1 0x010001e1 /* NOTE: e1 is required just to step over the prior 1.0.1 beta version values */
# define PANTHEIOS_VER_1_0_1_RC2 0x010001e2
# define PANTHEIOS_VER_1_0_1 0x010001ff
#endif /* !PANTHEIOS_DOCUMENTATION_SKIP_SECTION */

#define PANTHEIOS_VER_MAJOR 1
#define PANTHEIOS_VER_MINOR 0
#define PANTHEIOS_VER_PATCH 1
#define PANTHEIOS_VER_ALPHABETA 0xE1
#define PANTHEIOS_VER_ALPHABETA 0xE2

#define PANTHEIOS_VER \
(0\
Expand Down
14 changes: 10 additions & 4 deletions projects/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,16 @@ target_include_directories(Pantheios.core

target_link_STLSoft(Pantheios.core)

target_link_libraries(Pantheios.core
PRIVATE
$<$<BOOL:${b64_FOUND}>: b64::core >
)
# Link b64 only when discovered at configure time. Prefer a plain
# target_link_libraries() over a generator expression so the exported
# interface records `$<LINK_ONLY:b64::core>` cleanly (static lib).
if(b64_FOUND)

target_link_libraries(Pantheios.core
PRIVATE
b64::core
)
endif(b64_FOUND)

define_target_compile_options(Pantheios.core)

Expand Down
4 changes: 2 additions & 2 deletions test/unit/test.unit.getversion/test.unit.getversion.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Purpose: Implementation file for the test.unit.getversion project.
*
* Created: 28th August 2008
* Updated: 4th August 2026
* Updated: 6th September 2026
*
* ////////////////////////////////////////////////////////////////////// */

Expand Down Expand Up @@ -151,7 +151,7 @@ static void test_composite(void)

TEST_INT_EQ(expected, PANTHEIOS_VER);
TEST_INT_EQ(expected, pantheios_getVersion());
TEST_INT_EQ(PANTHEIOS_VER_1_0_1_RC1, PANTHEIOS_VER);
TEST_INT_EQ(PANTHEIOS_VER_1_0_1_RC2, PANTHEIOS_VER);
}


Expand Down
Loading