2015-07-06 15:04:50 +01:00
|
|
|
|
2016-07-31 10:56:54 +01:00
|
|
|
set (OPTYap_HEADERS
|
2015-07-06 15:04:50 +01:00
|
|
|
opt.config.h
|
|
|
|
opt.proto.h
|
|
|
|
opt.structs.h
|
|
|
|
opt.macros.h
|
|
|
|
or.macros.h
|
|
|
|
or.sba_amiops.h
|
|
|
|
or.sba_unify.h
|
|
|
|
tab.structs.h
|
|
|
|
locks_x86.h
|
|
|
|
locks_sparc.h
|
|
|
|
locks_mips.h
|
|
|
|
locks_mips_funcs.h
|
|
|
|
locks_alpha.h
|
|
|
|
locks_alpha_funcs.h
|
|
|
|
locks_pthread.h
|
2016-07-31 10:56:54 +01:00
|
|
|
|
2015-07-06 15:04:50 +01:00
|
|
|
)
|
2016-07-31 10:56:54 +01:00
|
|
|
set (OPTYap_SOURCES
|
|
|
|
or.memory.c
|
|
|
|
opt.init.c
|
|
|
|
opt.preds.c
|
|
|
|
or.copy_engine.c
|
|
|
|
or.cow_engine.c
|
|
|
|
or.sba_engine.c
|
|
|
|
or.thread_engine.c
|
|
|
|
or.scheduler.c
|
|
|
|
or.cut.c
|
|
|
|
tab.tries.c
|
|
|
|
tab.completion.c
|
|
|
|
)
|
|
|
|
|
2015-07-06 15:04:50 +01:00
|
|
|
|
2015-11-05 23:51:35 +00:00
|
|
|
option (WITH_TABLING "Support tabling" ON)
|
|
|
|
if (WITH_TABLING)
|
|
|
|
#this depends on DEPTH_LIMIT define it after
|
2015-07-06 15:04:50 +01:00
|
|
|
|
2015-11-05 23:51:35 +00:00
|
|
|
#this macro should realy be in config.h or other like it
|
|
|
|
#and it is used across several files outside OPTYap
|
|
|
|
set_property(DIRECTORY .. APPEND PROPERTY COMPILE_DEFINITIONS TABLING=1)
|
2016-01-03 02:06:09 +00:00
|
|
|
include_directories (OPTYap )
|
|
|
|
set(YAP_SYSTEM_OPTIONS "tabling " ${YAP_SYSTEM_OPTIONS} PARENT_SCOPE)
|
2015-11-05 23:51:35 +00:00
|
|
|
endif(WITH_TABLING)
|
|
|
|
|
|
|
|
option (WITH_YAPOR "Experimental Support for Or-parallelism" OFF)
|
|
|
|
|
2015-11-12 14:59:07 +00:00
|
|
|
OPTION (WITH_YAPOR_COPY "Copy-based Or-parallelism" OFF)
|
2015-11-05 23:51:35 +00:00
|
|
|
if (WITH_YAPOR_COPY)
|
2015-11-12 14:59:07 +00:00
|
|
|
set_property(DIRECTORY .. APPEND PROPERTY COMPILE_DEFINITIONS YAPOR_COPY=1;USE_DL_MALLOC=1)
|
2016-01-03 02:06:09 +00:00
|
|
|
set(WITH_YAPOR ON)
|
|
|
|
set(YAP_SYSTEM_OPTIONS "or_parallelism " ${YAP_SYSTEM_OPTIONS} PARENT_SCOPE)
|
|
|
|
endif (WITH_YAPOR_COPY)
|
2015-11-12 14:59:07 +00:00
|
|
|
|
|
|
|
OPTION (WITH_YAPOR_THOR "Thread-based Or-parallelism" OFF)
|
2015-11-05 23:51:35 +00:00
|
|
|
if (WITH_YAPOR_THOR)
|
2016-07-31 10:56:54 +01:00
|
|
|
set_property(DIRECTORY .. APPEND PROPERTY COMPILE_DEFINITIONS YAPOR_THREADS=1)
|
2016-01-03 02:06:09 +00:00
|
|
|
set(WITH_YAPOR ON)
|
|
|
|
set(YAP_SYSTEM_OPTIONS "or_parallelism " ${YAP_SYSTEM_OPTIONS} PARENT_SCOPE)
|
2015-11-05 23:51:35 +00:00
|
|
|
endif (WITH_YAPOR_THOR)
|
|
|
|
|
2015-11-12 14:59:07 +00:00
|
|
|
OPTION (WITH_YAPOR_ACOW "Process-based Copy-On-Write Or-parallelism" OFF)
|
2015-11-05 23:51:35 +00:00
|
|
|
if (WITH_YAPOR_ACOW)
|
2016-07-31 10:56:54 +01:00
|
|
|
set_property(DIRECTORY .. APPEND PROPERTY COMPILE_DEFINITIONS YAPOR_COW=1)
|
2016-01-03 02:06:09 +00:00
|
|
|
set(WITH_YAPOR ON)
|
|
|
|
set(YAP_SYSTEM_OPTIONS "or_parallelism " ${YAP_SYSTEM_OPTIONS} PARENT_SCOPE)
|
2015-11-05 23:51:35 +00:00
|
|
|
endif (WITH_YAPOR_ACOW)
|
|
|
|
|
2015-11-12 14:59:07 +00:00
|
|
|
OPTION (WITH_YAPOR_SBA "Sparse Bind Array-based Or-parallelism" OFF)
|
2015-11-05 23:51:35 +00:00
|
|
|
if (WITH_YAPOR_SBA)
|
2016-07-31 10:56:54 +01:00
|
|
|
set_property(DIRECTORY .. APPEND PROPERTY COMPILE_DEFINITIONS YAPOR_SBA=1)
|
2016-01-03 02:06:09 +00:00
|
|
|
set(WITH_YAPOR ON)
|
|
|
|
set(YAP_SYSTEM_OPTIONS "or_parallelism, " ${YAP_SYSTEM_OPTIONS} PARENT_SCOPE)
|
2015-11-05 23:51:35 +00:00
|
|
|
endif (WITH_YAPOR_SBA)
|
2015-07-06 15:04:50 +01:00
|
|
|
|
2015-11-12 14:59:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
if (WITH_YAPOR)
|
2016-01-03 02:06:09 +00:00
|
|
|
set_property(DIRECTORY .. APPEND PROPERTY COMPILE_DEFINITIONS YAPOR=1)
|
2015-11-12 14:59:07 +00:00
|
|
|
endif ()
|
|
|
|
|
2015-07-06 15:04:50 +01:00
|
|
|
set (POSITION_INDEPENDENT_CODE TRUE)
|
|
|
|
|
2016-07-31 10:56:54 +01:00
|
|
|
add_component (libOPTYap
|
2016-01-03 02:06:09 +00:00
|
|
|
${OPTYap_SOURCES} )
|
|
|
|
|
2015-07-06 15:04:50 +01:00
|
|
|
|
2016-07-31 10:56:54 +01:00
|
|
|
MY_set_target_properties(libOPTYap
|
2015-07-06 15:04:50 +01:00
|
|
|
PROPERTIES
|
|
|
|
# RPATH ${libdir} VERSION ${LIBYAPTAI_FULL_VERSION}
|
|
|
|
# SOVERSION ${LIBYAPTAI_MAJOR_VERSION}.${LIBYAPTAI_MINOR_VERSION}
|
|
|
|
POSITION_INDEPENDENT_CODE TRUE
|
|
|
|
OUTPUT_NAME OPTYap
|
|
|
|
)
|