From 7bc45381809dd071ef74eef26d43875234de261d Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Tue, 27 Oct 2026 11:36:18 +1100 Subject: [PATCH 1/2] build: publish HAS_ for detected Synesis packages After each successful detection of a Synesis package other than STLSoft, define HAS_ and HAS_. Dots in package names become underscores. BDUT and CLASP, already all-caps, get the single macro. Client-prefixed presence macros were removed where only the client read them. Dependency switches such as XTESTS_HAS_SHWILD, PANTHEIOS_HAS_SHWILD, and the *_NO_* contracts stay. --- CHANGES.md | 5 +++++ CMakeLists.txt | 7 ++++++- NEWS.md | 1 + include/libpath/common/version.h | 4 ++-- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 9062726..028c887 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,11 @@ # libpath - Changes +## 0.3.0-beta3 - 27th October 2026 + +* Defined `HAS_xTests` and `HAS_XTESTS` when **xTests** is detected; + + ## 0.3.0-beta2 - 20th October 2026 * Aligned the **run_all_examples.sh**, **run_all_scratch_tests.sh** / **.cmd**, and **run_all_unit_tests.sh** helper scripts with **misc-dev-scripts** gold tip **0754c23**, excluding **CMakeFiles** and `*.d` / `*.o` / `*.obj` from discovery and adding scratch `--skip-interactive`; diff --git a/CMakeLists.txt b/CMakeLists.txt index 63797a2..3b0d15a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -163,11 +163,16 @@ endif(BUILD_TESTING) if(BUILD_TESTING) - set(xTests_REQUIRED_VERSION_ 0.26) + set(xTests_REQUIRED_VERSION_ 0.28) find_package(xTests ${xTests_REQUIRED_VERSION_} REQUIRED) message("-- CMake package xTests found (version ${xTests_VERSION}; ${xTests_REQUIRED_VERSION_} requested)") + + add_compile_definitions( + HAS_xTests + HAS_XTESTS + ) endif(BUILD_TESTING) diff --git a/NEWS.md b/NEWS.md index 2a0f3e3..19ce8e0 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,6 +3,7 @@ | Date | News Item | Details | | ------------------- | ----------------------------------- | ------------------------------- | +| 27th October 2026 | Release of [libpath 0.3.0-beta3](https://github.com/synesissoftware/libpath/releases/tag/0.3.0-beta3) | `HAS_xTests` / `HAS_XTESTS` when **xTests** is detected | | 20th October 2026 | Release of [**libpath** 0.3.0-beta2](https://github.com/synesissoftware/libpath/releases/tag/0.3.0-beta2) | Gold tip helpers | | 14th October 2026 | Release of [**libpath** 0.3.0-beta1](https://github.com/synesissoftware/libpath/releases/tag/0.3.0-beta1) | Gold helpers; modular CI; `LIBPATH_VER_RELSTATUS` | | 15th March 2025 | Release of [**libpath** 0.3.0-alpha1](https://github.com/synesissoftware/libpath/releases/tag/0.3.0-alpha1) | Changed API | diff --git a/include/libpath/common/version.h b/include/libpath/common/version.h index c8ee68a..4814b7f 100644 --- a/include/libpath/common/version.h +++ b/include/libpath/common/version.h @@ -4,7 +4,7 @@ * Purpose: Portability discrimination for libpath library. * * Created: 9th November 2012 - * Updated: 20th October 2026 + * Updated: 27th October 2026 * * Home: https://github.com/synesissoftware/libpath * @@ -96,7 +96,7 @@ #define LIBPATH_VER_MAJOR 0 #define LIBPATH_VER_MINOR 3 #define LIBPATH_VER_PATCH 0 -#define LIBPATH_VER_RELSTATUS 0x82 +#define LIBPATH_VER_RELSTATUS 0x83 #define LIBPATH_VER \ (0\ From 7828ec00bc98914a9ea2ba098e3e23ba2823b6f7 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Tue, 27 Oct 2026 12:38:55 +1100 Subject: [PATCH 2/2] fix: align versions links and current release symbols Keep versions target_link_libraries in the signature the project already uses, link header-only packages by their imported target, and compare version tests with the current release symbol. --- CMakeLists.txt | 6 +++++ test/scratch/versions/CMakeLists.txt | 9 ++++++- test/scratch/versions/main.cpp | 38 ++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3b0d15a..872d0c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -155,6 +155,12 @@ if(BUILD_TESTING) include_directories(${STLSOFT_INCLUDE_DIR}) endif() + + if(DEFINED STLSOFT_INCLUDE_DIR OR DEFINED STLSoft_FOUND) + + add_compile_definitions(HAS_STLSOFT) + add_compile_definitions(HAS_STLSoft) + endif() endif(BUILD_TESTING) diff --git a/test/scratch/versions/CMakeLists.txt b/test/scratch/versions/CMakeLists.txt index 316c4d2..1aef27b 100644 --- a/test/scratch/versions/CMakeLists.txt +++ b/test/scratch/versions/CMakeLists.txt @@ -1,2 +1,9 @@ -# SIS:AUTO_GENERATED: Remove this line if you edit the file, otherwise it will be overwritten define_example_program(test.scratch.versions main.cpp) + +if(TARGET xTests::core) + + target_link_libraries(test.scratch.versions + PRIVATE + xTests::core + ) +endif() diff --git a/test/scratch/versions/main.cpp b/test/scratch/versions/main.cpp index 81073e7..8bc5a2c 100644 --- a/test/scratch/versions/main.cpp +++ b/test/scratch/versions/main.cpp @@ -1,6 +1,14 @@ #include +#ifdef HAS_STLSoft +# include +#endif + +#ifdef HAS_xTests +# include +#endif + #include #include @@ -45,11 +53,41 @@ version( int main(int /*argc*/, char* /*argv*/[]) { + int efferents_count = 0; + { unsigned const libver = LIBPATH_VER; version(std::cout, "", "libpath", "LIBPATH_VER", libver); } +#ifdef HAS_STLSoft + + if (0 == efferents_count++) + { + std::cout << "\n" << "efferent dependencies:" << std::endl; + } + + { + unsigned const libver = _STLSOFT_VER; + + version(std::cout, "\t", "STLSoft", "_STLSOFT_VER", libver); + } +#endif + +#ifdef HAS_xTests + + if (0 == efferents_count++) + { + std::cout << "\n" << "efferent dependencies:" << std::endl; + } + + { + unsigned const libver = _XTESTS_VER; + + version(std::cout, "\t", "xTests", "_XTESTS_VER", libver); + } +#endif + return EXIT_SUCCESS; }