Skip to content

Conversation

@mbenke
Copy link
Collaborator

@mbenke mbenke commented Nov 21, 2025

Building testrunner with cmake ran into several problems on Ubuntu 24.04 LTS.
This PR is an attempt to fix these problems. Needs thorough review though.

We should also think how to integrate building the testrunner in our CI (Nix?)

@mbenke mbenke requested a review from clonker November 21, 2025 14:48
Copy link
Member

@clonker clonker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of these changes shouldn't be necessary. I added a top-level CMakeLists.txt which takes care of all of it (and uses a submodule for nlohmann_json).

solcore/CMakeLists.txt

Lines 1 to 17 in 3655b7d

cmake_minimum_required(VERSION 3.13)
project(solcore VERSION 0.0 LANGUAGES C CXX)
option(IGNORE_VENDORED_DEPENDENCIES "Ignore libraries provided as submodules of the repository" OFF)
mark_as_advanced(IGNORE_VENDORED_DEPENDENCIES)
if (NOT IGNORE_VENDORED_DEPENDENCIES)
add_subdirectory(
${CMAKE_SOURCE_DIR}/deps/nlohmann_json
EXCLUDE_FROM_ALL
)
else()
find_package(nlohmann_json REQUIRED)
endif()
set(CMAKE_CXX_STANDARD 23)
add_subdirectory(test/testrunner)

The only one which could be required is the CXX_STANDARD one.

@mbenke
Copy link
Collaborator Author

mbenke commented Dec 9, 2025

@clonker This helps a bit, but not all the way:

ben@tux:~/work/solcore$ cmake -S . -B build
-- The C compiler identification is GNU 14.3.0
-- The CXX compiler identification is GNU 14.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /nix/store/95k9rsn1zsw1yvir8mj824ldhf90i4qw-gcc-wrapper-14.3.0/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /nix/store/95k9rsn1zsw1yvir8mj824ldhf90i4qw-gcc-wrapper-14.3.0/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using the multi-header code from /home/ben/work/solcore/deps/nlohmann_json/include/
CMake Error at test/testrunner/CMakeLists.txt:11 (find_package):
  Could not find a package configuration file provided by "Boost" with any of
  the following names:

    BoostConfig.cmake
    boost-config.cmake

  Add the installation prefix of "Boost" to CMAKE_PREFIX_PATH or set
  "Boost_DIR" to a directory containing one of the above files.  If "Boost"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!

@clonker
Copy link
Member

clonker commented Dec 9, 2025

@clonker This helps a bit, but not all the way:

  Could not find a package configuration file provided by "Boost" with any of
  the following names:

    BoostConfig.cmake
    boost-config.cmake

  Add the installation prefix of "Boost" to CMAKE_PREFIX_PATH or set
  "Boost_DIR" to a directory containing one of the above files.  If "Boost"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!

it's simply asking for a boost installation on the system :)

@mbenke
Copy link
Collaborator Author

mbenke commented Dec 9, 2025

Do you know how to add Boost to flake.nix then so that we may integrate the testrunner with our CI?

@mbenke
Copy link
Collaborator Author

mbenke commented Dec 10, 2025

Closing in favour of #276

@mbenke mbenke closed this Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants