This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/OPTYap/CMakeLists.txt

95 lines
2.6 KiB
CMake
Raw Normal View History

2015-07-06 15:04:50 +01:00
set (OPTYap_SOURCES
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
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
)
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
#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)
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)
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)
if (WITH_YAPOR_THOR)
2015-11-12 14:59:07 +00:00
set_property(DIRECTORY .. APPEND PROPERTY COMPILE_DEFINITIONS YAPOR_THREADS=1;USE_SYSTEM_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_THOR)
2015-11-12 14:59:07 +00:00
OPTION (WITH_YAPOR_ACOW "Process-based Copy-On-Write Or-parallelism" OFF)
if (WITH_YAPOR_ACOW)
2015-11-12 14:59:07 +00:00
set_property(DIRECTORY .. APPEND PROPERTY COMPILE_DEFINITIONS YAPOR_COW=1;USE_SYSTEM_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_ACOW)
2015-11-12 14:59:07 +00:00
OPTION (WITH_YAPOR_SBA "Sparse Bind Array-based Or-parallelism" OFF)
if (WITH_YAPOR_SBA)
2015-11-12 14:59:07 +00:00
set_property(DIRECTORY .. APPEND PROPERTY COMPILE_DEFINITIONS YAPOR_SBA=1;USE_SYSTEM_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_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
else()
2016-01-03 02:06:09 +00:00
set_property(DIRECTORY .. APPEND PROPERTY COMPILE_DEFINITIONS USE_SYSTEM_MALLOC=1)
2015-11-12 14:59:07 +00:00
endif ()
2015-07-06 15:04:50 +01:00
set (POSITION_INDEPENDENT_CODE TRUE)
add_library (libOPTYap OBJECT
2016-01-03 02:06:09 +00:00
${OPTYap_SOURCES} )
2015-07-06 15:04:50 +01:00
set_target_properties(libOPTYap
PROPERTIES
# RPATH ${libdir} VERSION ${LIBYAPTAI_FULL_VERSION}
# SOVERSION ${LIBYAPTAI_MAJOR_VERSION}.${LIBYAPTAI_MINOR_VERSION}
POSITION_INDEPENDENT_CODE TRUE
OUTPUT_NAME OPTYap
)