Skip to content

Commit

Permalink
Break another circular dependency
Browse files Browse the repository at this point in the history
And another, for opencog#1673
  • Loading branch information
linas committed Feb 3, 2019
1 parent a96c640 commit 872bf0f
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 21 deletions.
2 changes: 1 addition & 1 deletion lib/AtomSpaceConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ set(ATOMSPACE_LIBRARIES
clearbox
lambda
persist
query
query-engine
execution
ruleengine
smob
Expand Down
3 changes: 2 additions & 1 deletion opencog/atoms/execution/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ ADD_LIBRARY (execution
ADD_DEPENDENCIES(execution opencog_atom_types)

TARGET_LINK_LIBRARIES(execution
query
query-engine
smob
atomspace
atombase
clearbox
Expand Down
3 changes: 1 addition & 2 deletions opencog/attentionbank/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ ADD_LIBRARY (attentionbank
)

TARGET_LINK_LIBRARIES(attentionbank
# ${NO_AS_NEEDED}
query
query-engine
execution
smob
atombase
Expand Down
4 changes: 2 additions & 2 deletions opencog/cython/opencog/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ ADD_LIBRARY(bindlink_cython

TARGET_LINK_LIBRARIES(bindlink_cython
atomspace_cython
query
query-engine
execution
${PYTHON_LIBRARIES}
${Boost_THREAD_LIBRARY}
Expand Down Expand Up @@ -222,7 +222,7 @@ IF (HAVE_GUILE)

TARGET_LINK_LIBRARIES(scheme_wrapper
atomspace_cython
query
query-engine
execution
smob
${PYTHON_LIBRARIES}
Expand Down
6 changes: 3 additions & 3 deletions opencog/haskell/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ ADD_LIBRARY (atomspace-cwrapper
Value_CWrapper.cpp
)

ADD_DEPENDENCIES(atomspace-cwrapper atomspace query)
ADD_DEPENDENCIES(atomspace-cwrapper atomspace query-engine)

TARGET_LINK_LIBRARIES(atomspace-cwrapper
atomspace
query
query-engine
execution
atomspace
)

INSTALL (TARGETS atomspace-cwrapper
Expand Down
29 changes: 18 additions & 11 deletions opencog/query/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,34 +1,41 @@

# Build the query shlib
ADD_LIBRARY(query
ADD_LIBRARY(query-engine
DefaultPatternMatchCB.cc
Implicator.cc
DefaultImplicator.cc
InitiateSearchCB.cc
PatternMatch.cc
PatternMatchEngine.cc
PatternSCM.cc
Recognizer.cc
Satisfier.cc
)
ADD_LIBRARY(query
PatternSCM.cc
)

ADD_DEPENDENCIES(query
ADD_DEPENDENCIES(query-engine
opencog_atom_types
)

TARGET_LINK_LIBRARIES(query
TARGET_LINK_LIBRARIES(query-engine
lambda
atomspace
# execution # disabled to avoid cyclic dependency
# execution # still a circular dependency
)

TARGET_LINK_LIBRARIES(query
query-engine
smob
)

IF (HAVE_GUILE)
TARGET_LINK_LIBRARIES(query smob)
ENDIF (HAVE_GUILE)
INSTALL (TARGETS query-engine
EXPORT AtomSpaceTargets
DESTINATION "lib${LIB_DIR_SUFFIX}/opencog")

INSTALL (TARGETS query
EXPORT AtomSpaceTargets
DESTINATION "lib${LIB_DIR_SUFFIX}/opencog")
INSTALL (TARGETS query
EXPORT AtomSpaceTargets
DESTINATION "lib${LIB_DIR_SUFFIX}/opencog")

INSTALL (FILES
BindLinkAPI.h
Expand Down
2 changes: 1 addition & 1 deletion opencog/rule-engine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ADD_DEPENDENCIES(ruleengine

TARGET_LINK_LIBRARIES(ruleengine
lambda
query
query-engine
execution
atomspace
atomspaceutils
Expand Down

0 comments on commit 872bf0f

Please sign in to comment.