OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-matrix commits / 603e556

Move code for rocksstorage detection
603e5561435425fb7f2e86f3470d3b7ad6f050db
by Linas Vepstas <linasvepstas@gmail.com> · 2025-10-10T15:16:36.000Z

Changed files (2) +20 -13

CMakeLists.txt +19 -0
……@@ -113,6 +113,25 @@ INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}
113113INCLUDE(OpenCogMacros)
114114INCLUDE(OpenCogGuile)
115115
116# ----------------------------------------------------------
117# Check if RocksStorage is available by trying to load the Guile module
118
119IF (HAVE_GUILE)
120 EXECUTE_PROCESS(
121 COMMAND guile -c "(use-modules (opencog persist-rocks))"
122 RESULT_VARIABLE ROCKS_MODULE_RESULT
123 OUTPUT_QUIET ERROR_QUIET
124 )
125
126 IF (ROCKS_MODULE_RESULT EQUAL 0)
127 SET(HAVE_ROCKS_STORAGE 1)
128 ADD_DEFINITIONS(-DHAVE_ROCKS_STORAGE)
129 MESSAGE(STATUS "RocksStorage found - enabling storage tests")
130 ELSE ()
131 MESSAGE(STATUS "RocksStorage not found - skipping storage tests")
132 ENDIF ()
133ENDIF (HAVE_GUILE)
134
116135# ==========================================================
117136# Decide what to build, based on the packages found.
118137
tests/matrix/CMakeLists.txt +1 -13
……@@ -15,20 +15,8 @@ LINK_LIBRARIES(
1515 ${COGUTIL_LIBRARY}
1616)
1717
18# Check if RocksStorage is available by trying to load the Guile module
19EXECUTE_PROCESS(
20 COMMAND guile -c "(use-modules (opencog persist-rocks))"
21 RESULT_VARIABLE ROCKS_MODULE_RESULT
22 OUTPUT_QUIET ERROR_QUIET
23)
24
25IF (ROCKS_MODULE_RESULT EQUAL 0)
26 SET(HAVE_ROCKS_STORAGE 1)
27 ADD_DEFINITIONS(-DHAVE_ROCKS_STORAGE)
28 MESSAGE(STATUS "RocksStorage found - enabling storage tests")
18IF (HAVE_ROCKS_STORAGE)
2919 ADD_CXXTEST(VectorAPIUTest)
30ELSE ()
31 MESSAGE(STATUS "RocksStorage not found - skipping storage tests")
3220ENDIF ()
3321
3422ADD_GUILE_TEST(MarginalTest marginal-test.scm)