How do I test and package a C++ header only library?

Josh Marshall 1 Reputation point
2022-11-17T23:35:52.49+00:00

To start, I am frustrated and have tried many, many things. This is with regards to the following repo: https://gitlab.com/anadon/prime_generator_header . As it stands, I have ~6 different terminals (cmd, v1 Powershell, v7 Powershell, the cmd that nodejs installs and only works on it, developer cmd, developer v1 powershell), chocoloatey installed, VS Code, Visual Studio 2022 CE with Desktop C++ tooling and basically all other tooling that looks C++ related, meson, ninja, doctest via vcpkg, vkpkg, everything from https://github.com/aminya/setup-cpp, over a base Windows 10 install, a refreshed Windows 10 install, Windows 10 over the 2019 and 2022 major subversions, windows 11, and just more. I left off with doctest definitely installed and available but meson can't find it via cmake and pkg-config and pkgconf don't seem to be available.

All I want to do, which I can just do on Linux and MacOS is the following series of commands:

   cd $PROJECT_ROOT  
   meson setup build  
   meson test -C build  
   ninja coverage -C build  
   meson install -C build  

all wrapped up into a nice install script like vcpkg, conan, chocolatey, apt, nix, etc. How do I do this? Making the transition from any other OS to then work on Windows has been hell.

.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
322 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,526 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,362 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Guido Franzke 2,196 Reputation points
    2022-11-18T10:11:33+00:00

    Hello,
    you could ask here: conan-community
    Regards, Guido