-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
60 lines (48 loc) · 1.37 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
CMAKE_MINIMUM_REQUIRED(VERSION 3.0.1)
SET(CMAKE_INSTALL_MESSAGE LAZY)
PROJECT(sensory)
# Cogutil
FIND_PACKAGE(CogUtil 2.0.3 CONFIG REQUIRED)
IF(COGUTIL_FOUND)
SET(HAVE_COGUTIL 1)
# Add the 'cmake' directory from cogutil to search path
list(APPEND CMAKE_MODULE_PATH ${COGUTIL_DATA_DIR}/cmake)
# Needed to set OC_CMAKE_DIR
if (NOT DEFINED ATOMSPACE_DATA_DIR)
set (ATOMSPACE_DATA_DIR "${COGUTIL_DATA_DIR}")
endif (NOT DEFINED ATOMSPACE_DATA_DIR)
include(OpenCogGccOptions)
include(OpenCogLibOptions)
include(OpenCogInstallOptions)
include(Summary)
ENDIF()
# AtomSpace
FIND_PACKAGE(AtomSpace 5.0.4 CONFIG REQUIRED)
IF(ATOMSPACE_FOUND)
SET(HAVE_ATOMSPACE 1)
ENDIF()
# ----------------------------------------------------------
# Guile Python and Cython
include(OpenCogFindGuile)
# include(OpenCogFindPython)
# Load cmake functions defined in cogutil repo that depend on Guile.
INCLUDE(OpenCogMacros)
INCLUDE(OpenCogGuile)
INCLUDE(OpenCogCython)
# ----------------------------------------------------------
ADD_SUBDIRECTORY (opencog)
# Unit tests
ADD_CUSTOM_TARGET(tests)
ADD_SUBDIRECTORY (tests EXCLUDE_FROM_ALL)
ADD_CUSTOM_TARGET(test
DEPENDS tests
WORKING_DIRECTORY tests
COMMAND ${CMAKE_CTEST_COMMAND} $(ARGS)
COMMENT "Running tests..."
)
ADD_CUSTOM_TARGET(check
DEPENDS tests
WORKING_DIRECTORY tests
COMMAND ${CMAKE_CTEST_COMMAND} $(ARGS)
COMMENT "Running tests..."
)