Skip to content

Commit

Permalink
Merge pull request #127 from opencog/de-unify
Browse files Browse the repository at this point in the history
Split out Unify into it's own git repo
  • Loading branch information
linas authored Dec 2, 2022
2 parents fa78942 + d5b8f8c commit 75228e1
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 5,916 deletions.
17 changes: 10 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@ jobs:
name: Restore GHC Cache
keys:
- ghc-{{checksum "/ws/atomspace/opencog/haskell/stack.yaml"}}-{{ arch }}
- run:
name: Install Unify
command: |
git clone --depth 1 https://github.com/$CIRCLE_PROJECT_USERNAME/unify /ws/unify
mkdir -p /ws/unify/build
cd /ws/unify/build && cmake .. && make -j2 && make -j2 install
ldconfig
- restore_cache:
name: Restore Haskell Deps Cache
keys:
Expand All @@ -59,6 +52,13 @@ jobs:
key: haskelldeps-{{checksum "/ws/atomspace/opencog/haskell/stack.yaml"}}-{{checksum "/ws/atomspace/opencog/haskell/opencog-atomspace.cabal"}}-{{ arch }}
paths:
- /ws/atomspace/opencog/haskell/.stack-work
- run:
name: Install Unify
command: |
git clone --depth 1 https://github.com/$CIRCLE_PROJECT_USERNAME/unify /ws/unify
mkdir -p /ws/unify/build
cd /ws/unify/build && cmake .. && make -j2 && make -j2 install
ldconfig
- checkout
- run:
name: CMake Configure
Expand Down Expand Up @@ -340,6 +340,9 @@ workflows:
- ure
- spacetime:
requires:
# spacetime doesn't actually depend on URE,
# but I can't just say - atomspace for some reason!?
# - atomspace
- ure
- pln:
requires:
Expand Down
16 changes: 12 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,16 @@ ELSE (ATOMSPACE_FOUND)
MESSAGE(FATAL_ERROR "AtomSpace missing: it is needed!")
ENDIF (ATOMSPACE_FOUND)

# Unify
FIND_PACKAGE(Unify CONFIG)
IF (UNIFY_FOUND)
MESSAGE(STATUS "Unify version ${UNIFY_VERSION} found.")
ADD_DEFINITIONS(-DHAVE_UNIFY)
SET(HAVE_UNIFY 1)
ELSE (UNIFY_FOUND)
MESSAGE(FATAL_ERROR "Unify missing: it is needed!")
ENDIF (UNIFY_FOUND)

# add the 'cmake' directory from cogutil to search path
list(APPEND CMAKE_MODULE_PATH ${COGUTIL_DATA_DIR}/cmake)
include(OpenCogGccOptions)
Expand Down Expand Up @@ -185,10 +195,9 @@ INCLUDE("${ATOMSPACE_DATA_DIR}/cmake/OpenCogCython.cmake")
# ==========================================================
# Decide what to build, based on the packages found.

IF(HAVE_ATOMSPACE AND HAVE_COGUTIL)
IF(HAVE_UNIFY AND HAVE_ATOMSPACE AND HAVE_COGUTIL)
SET(HAVE_URE 1)
SET(HAVE_UNIFY 1)
ENDIF(HAVE_ATOMSPACE AND HAVE_COGUTIL)
ENDIF(HAVE_UNIFY AND HAVE_ATOMSPACE AND HAVE_COGUTIL)

ADD_SUBDIRECTORY(opencog)
ADD_SUBDIRECTORY(lib)
Expand Down Expand Up @@ -308,7 +317,6 @@ INCLUDE(CPack)
# Show a summary of what we found, what we will do.

SUMMARY_ADD("URE" "Unified Rule Engine" HAVE_URE)
SUMMARY_ADD("Unify" "Syntactic unifer" HAVE_UNIFY)
SUMMARY_ADD("Python bindings" "Python (cython) bindings" HAVE_CYTHON)
SUMMARY_ADD("Python tests" "Python bindings nose tests" HAVE_NOSETESTS)
SUMMARY_ADD("Scheme bindings" "Scheme bindings and shell" HAVE_GUILE)
Expand Down
7 changes: 1 addition & 6 deletions lib/UREConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@
include("@CMAKE_INSTALL_PREFIX@/lib/cmake/URE/URETargets.cmake")

set(URE_LIBRARY ure)
set(UNIFY_LIBRARY unify)

set(URE_LIBRARIES
ure
unify
)
set(URE_LIBRARIES ure)

set(URE_DATA_DIR "@CMAKE_INSTALL_PREFIX@/share/opencog")
set(URE_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include/")
Expand Down
16 changes: 2 additions & 14 deletions opencog/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
DECLARE_GUILE_CONFIG_TARGET(SCM_CONFIG "opencog ure-config" "URE_TEST")

# The build order used here is loosely in terms of
# dependencies: the later parts depend on, or may
# someday depend on the earlier parts.
#
IF (HAVE_UNIFY)
ADD_SUBDIRECTORY (unify)
ENDIF (HAVE_UNIFY)
IF (HAVE_URE)
ADD_SUBDIRECTORY (ure)
ENDIF (HAVE_URE)
ADD_SUBDIRECTORY (ure)
ADD_SUBDIRECTORY (scm)

# Extension language support
IF (HAVE_GUILE)
ADD_SUBDIRECTORY (scm)
ENDIF (HAVE_GUILE)

IF (HAVE_CYTHON)
ADD_SUBDIRECTORY (cython)
ENDIF (HAVE_CYTHON)
Expand Down
17 changes: 0 additions & 17 deletions opencog/unify/CMakeLists.txt

This file was deleted.

103 changes: 0 additions & 103 deletions opencog/unify/README.md

This file was deleted.

Loading

0 comments on commit 75228e1

Please sign in to comment.