<commit_before>IF (CMAKE_COMPILER_IS_GNUCXX)
    SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wno-deprecated -Wno-unused-variable")
ENDIF (CMAKE_COMPILER_IS_GNUCXX)

# It is now usual to use the system OpenCog header files so this is unnecessary
INCLUDE_DIRECTORIES (
    ${PROJECT_SOURCE_DIR}/opencog/util
    ${PROJECT_SOURCE_DIR}/opencog/atomspace
    ${PROJECT_SOURCE_DIR}/opencog/xml
    ${PROJECT_SOURCE_DIR}/opencog/server
    ${PROJECT_SOURCE_DIR}/opencog/reasoning
    ${IODBC_INCLUDE_DIRS}
    ${GSL_INCLUDE_DIR}
)

LINK_DIRECTORIES (
	${PROJECT_BINARY_DIR}/opencog/atomspace
	${PROJECT_BINARY_DIR}/opencog/server
	${PROJECT_BINARY_DIR}/opencog/reasoning/pln
	${PROJECT_BINARY_DIR}/opencog/util
	${Boost_LIBRARY_DIRS}
)

SET(PLN_LINK_LIBS
	pln
	server
)

IF (HAVE_CYTHON)
	SET(PLN_LINK_LIBS
		PythonModule
		${PYTHON_LIBRARIES}
	${PLN_LINK_LIBS})
ENDIF (HAVE_CYTHON)

LINK_LIBRARIES (${PLN_LINK_LIBS})

ADD_CXXTEST(AtomSpaceWrapperUTest)
ADD_CXXTEST(BITNodeUTest)
ADD_CXXTEST(ASSOCUTest)
ADD_CXXTEST(PLNUtilsUTest)
ADD_CXXTEST(PLNSchemeWrapperUTest)

# At this point, PLNUTest requires either libexpat or the Scheme
# subsystem since axioms are loaded from files.
IF (EXPAT_FOUND OR GUILE_FOUND)
	# Nil: PLNUTest and ForwardChainingUTest always fail and take
	# a very long time so I disable them till they get fixed
	ADD_CXXTEST(PLNUTest)
	# IF (NOT CMAKE_BUILD_TYPE STREQUAL "Coverage")
		# ADD_CXXTEST(ForwardChainingUTest)
	ADD_CXXTEST(DeterminismUTest)
	# ENDIF (NOT CMAKE_BUILD_TYPE STREQUAL "Coverage")
ENDIF (EXPAT_FOUND OR GUILE_FOUND)

ADD_SUBDIRECTORY(formulas)
ADD_SUBDIRECTORY(rules)
<commit_msg>PLN: cannot run guile tests if guile is not installed.<commit_after>IF (CMAKE_COMPILER_IS_GNUCXX)
    SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wno-deprecated -Wno-unused-variable")
ENDIF (CMAKE_COMPILER_IS_GNUCXX)

# It is now usual to use the system OpenCog header files so this is unnecessary
INCLUDE_DIRECTORIES (
    ${PROJECT_SOURCE_DIR}/opencog/util
    ${PROJECT_SOURCE_DIR}/opencog/atomspace
    ${PROJECT_SOURCE_DIR}/opencog/xml
    ${PROJECT_SOURCE_DIR}/opencog/server
    ${PROJECT_SOURCE_DIR}/opencog/reasoning
    ${IODBC_INCLUDE_DIRS}
    ${GSL_INCLUDE_DIR}
)

LINK_DIRECTORIES (
	${PROJECT_BINARY_DIR}/opencog/atomspace
	${PROJECT_BINARY_DIR}/opencog/server
	${PROJECT_BINARY_DIR}/opencog/reasoning/pln
	${PROJECT_BINARY_DIR}/opencog/util
	${Boost_LIBRARY_DIRS}
)

SET(PLN_LINK_LIBS
	pln
	server
)

IF (HAVE_CYTHON)
	SET(PLN_LINK_LIBS
		PythonModule
		${PYTHON_LIBRARIES}
	${PLN_LINK_LIBS})
ENDIF (HAVE_CYTHON)

LINK_LIBRARIES (${PLN_LINK_LIBS})

ADD_CXXTEST(AtomSpaceWrapperUTest)
ADD_CXXTEST(BITNodeUTest)
ADD_CXXTEST(ASSOCUTest)
ADD_CXXTEST(PLNUtilsUTest)

IF (HAVE_GUILE)
	ADD_CXXTEST(PLNSchemeWrapperUTest)
ENDIF (HAVE_GUILE)

# At this point, PLNUTest requires either libexpat or the Scheme
# subsystem since axioms are loaded from files.
IF (EXPAT_FOUND OR GUILE_FOUND)
	# Nil: PLNUTest and ForwardChainingUTest always fail and take
	# a very long time so I disable them till they get fixed
	ADD_CXXTEST(PLNUTest)
	# IF (NOT CMAKE_BUILD_TYPE STREQUAL "Coverage")
		# ADD_CXXTEST(ForwardChainingUTest)
	ADD_CXXTEST(DeterminismUTest)
	# ENDIF (NOT CMAKE_BUILD_TYPE STREQUAL "Coverage")
ENDIF (EXPAT_FOUND OR GUILE_FOUND)

ADD_SUBDIRECTORY(formulas)
ADD_SUBDIRECTORY(rules)

{'fraction_non_alphanumeric': 0.0859375, 'fraction_numerical': 0.0, 'mean_word_length': 6.480898876404495, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2345401', 'n_tokens_mistral': 1420, 'n_tokens_neox': 1330, 'n_words': 244}