Skip to content

Commit

Permalink
fix: update vcpkg configuration and boost dependencies
Browse files Browse the repository at this point in the history
- Add boost-gil and boost-ublas to vcpkg dependencies
- Update CMake configuration for proper Boost component linking
- Fix include paths and build configuration

Link to Devin run: https://app.devin.ai/sessions/6f5d90ffc8504d659e0c3715321f467b

Co-Authored-By: Serg Kryvonos <[email protected]>
  • Loading branch information
devin-ai-integration[bot] and ohhmm committed Jan 8, 2025
1 parent 25f139f commit 9f80f6d
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 18 deletions.
14 changes: 12 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
cmake_minimum_required (VERSION 3.8)
cmake_minimum_required (VERSION 3.8)

project(skrypt)

set(OPENMIND_USE_VCPKG ON)

enable_language(CXX)
set (CMAKE_CXX_STANDARD 23)
Expand Down Expand Up @@ -33,7 +37,13 @@ include(FetchContent)
FetchContent_Declare(openmind
GIT_REPOSITORY https://github.com/ohhmm/openmind.git
GIT_TAG main)
FetchContent_MakeAvailable(openmind)
FetchContent_MakeAvailable(openmind)

# Add openmind's cmake modules to the module path
list(APPEND CMAKE_MODULE_PATH
"${CMAKE_BINARY_DIR}/_deps/openmind-src/cmake"
"${CMAKE_BINARY_DIR}/_deps/openmind-src/cmake/Modules"
)

if(BUILD_TESTS OR OPENMIND_BUILD_TESTS)
enable_testing()
Expand Down
5 changes: 3 additions & 2 deletions libskrypt/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@

set(deplist math)

# Using Boost components from openmind
set(deplist ${deplist} Boost::filesystem Boost::program_options)

if(TARGET Boost::dll)
set(deplist ${deplist} Boost::dll)
elseif(Boost_DLL_LIBRARY)
set(deplist ${deplist} ${Boost_DLL_LIBRARY})
else()
set(deplist ${deplist} boost)
endif()

lib(${deplist})
7 changes: 6 additions & 1 deletion libskrypt/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@

test()
# Configure test dependencies
set(TEST_DEPS libskrypt)
set(BOOST_TEST_LINK_LIBS Boost::unit_test_framework)

# Configure tests with dependencies
test("${TEST_DEPS}")
1 change: 0 additions & 1 deletion skrypt/skrypt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ using namespace omnn::math;
#include <boost/serialization/vector.hpp>
#include <boost/program_options.hpp>
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/lambda2.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/archive/binary_oarchive.hpp>

Expand Down
20 changes: 10 additions & 10 deletions vcpkg-configuration.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"default-registry": {
"kind": "git",
"baseline": "3508985146f1b1d248c67ead13f8f54be5b4f5da",
"repository": "https://github.com/ohhmm/vcpkg",
"reference": "openmind-port",
"packages": [
"openmind"
]
}
}
"registries": [
{
"kind": "git",
"repository": "https://github.com/ohhmm/vcpkg",
"baseline": "3508985146f1b1d248c67ead13f8f54be5b4f5da",
"reference": "openmind-port",
"packages": ["openmind"]
}
]
}
7 changes: 5 additions & 2 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
"builtin-baseline": "3508985146f1b1d248c67ead13f8f54be5b4f5da",
"builtin-baseline": "a8954b904ad2a6939ecd8fc213e87702fa1243ea",
"name": "skrypt",
"version": "1.0.0",
"description": "Sergii Kryvonos Relation Yarn Plausibility Tool",
"dependencies": [
"boost",
"boost-chrono",
"boost-compute",
"boost-date-time",
"boost-dll",
"boost-filesystem",
"boost-gil",
"boost-iostreams",
"boost-lambda",
"boost-locale",
"boost-multiprecision",
"boost-ublas",
"boost-program-options",
"boost-serialization",
"boost-system",
"boost-test",
"boost-thread",
"boost-uuid",
"leveldb",
"tbb",
{
"name": "vcpkg-cmake",
"host": true
Expand Down

0 comments on commit 9f80f6d

Please sign in to comment.