cmake support
This commit is contained in:
parent
289a36a0a1
commit
90feb7f9f8
671
CMakeLists.txt
671
CMakeLists.txt
@ -1,41 +1,16 @@
|
||||
# organised as follows:
|
||||
# main variables
|
||||
# sources
|
||||
# system core
|
||||
# libraries
|
||||
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
|
||||
project(YAP C CXX)
|
||||
|
||||
set(YAP_MAJOR_VERSION 6)
|
||||
set(YAP_MINOR_VERSION 3)
|
||||
set(YAP_PATCH_VERSION 4)
|
||||
set(YAP_FULL_VERSION
|
||||
${YAP_MAJOR_VERSION}.${YAP_MINOR_VERSION}.${YAP_PATCH_VERSION})
|
||||
set(YAP_NUMERIC_VERSION
|
||||
${YAP_MAJOR_VERSION}*10000+${YAP_MINOR_VERSION}100+${YAP_PATCH_VERSION})
|
||||
set(MYDDAS_VERSION MYDDAS-0.9.1)
|
||||
|
||||
message(STATUS "Building YAP version ${YAP_VERSION}")
|
||||
|
||||
# set path to additional CMake modules
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
|
||||
set(CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/build})
|
||||
|
||||
set(YAP_PL_SRCDIR ${CMAKE_SOURCE_DIR}/pl)
|
||||
|
||||
# Compatibility vars with autotols
|
||||
set ( prefix "${CMAKE_INSTALL_PREFIX}")
|
||||
set ( exec_prefix "${prefix}")
|
||||
set ( libdir "${exec_prefix}/lib")
|
||||
set ( dlls "${exec_prefix}/lib/Yap")
|
||||
set ( includedir "${prefix}/include")
|
||||
set ( datarootdir "${prefix}/share")
|
||||
set ( libpl "${prefix}/share")
|
||||
set ( datadir "${datarootdir}")
|
||||
set ( mandir "${datarootdir}/man")
|
||||
set ( bindir "${exec_prefix}/bin")
|
||||
|
||||
set(YAP_ROOTDIR ${prefix})
|
||||
set(YAP_SHAREDIR ${datarootdir})
|
||||
|
||||
set ( _GNU_SOURCE 1 )
|
||||
|
||||
|
||||
if (WIN32)
|
||||
set (YAP_ARCH $ENV{PROCESSOR_ARCHITECTURE})
|
||||
@ -47,29 +22,54 @@ if (UNIX)
|
||||
OUTPUT_VARIABLE YAP_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE )
|
||||
endif()
|
||||
|
||||
set(YAP_FULL_VERSION
|
||||
${YAP_MAJOR_VERSION}.${YAP_MINOR_VERSION}.${YAP_PATCH_VERSION})
|
||||
set(YAP_FVERSION
|
||||
${YAP_MAJOR_VERSION}.${YAP_MINOR_VERSION}.${YAP_PATCH_VERSION})
|
||||
set(YAP_NUMERIC_VERSION
|
||||
${YAP_MAJOR_VERSION}*10000+${YAP_MINOR_VERSION}*100+${YAP_PATCH_VERSION})
|
||||
set(MYDDAS_VERSION MYDDAS-0.9.1)
|
||||
|
||||
site_name( YAP_SITE )
|
||||
|
||||
|
||||
message(STATUS "Building YAP version ${YAP_VERSION}")
|
||||
|
||||
# set path to additional CMake modules
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
|
||||
set(CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/build)
|
||||
|
||||
set(CMAKE_TOP_BINARY_DIR ${CMAKE_BINARY_DIR})
|
||||
set(YAP_PL_SRCDIR ${CMAKE_SOURCE_DIR}/pl)
|
||||
|
||||
cmake_policy( SET CMP0042 NEW)
|
||||
|
||||
# Compatibility vars with autotols
|
||||
set ( prefix "${CMAKE_INSTALL_PREFIX}")
|
||||
set ( exec_prefix "${prefix}")
|
||||
set ( libdir "${exec_prefix}/lib")
|
||||
set ( dlls "${exec_prefix}/lib/Yap")
|
||||
set ( includedir "${prefix}/include")
|
||||
set ( datarootdir "${prefix}/share")
|
||||
set ( libpl "${prefix}/share/Yap")
|
||||
set ( datadir "${datarootdir}")
|
||||
set ( mandir "${datarootdir}/man")
|
||||
set ( bindir "${exec_prefix}/bin")
|
||||
set ( docdir "${exec_prefix}/share/doc/Yap")
|
||||
|
||||
set(YAP_ROOTDIR ${prefix})
|
||||
|
||||
# erootdir -> rootdir
|
||||
# bindir defined above
|
||||
# libdir defined above
|
||||
set(YAPLIBDIR "${libdir}/Yap")
|
||||
set(YAP_LIBDIR "${dlls}")
|
||||
set(YAP_SHAREDIR "${datarootdir}")
|
||||
set(YAP_BINDIR "${bindir}")
|
||||
set(YAP_ROOTDIR "${prefix}")
|
||||
|
||||
# Compilation Flags
|
||||
if (CMAKE_COMPILER_IS_GNUCC)
|
||||
message(STATUS "Original CMAKE_C_FLAGS ${CMAKE_C_FLAGS}")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wstrict-prototypes -Wmissing-prototypes")
|
||||
message(STATUS "Running with CMAKE_C_FLAGS ${CMAKE_C_FLAGS}")
|
||||
message(STATUS "Original CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -O -g")
|
||||
message(STATUS "Runing with CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}")
|
||||
message(STATUS "Original CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE}")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -O3 -fomit-frame-pointer")
|
||||
message(STATUS "Running with CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE}")
|
||||
endif()
|
||||
|
||||
add_definitions(-D_YAP_NOT_INSTALLED_=1 -DHAVE_CONFIG_H)
|
||||
|
||||
set(YAP_YAPLIB libYap.${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||
set(YAP_YAPLIB libYap${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||
set(YAP_STARTUP startup.yss)
|
||||
set(YAP_TIMESTAMP string(TIMESTAMP _output "%d/%m/%Y"))
|
||||
string(TIMESTAMP YAP_TIMESTAMP)
|
||||
|
||||
#
|
||||
# Optional libraries that affect compilation
|
||||
@ -86,16 +86,13 @@ include (MacroLogFeature)
|
||||
include (CMakeDependentOption)
|
||||
include (CheckSymbolExists)
|
||||
|
||||
set ( USE_SYSTEM_MALLOC 1)
|
||||
set ( MALLOC_T void *)
|
||||
set ( USE_THREADED_CODE 1)
|
||||
set ( MIN_STACKSPACE 1024*SIZEOF_INT_P )
|
||||
set ( MIN_HEAPSPACE 2*1024*SIZEOF_INT_P )
|
||||
set ( MIN_TRAILSPACE 512*SIZEOF_INT_P )
|
||||
set ( DEF_STACKSPACE 1024*SIZEOF_INT_P )
|
||||
set ( DEF_HEAPSPACE 2*1024*SIZEOF_INT_P )
|
||||
set ( DEF_TRAILSPACE 512*SIZEOF_INT_P )
|
||||
set ( HAVE_GCC 1 )
|
||||
set ( DEF_STACKSPACE 0 )
|
||||
set ( DEF_HEAPSPACE 0 )
|
||||
set ( DEF_TRAILSPACE 0 )
|
||||
|
||||
# option (WITH_RATIONAL_TREES "support infinite rational trees" ON)
|
||||
add_definitions (-DRATIONAL_TREES=1)
|
||||
@ -103,6 +100,7 @@ add_definitions (-DRATIONAL_TREES=1)
|
||||
# option (WITH_COROUTINING
|
||||
# "support co-routining, attributed variables and constraints" ON)
|
||||
add_definitions (-DCOROUTINING=1)
|
||||
|
||||
# if (WITH_RATIONAL_TREES and WITH_COROUTINING)
|
||||
#TODO: install (cd LGPL/clp ; $(MAKE) install)
|
||||
# endif (WITH_RATIONAL_TREES and WITH_COROUTINING)
|
||||
@ -111,6 +109,38 @@ add_definitions (-DCOROUTINING=1)
|
||||
# "support depth-bound computation" ON)
|
||||
add_definitions (-DDEPTH_LIMIT=1)
|
||||
|
||||
#ensure cells are properly aligned in code
|
||||
set (ALIGN_LONGS 1)
|
||||
|
||||
#ensure best access to slots in environments
|
||||
set (MSHIFTOFFS 1)
|
||||
|
||||
set (C_COMPILER CMAKE_C_COMPILER_ID)
|
||||
|
||||
if ( ${C_COMPILER} MATCHES "GNU")
|
||||
set (HAVE_GCC 1)
|
||||
endif()
|
||||
|
||||
# compatible compilers
|
||||
if ( ${C_COMPILER} MATCHES "Clang")
|
||||
set (HAVE_GCC 1)
|
||||
endif()
|
||||
|
||||
if ( ${C_COMPILER} MATCHES "Intel")
|
||||
set (HAVE_GCC 1)
|
||||
endif()
|
||||
|
||||
# replace instructions codes by the address of their code
|
||||
option (WITH_THREADED_CODE "Use threaded code" ON)
|
||||
if (WITH_THREADED_CODE)
|
||||
set (USE_THREADED_CODE 1)
|
||||
endif (WITH_THREADED_CODE)
|
||||
|
||||
#
|
||||
# include libtai package as an independent library
|
||||
#
|
||||
add_subdirectory (os/libtai)
|
||||
|
||||
option (WITH_TABLING "Support tabling" ON)
|
||||
if (WITH_TABLING)
|
||||
#this depends on DEPTH_LIMIT define it after
|
||||
@ -118,7 +148,6 @@ if (WITH_TABLING)
|
||||
#this macro should realy be in config.h or other like it
|
||||
#and it is used across several files outside OPTYap
|
||||
add_definitions (-DTABLING=1)
|
||||
add_definitions (-DGC_NO_TAGS=1)
|
||||
include_directories (OPTYap)
|
||||
add_subdirectory (OPTYap)
|
||||
endif(WITH_TABLING)
|
||||
@ -146,13 +175,193 @@ option (System_Threads
|
||||
"support system threads" OFF)
|
||||
#TODO:
|
||||
|
||||
#
|
||||
# Sources Section
|
||||
#
|
||||
|
||||
set(IOLIB_SOURCES
|
||||
os/pl-buffer.c
|
||||
os/pl-codelist.c
|
||||
os/pl-ctype.c
|
||||
os/pl-dtoa.c
|
||||
os/pl-error.c
|
||||
os/pl-file.c
|
||||
os/pl-files.c
|
||||
os/pl-fmt.c
|
||||
os/pl-glob.c
|
||||
os/pl-option.c
|
||||
os/pl-nt.c
|
||||
os/pl-os.c
|
||||
os/pl-privitf.c
|
||||
os/pl-prologflag.c
|
||||
os/pl-read.c
|
||||
os/pl-rl.c
|
||||
os/pl-stream.c
|
||||
os/pl-string.c
|
||||
os/pl-table.c
|
||||
os/pl-tai.c
|
||||
os/pl-text.c
|
||||
os/pl-utf8.c
|
||||
os/pl-write.c
|
||||
C/pl-yap.c
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
set(IOLIBS_SOURCES
|
||||
${IOLIBS_SOURCES}
|
||||
os/windows/uxnt.c
|
||||
)
|
||||
endif (WIN32)
|
||||
|
||||
set (ENGINE_SOURCES
|
||||
C/agc.c
|
||||
C/absmi.c
|
||||
C/adtdefs.c
|
||||
C/alloc.c
|
||||
C/amasm.c
|
||||
C/analyst.c
|
||||
C/arrays.c
|
||||
C/arith0.c
|
||||
C/arith1.c
|
||||
C/arith2.c
|
||||
C/atomic.c
|
||||
C/attvar.c
|
||||
C/bignum.c
|
||||
C/bb.c
|
||||
C/cdmgr.c
|
||||
C/cmppreds.c
|
||||
C/compiler.c
|
||||
C/computils.c
|
||||
C/corout.c
|
||||
C/cut_c.c
|
||||
C/dbase.c
|
||||
C/dlmalloc.c
|
||||
C/errors.c
|
||||
C/eval.c
|
||||
C/exec.c
|
||||
C/exo.c
|
||||
C/exo_udi.c
|
||||
C/globals.c
|
||||
C/gmp_support.c
|
||||
C/gprof.c
|
||||
C/grow.c
|
||||
C/heapgc.c
|
||||
C/index.c
|
||||
C/init.c
|
||||
C/inlines.c
|
||||
C/iopreds.c
|
||||
C/depth_bound.c
|
||||
C/mavar.c
|
||||
C/modules.c
|
||||
C/other.c
|
||||
C/parser.c
|
||||
C/qlyr.c
|
||||
C/qlyw.c
|
||||
C/range.c
|
||||
C/save.c
|
||||
C/scanner.c
|
||||
C/signals.c
|
||||
C/sort.c
|
||||
C/stdpreds.c
|
||||
C/sysbits.c
|
||||
C/text.c
|
||||
C/threads.c
|
||||
C/tracer.c
|
||||
C/unify.c
|
||||
C/userpreds.c
|
||||
C/utilpreds.c
|
||||
C/yap-args.c
|
||||
C/write.c
|
||||
C/ypstdio.c
|
||||
library/dialect/swi/fli/swi.c
|
||||
library/dialect/swi/fli/blobs.c
|
||||
C/udi.c
|
||||
#packages/udi/rtree.c
|
||||
#packages/udi/rtree_udi.c
|
||||
|
||||
# ${IOLIB_SOURCES}
|
||||
# MPI_SOURCES
|
||||
)
|
||||
|
||||
set(C_INTERFACE_SOURCES
|
||||
C/load_foreign.c
|
||||
C/load_dl.c
|
||||
C/load_dld.c
|
||||
C/load_dyld.c
|
||||
C/load_none.c
|
||||
C/load_aout.c
|
||||
C/load_aix.c
|
||||
C/load_dll.c
|
||||
C/load_shl.c
|
||||
C/c_interface.c
|
||||
C/clause_list.c
|
||||
)
|
||||
|
||||
SET(OPTYAP_SOURCES
|
||||
OPTYap/or.memory.c
|
||||
OPTYap/opt.init.c
|
||||
OPTYap/opt.preds.c
|
||||
OPTYap/or.copy_engine.c
|
||||
OPTYap/or.cow_engine.c
|
||||
OPTYap/or.sba_engine.c
|
||||
OPTYap/or.thread_engine.c
|
||||
OPTYap/or.scheduler.c
|
||||
OPTYap/or.cut.c
|
||||
OPTYap/tab.tries.c
|
||||
OPTYap/tab.completion.c
|
||||
)
|
||||
|
||||
set(STATIC_SOURCES
|
||||
#NOT INCLUDED FOR NOW
|
||||
)
|
||||
|
||||
set(CONSOLE_SOURCES console/yap.c)
|
||||
|
||||
#MPI STUFF
|
||||
# library/mpi/mpi.c library/mpi/mpe.c
|
||||
# library/lammpi/yap_mpi.c library/lammpi/hash.c library/lammpi/prologterms2c.c
|
||||
# )
|
||||
|
||||
#WIN STUFF
|
||||
# SET(PLCONS_SOURCES
|
||||
# console/LGPL/pl-nt.c
|
||||
# console/LGPL/pl-ntcon.c
|
||||
# console/LGPL/pl-ntconsole.c
|
||||
# console/LGPL/pl-ntmain.c
|
||||
# )
|
||||
|
||||
# ADD_SUBDIRECTORY(GPL)
|
||||
# ADD_SUBDIRECTORY(LGPL)
|
||||
# ADD_SUBDIRECTORY(library)
|
||||
# ADD_SUBDIRECTORY(os)
|
||||
# ADD_SUBDIRECTORY(packages)
|
||||
# ADD_SUBDIRECTORY(packages)
|
||||
ADD_SUBDIRECTORY(pl)
|
||||
|
||||
## define system
|
||||
|
||||
add_library(libYap SHARED
|
||||
${ENGINE_SOURCES}
|
||||
${IOLIB_SOURCES}
|
||||
${C_INTERFACE_SOURCES}
|
||||
${STATIC_SOURCES}
|
||||
${OPTYAP_SOURCES}
|
||||
$<TARGET_OBJECTS:libyaptai> )
|
||||
|
||||
target_link_libraries(libYap
|
||||
m resolv stdc++ )
|
||||
|
||||
set_target_properties(libYap
|
||||
PROPERTIES VERSION ${YAP_FULL_VERSION}
|
||||
SOVERSION ${YAP_MAJOR_VERSION}.${YAP_MINOR_VERSION}
|
||||
OUTPUT_NAME Yap
|
||||
)
|
||||
|
||||
|
||||
option (WITH_Dynamic_BDD
|
||||
"dynamic bdd library" OFF)
|
||||
#TODO:
|
||||
|
||||
cmake_dependent_option (WITH_PThreadLocking
|
||||
"use pthread locking primitives for internal locking" ON
|
||||
System_Threads OFF)
|
||||
#TODO:
|
||||
|
||||
include_directories (H include os ${CMAKE_CURRENT_BINARY_DIR})
|
||||
@ -169,32 +378,25 @@ macro_log_feature (GMP_FOUND "libgmp"
|
||||
"http://gmplib.org")
|
||||
if (GMP_FOUND)
|
||||
include_directories (${GMP_INCLUDE_DIR})
|
||||
set (EXTRALIBS ${EXTRALIBS} ${GMP_LIBRARIES})
|
||||
target_link_libraries(libYap ${GMP_LIBRARIES})
|
||||
#config.h needs this (TODO: change in code latter)
|
||||
set (USE_GMP 1)
|
||||
set( CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${GMP_INCLUDE_DIR} )
|
||||
set( CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${GMP_LIBRARIES} )
|
||||
endif (GMP_FOUND)
|
||||
|
||||
set (CURSES_NEED_NCURSES TRUE)
|
||||
macro_optional_find_package (Curses ON)
|
||||
macro_log_feature (CURSES_FOUND "libncurses"
|
||||
"NCurses Library"
|
||||
"")
|
||||
if (CURSES_FOUND)
|
||||
include_directories (${CURSES_INCLUDE_DIR})
|
||||
set (EXTRALIBS ${EXTRALIBS} ${CURSES_NCURSES_LIBRARY})
|
||||
endif (CURSES_FOUND)
|
||||
|
||||
macro_optional_find_package (Readline OFF)
|
||||
macro_optional_find_package (Readline ON)
|
||||
macro_log_feature (READLINE_FOUND "libreadline"
|
||||
"GNU Readline Library (or similar)"
|
||||
"http://www.gnu.org/software/readline")
|
||||
if (READLINE_FOUND)
|
||||
include_directories (${READLINE_INCLUDE_DIR})
|
||||
set (EXTRALIBS ${EXTRALIBS} ${READLINE_LIBRARIES})
|
||||
target_link_libraries(libYap ${READLINE_LIBRARIES})
|
||||
set (HAVE_READLINE_READLINE_H 1)
|
||||
set( CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${READLINE_INCLUDE_DIR} )
|
||||
set( CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${READLINE_LIBRARIES} )
|
||||
|
||||
check_function_exists( add_history HAVE_ADD_HISTORY )
|
||||
check_function_exists( rl_ HAVE_RL_DISCARD_ARGUMENT)
|
||||
check_function_exists( rl_begin_undo_group HAVE_RL_BEGIN_UNDO_GROUP)
|
||||
check_function_exists( rl_clear_pending_input HAVE_RL_CLEAR_PENDING_INPUT)
|
||||
check_function_exists( rl_discard_argument HAVE_RL_DISCARD_ARGUMENT)
|
||||
@ -204,12 +406,12 @@ if (READLINE_FOUND)
|
||||
check_function_exists( rl_reset_after_signal HAVE_RL_RESET_AFTER_SIGNAL )
|
||||
check_function_exists( rl_set_keyboard_input_timeout HAVE_RL_SET_KEYBOARD_INPUT_TIMEOUT )
|
||||
check_function_exists( rl_set_prompt HAVE_RL_SET_PROMPT)
|
||||
check_symbol_exists( rl_catch_signals readline/readline.h HAVE_DECL_RL_CATCH_SIGNALS_ )
|
||||
check_symbol_exists( rl_completion_func_t readline/readline.h HAVE_DECL_RL_COMPLETION_FUNC_T_ )
|
||||
check_symbol_exists( rl_done readline/readline.h HAVE_DECL_RL_DONE )
|
||||
check_symbol_exists( rl_hook_func_t readline/readline.h HAVE_DECL_RL_HOOK_FUNC_T_ )
|
||||
check_symbol_exists( rl_event_hook readline/readline.h HAVE_DECL_RL_EVENT_HOOK )
|
||||
check_symbol_exists( rl_readline_state readline/readline.h HAVE_DECL_RL_READLINE_STATE )
|
||||
check_symbol_exists( rl_catch_signals stdio.h;readline/readline.h HAVE_DECL_RL_CATCH_SIGNALS )
|
||||
check_symbol_exists( rl_completion_func_t stdio.h;readline/readline.h HAVE_DECL_RL_COMPLETION_FUNC_T )
|
||||
check_symbol_exists( rl_done stdio.h;readline/readline.h HAVE_DECL_RL_DONE )
|
||||
check_symbol_exists( rl_hook_func_t stdio.h;readline/readline.h HAVE_DECL_RL_HOOK_FUNC_T )
|
||||
check_symbol_exists( rl_event_hook stdio.h;readline/readline.h HAVE_DECL_RL_EVENT_HOOK )
|
||||
check_symbol_exists( rl_readline_state stdio.h;readline/readline.h HAVE_DECL_RL_READLINE_STATE )
|
||||
endif (READLINE_FOUND)
|
||||
|
||||
|
||||
@ -242,40 +444,37 @@ if (THREADS_FOUND)
|
||||
#
|
||||
# ::
|
||||
#
|
||||
set( THREADS_PREFER_PTHREAD_FLAG 1)
|
||||
check_function_exists( pthread_mutexattr_setkind_np HAVE_PTHREAD_MUTEXATTR_SETKIND_NP )
|
||||
check_function_exists( pthread_mutexattr_settype HAVE_PTHREAD_MUTEXATTR_SETTYPE )
|
||||
check_function_exists( pthread_setconcurrency HAVE_PTHREAD_SETCONCURRENCY )
|
||||
|
||||
set( THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
|
||||
if (CMAKE_USE_PTHREADS_INIT)
|
||||
target_link_libraries(libYap pthread)
|
||||
set (HAVE_READLINE_READLINE_H 1)
|
||||
set( CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} )
|
||||
check_function_exists( pthread_mutexattr_setkind_np HAVE_PTHREAD_MUTEXATTR_SETKIND_NP )
|
||||
check_function_exists( pthread_mutexattr_settype HAVE_PTHREAD_MUTEXATTR_SETTYPE )
|
||||
check_function_exists( pthread_setconcurrency HAVE_PTHREAD_SETCONCURRENCY )
|
||||
endif (CMAKE_USE_PTHREADS_INIT)
|
||||
#
|
||||
# Please note that the compiler flag can only be used with the imported
|
||||
# target. Use of both the imported target as well as this switch is highly
|
||||
# recommended for new code.
|
||||
endif (THREADS_FOUND)
|
||||
|
||||
macro_optional_add_subdirectory (library)
|
||||
|
||||
add_subdirectory (docs)
|
||||
|
||||
macro_optional_add_subdirectory (packages/swig)
|
||||
|
||||
macro_optional_add_subdirectory (packages/myddas)
|
||||
|
||||
macro_optional_add_subdirectory (packages/gecode)
|
||||
|
||||
macro_optional_add_subdirectory (packages/real)
|
||||
|
||||
macro_optional_add_subdirectory (packages/python)
|
||||
cmake_dependent_option (WITH_PThreadLocking
|
||||
"use pthread locking primitives for internal locking" ON
|
||||
System_Threads OFF)
|
||||
|
||||
macro_optional_add_subdirectory (packages/cuda)
|
||||
|
||||
macro_optional_add_subdirectory (packages/archive)
|
||||
|
||||
macro_optional_add_subdirectory (packages/jpl)
|
||||
macro_optional_add_subdirectory (packages/raptor)
|
||||
|
||||
macro_optional_add_subdirectory (packages/prosqlite)
|
||||
#macro_optional_add_subdirectory (packages/archive)
|
||||
|
||||
macro_optional_add_subdirectory (packages/zlib)
|
||||
#macro_optional_add_subdirectory (packages/jpl)
|
||||
|
||||
#macro_optional_add_subdirectory (packages/prosqlite)
|
||||
|
||||
#macro_optional_add_subdirectory (packages/zlib)
|
||||
|
||||
#todo: use cmake target builds
|
||||
# option (MAXPERFORMANCE
|
||||
@ -307,7 +506,10 @@ option (WITH_Static_compilation
|
||||
|
||||
option (Use_MALLOC
|
||||
"use malloc to allocate memory" ON)
|
||||
#TODO:
|
||||
if (Use_Malloc)
|
||||
# use default allocator
|
||||
set ( USE_SYSTEM_MALLOC 1 )
|
||||
endif()
|
||||
|
||||
option(CONDOR
|
||||
"allow YAP to be used from condor" OFF)
|
||||
@ -350,255 +552,48 @@ option(CONDOR
|
||||
#configure_file(packages/Makefile.defs.cmake packages/Makefile.defs)
|
||||
#configure_file(packages/Dialect.defs.cmake packages/Dialect.defs)
|
||||
|
||||
#
|
||||
# Sources Section
|
||||
#
|
||||
|
||||
set(IOLIB_SOURCES
|
||||
os/pl-buffer.c
|
||||
os/pl-codelist.c
|
||||
os/pl-ctype.c
|
||||
os/pl-dtoa.c
|
||||
os/pl-error.c
|
||||
os/pl-file.c
|
||||
os/pl-files.c
|
||||
os/pl-fmt.c
|
||||
os/pl-glob.c
|
||||
os/pl-option.c
|
||||
os/pl-nt.c
|
||||
os/pl-os.c
|
||||
os/pl-privitf.c
|
||||
os/pl-prologflag.c
|
||||
os/pl-read.c
|
||||
os/pl-rl.c
|
||||
os/pl-stream.c
|
||||
os/pl-string.c
|
||||
os/pl-table.c
|
||||
os/pl-tai.c
|
||||
os/pl-text.c
|
||||
os/pl-utf8.c
|
||||
os/pl-write.c
|
||||
C/pl-yap.c
|
||||
)
|
||||
if (WIN32)
|
||||
set(IOLIBS_SOURCES
|
||||
${IOLIBS_SOURCES}
|
||||
os/windows/uxnt.c
|
||||
)
|
||||
endif (WIN32)
|
||||
|
||||
set (ENGINE_SOURCES
|
||||
C/agc.c
|
||||
C/absmi.c
|
||||
C/adtdefs.c
|
||||
C/alloc.c
|
||||
C/amasm.c
|
||||
C/analyst.c
|
||||
C/arrays.c
|
||||
C/arith0.c
|
||||
C/arith1.c
|
||||
C/arith2.c
|
||||
C/atomic.c
|
||||
C/attvar.c
|
||||
C/bignum.c
|
||||
C/bb.c
|
||||
C/cdmgr.c
|
||||
C/cmppreds.c
|
||||
C/compiler.c
|
||||
C/computils.c
|
||||
C/corout.c
|
||||
C/cut_c.c
|
||||
C/dbase.c
|
||||
C/dlmalloc.c
|
||||
C/errors.c
|
||||
C/eval.c
|
||||
C/exec.c
|
||||
C/exo.c
|
||||
C/exo_udi.c
|
||||
C/globals.c
|
||||
C/gmp_support.c
|
||||
C/gprof.c
|
||||
C/grow.c
|
||||
C/heapgc.c
|
||||
C/index.c
|
||||
C/init.c
|
||||
C/inlines.c
|
||||
C/iopreds.c
|
||||
C/depth_bound.c
|
||||
C/mavar.c
|
||||
C/modules.c
|
||||
C/other.c
|
||||
C/parser.c
|
||||
C/qlyr.c
|
||||
C/qlyw.c
|
||||
C/range.c
|
||||
C/save.c
|
||||
C/scanner.c
|
||||
C/signals.c
|
||||
C/sort.c
|
||||
C/stdpreds.c
|
||||
C/sysbits.c
|
||||
C/text.c
|
||||
C/threads.c
|
||||
C/tracer.c
|
||||
C/unify.c
|
||||
C/userpreds.c
|
||||
C/utilpreds.c
|
||||
C/yap-args.c
|
||||
C/write.c
|
||||
C/ypstdio.c
|
||||
library/dialect/swi/fli/swi.c
|
||||
library/dialect/swi/fli/blobs.c
|
||||
|
||||
C/udi.c
|
||||
#packages/udi/rtree.c
|
||||
#packages/udi/rtree_udi.c
|
||||
|
||||
# ${IOLIB_SOURCES}
|
||||
# MPI_SOURCES
|
||||
)
|
||||
|
||||
set(LIBTAI_SOURCES
|
||||
os/libtai/tai_add.c
|
||||
os/libtai/tai_now.c
|
||||
os/libtai/tai_pack.c
|
||||
os/libtai/tai_sub.c
|
||||
os/libtai/tai_unpack.c
|
||||
os/libtai/taia_add.c
|
||||
os/libtai/taia_approx.c
|
||||
os/libtai/taia_fmtfrac.c
|
||||
os/libtai/taia_frac.c
|
||||
os/libtai/taia_half.c
|
||||
os/libtai/taia_less.c
|
||||
os/libtai/taia_now.c
|
||||
os/libtai/taia_pack.c
|
||||
os/libtai/taia_sub.c
|
||||
os/libtai/taia_tai.c
|
||||
os/libtai/taia_unpack.c
|
||||
os/libtai/caldate_fmt.c
|
||||
os/libtai/caldate_scan.c
|
||||
os/libtai/caldate_fmjd.c
|
||||
os/libtai/caldate_mjd.c
|
||||
os/libtai/caldate_norm.c
|
||||
os/libtai/caldate_ster.c
|
||||
os/libtai/leapsecs_read.c
|
||||
os/libtai/leapsecs_init.c
|
||||
os/libtai/leapsecs_add.c
|
||||
os/libtai/leapsecs_sub.c
|
||||
os/libtai/caltime_fmt.c
|
||||
os/libtai/caltime_scan.c
|
||||
os/libtai/caltime_tai.c
|
||||
os/libtai/caltime_utc.c
|
||||
)
|
||||
|
||||
set(C_INTERFACE_SOURCES
|
||||
C/load_foreign.c
|
||||
C/load_dl.c
|
||||
C/load_dld.c
|
||||
C/load_dyld.c
|
||||
C/load_none.c
|
||||
C/load_aout.c
|
||||
C/load_aix.c
|
||||
C/load_dll.c
|
||||
C/load_shl.c
|
||||
C/c_interface.c
|
||||
C/clause_list.c
|
||||
)
|
||||
|
||||
SET(OPTYAP_SOURCES
|
||||
OPTYap/or.memory.c
|
||||
OPTYap/opt.init.c
|
||||
OPTYap/opt.preds.c
|
||||
OPTYap/or.copy_engine.c
|
||||
OPTYap/or.cow_engine.c
|
||||
OPTYap/or.sba_engine.c
|
||||
OPTYap/or.thread_engine.c
|
||||
OPTYap/or.scheduler.c
|
||||
OPTYap/or.cut.c
|
||||
OPTYap/tab.tries.c
|
||||
OPTYap/tab.completion.c
|
||||
)
|
||||
|
||||
set(STATIC_SOURCES
|
||||
#NOT INCLUDED FOR NOW
|
||||
)
|
||||
|
||||
set(CONSOLE_SOURCES console/yap.c)
|
||||
|
||||
#MPI STUFF
|
||||
# library/mpi/mpi.c library/mpi/mpe.c
|
||||
# library/lammpi/yap_mpi.c library/lammpi/hash.c library/lammpi/prologterms2c.c
|
||||
# )
|
||||
|
||||
#WIN STUFF
|
||||
# SET(PLCONS_SOURCES
|
||||
# console/LGPL/pl-nt.c
|
||||
# console/LGPL/pl-ntcon.c
|
||||
# console/LGPL/pl-ntconsole.c
|
||||
# console/LGPL/pl-ntmain.c
|
||||
# )
|
||||
|
||||
# ADD_SUBDIRECTORY(GPL)
|
||||
# ADD_SUBDIRECTORY(LGPL)
|
||||
# ADD_SUBDIRECTORY(library)
|
||||
# ADD_SUBDIRECTORY(os)
|
||||
# ADD_SUBDIRECTORY(packages)
|
||||
|
||||
#
|
||||
# include subdirecetories configuration
|
||||
# include subdirectories configuration
|
||||
## after we have all functionality in
|
||||
#
|
||||
add_subdirectory (H)
|
||||
|
||||
# Compilation Flags
|
||||
if (CMAKE_COMPILER_IS_GNUCC)
|
||||
message(STATUS "Original CMAKE_C_FLAGS ${CMAKE_C_FLAGS}")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wstrict-prototypes -Wmissing-prototypes")
|
||||
message(STATUS "Running with CMAKE_C_FLAGS ${CMAKE_C_FLAGS}")
|
||||
message(STATUS "Original CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -O -g ")
|
||||
message(STATUS "Runing with CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}")
|
||||
message(STATUS "Original CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE}")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -O3 -fomit-frame-pointer")
|
||||
message(STATUS "Running with CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE}")
|
||||
endif()
|
||||
add_definitions(-O -fstrict-aliasing -freorder-blocks -fsched-interblock -Wall)
|
||||
add_definitions(-D_YAP_NOT_INSTALLED_=1 -DHAVE_CONFIG_H -DLOW_LEVEL_TRACER=1 -DDEBUG=1)
|
||||
add_definitions(-DTHREADEAD_CODE=1)
|
||||
add_definitions(-D_GNU_SOURCE=1 -D_XOPEN_SOURCE=700)
|
||||
|
||||
configure_file ("${PROJECT_SOURCE_DIR}/config.h.cmake"
|
||||
"${PROJECT_BINARY_DIR}/config.h" )
|
||||
configure_file ("${PROJECT_SOURCE_DIR}/YapTermConfig.h.cmake"
|
||||
"${PROJECT_BINARY_DIR}/YapTermConfig.h" )
|
||||
|
||||
|
||||
|
||||
add_library(libYap SHARED
|
||||
${ENGINE_SOURCES}
|
||||
${IOLIB_SOURCES}
|
||||
${C_INTERFACE_SOURCES}
|
||||
${STATIC_SOURCES}
|
||||
${OPTYAP_SOURCES}
|
||||
${LIBTAI_SOURCES})
|
||||
|
||||
target_link_libraries(libYap
|
||||
m resolv stdc++ ${EXTRALIBS} )
|
||||
|
||||
set_target_properties(libYap
|
||||
PROPERTIES INSTALL_RPATH ${libdir} VERSION ${YAP_FULL_VERSION} SOVERSION ${YAP_MAJOR_VERSION}.${YAP_MINOR_VERSION}
|
||||
)
|
||||
|
||||
add_executable (yap-bin ${CONSOLE_SOURCES})
|
||||
|
||||
set_target_properties (yap-bin PROPERTIES OUTPUT_NAME yap depends libYap)
|
||||
set_target_properties (yap-bin PROPERTIES OUTPUT_NAME yap)
|
||||
|
||||
target_link_libraries(yap-bin libYap )
|
||||
target_link_libraries(yap-bin libYap )
|
||||
|
||||
#add_custom_target (main ALL DEPENDS ${YAP_STARTUP} ) # WORKING_DIRECTORY ${CMAKE_BINARY_DIR} )
|
||||
|
||||
#add_custom_command (TARGET ${YAP_STARTUP}
|
||||
# COMMAND yap-bin -b ${CMAKE_SOURCE_DIR}/pl/boot.yap < /usr/bin/echo "bootstrap -- ${CMAKE_SOURCE_DIR}/pl/init.yap"
|
||||
# DEPENDS yap-bin
|
||||
#ŧ )
|
||||
# if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
# set(ORIGINAL_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE STRING "Default prefix path" FORCE)
|
||||
# endif()
|
||||
# mark_as_advanced(ORIGINAL_INSTALL_PREFIX)
|
||||
|
||||
# if( not( YAP_VERSION VERSION_EQUAL PROJECT_VERSION) )
|
||||
# set(CMAKE_INSTALL_PREFIX "${ORIGINAL_INSTALL_PREFIX}-${VERSION}" CACHE STRING "Install path" FORCE)
|
||||
# set(PROJECT_VERSION ${YAP_VERSION})
|
||||
# endif()
|
||||
add_custom_target (main ALL DEPENDS ${YAP_STARTUP} ) # WORKING_DIRECTORY ${CMAKE_BINARY_DIR} )
|
||||
|
||||
install (
|
||||
TARGETS yap-bin libYap
|
||||
RUNTIME DESTINATION bin
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib
|
||||
)
|
||||
TARGETS yap-bin libYap
|
||||
RUNTIME DESTINATION ${bindir}
|
||||
ARCHIVE DESTINATION ${libdir}
|
||||
LIBRARY DESTINATION ${libdir}
|
||||
)
|
||||
|
||||
macro_display_feature_log()
|
||||
|
||||
|
@ -108,7 +108,8 @@ endif (HAVE_LIBM)
|
||||
|
||||
check_library_exists( dl dlopen "" HAVE_LIBDL )
|
||||
if (HAVE_LIBDL)
|
||||
set(EXTRALIBS ${EXTRALIBS} dl)
|
||||
target_link_libraries(libYap dl)
|
||||
set( CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} dl )
|
||||
set(HAVE_DLOPEN 1)
|
||||
endif (HAVE_LIBDL)
|
||||
|
||||
@ -118,84 +119,76 @@ if (WIN32)
|
||||
set(EXTRALIBS ${EXTRALIBS} comdlg32)
|
||||
endif (HAVE_LIBCOMDLG32)
|
||||
check_library_exists( msvcrt strtok "" HAVE_LIBMSCRT )
|
||||
|
||||
if (HAVE_LIBMSCRT)
|
||||
set(EXTRALIBS ${EXTRALIBS} mscrt)
|
||||
endif (HAVE_LIBMSCRT)
|
||||
check_library_exists( shell32 main "" HAVE_LIBSHELL32 )
|
||||
|
||||
if (HAVE_LIBSHELL32)
|
||||
set(EXTRALIBS ${EXTRALIBS} shell32)
|
||||
endif (HAVE_LIBSHELL32)
|
||||
|
||||
check_library_exists( wsock32 main "" HAVE_LIBWSOCK32 )
|
||||
if (HAVE_LIBWSOCK32)
|
||||
set(EXTRALIBS ${EXTRALIBS} wsock32)
|
||||
endif (HAVE_LIBWSOCK32)
|
||||
|
||||
check_library_exists( ws2_32 main "" HAVE_LIBWS2_32 )
|
||||
if (HAVE_LIBWS2_32)
|
||||
set(EXTRALIBS ${EXTRALIBS} ws2_32)
|
||||
endif (HAVE_LIBWS2_32)
|
||||
endif()
|
||||
|
||||
check_library_exists( crypt crypt "" HAVE_LIBCRYPT )
|
||||
if (HAVE_LIBCRYPT)
|
||||
set(EXTRALIBS ${EXTRALIBS} crypt)
|
||||
target_link_libraries(libYap crypt)
|
||||
endif (HAVE_LIBCRYPT)
|
||||
|
||||
check_library_exists( judy Judy1Set "" HAVE_LIBJUDY )
|
||||
if (HAVE_LIBJUDY)
|
||||
set(EXTRALIBS ${EXTRALIBS} judy)
|
||||
endif (HAVE_LIBJUDY)
|
||||
|
||||
check_library_exists( log main "" HAVE_LIBLOG )
|
||||
if (HAVE_LIBLOG)
|
||||
set(EXTRALIBS ${EXTRALIBS} log)
|
||||
endif (HAVE_LIBLOG)
|
||||
|
||||
# check_library_exists( nsl nis_add "" HAVE_LIBNSL )
|
||||
# if (HAVE_LIBNSL)
|
||||
# target_link_libraries(libYap nsl)
|
||||
# endif (HAVE_LIBNSL)
|
||||
|
||||
check_library_exists( nsl nis_add "" HAVE_LIBNSL )
|
||||
if (HAVE_LIBNSL)
|
||||
set(EXTRALIBS ${EXTRALIBS} nsl)
|
||||
endif (HAVE_LIBNSL)
|
||||
# check_library_exists( nss_dns main "" HAVE_LIBNSS_DNS )
|
||||
# if (HAVE_LIBNSS_DNS)
|
||||
# target_link_libraries(libYap nss_dns)
|
||||
# endif (HAVE_LIBNSS_DNS)
|
||||
|
||||
check_library_exists( nss_dns main "" HAVE_LIBNSS_DNS )
|
||||
if (HAVE_LIBNSS_DNS)
|
||||
set(EXTRALIBS ${EXTRALIBS} nss_dns)
|
||||
endif (HAVE_LIBNSS_DNS)
|
||||
# check_library_exists( nss_files main "" HAVE_LIBNSS_FILES )
|
||||
# if (HAVE_LIBNSS_FILES)
|
||||
# set(EXTRALIBS ${EXTRALIBS} nss_files)
|
||||
# endif (HAVE_LIBNSS_FILES)
|
||||
|
||||
check_library_exists( nss_files main "" HAVE_LIBNSS_FILES )
|
||||
if (HAVE_LIBNSS_FILES)
|
||||
set(EXTRALIBS ${EXTRALIBS} nss_files)
|
||||
endif (HAVE_LIBNSS_FILES)
|
||||
# check_library_exists( psapi main "" HAVE_LIBPSAPI )
|
||||
# if (HAVE_LIBPSAPI)
|
||||
# set(EXTRALIBS ${EXTRALIBS} psapi)
|
||||
# endif (HAVE_LIBPSAPI)
|
||||
|
||||
check_library_exists( psapi main "" HAVE_LIBPSAPI )
|
||||
if (HAVE_LIBPSAPI)
|
||||
set(EXTRALIBS ${EXTRALIBS} psapi)
|
||||
endif (HAVE_LIBPSAPI)
|
||||
|
||||
check_library_exists( resolv main "" HAVE_LIBRESOLV )
|
||||
if (HAVE_LIBRESOLV)
|
||||
set(EXTRALIBS ${EXTRALIBS} resolv)
|
||||
endif (HAVE_LIBRESOLV)
|
||||
# check_library_exists( resolv main "" HAVE_LIBRESOLV )
|
||||
# if (HAVE_LIBRESOLV)
|
||||
# set(EXTRALIBS ${EXTRALIBS} resolv)
|
||||
# endif (HAVE_LIBRESOLV)
|
||||
|
||||
|
||||
check_library_exists( socket main "" HAVE_LIBSOCKET )
|
||||
if (HAVE_LIBSOCKET)
|
||||
set(EXTRALIBS ${EXTRALIBS} socket)
|
||||
endif (HAVE_LIBSOCKET)
|
||||
|
||||
check_library_exists( stdc__ main "" HAVE_LIBSTDC__ )
|
||||
if (HAVE_LIBSTDC__)
|
||||
set(EXTRALIBS ${EXTRALIBS} stdc__)
|
||||
endif (HAVE_LIBSTDC__)
|
||||
# check_library_exists( socket socket "" HAVE_LIBSOCKET )
|
||||
# if (HAVE_LIBSOCKET)
|
||||
# set(EXTRALIBS ${EXTRALIBS} socket)
|
||||
# endif (HAVE_LIBSOCKET)
|
||||
|
||||
check_library_exists( unicode main "" HAVE_LIBUNICODE )
|
||||
if (HAVE_LIBUNICODE)
|
||||
set(EXTRALIBS ${EXTRALIBS} unicode)
|
||||
endif (HAVE_LIBUNICODE)
|
||||
|
||||
|
||||
|
||||
|
||||
check_library_exists( ws2_32 main "" HAVE_LIBWS2_32 )
|
||||
if (HAVE_LIBWS2_32)
|
||||
set(EXTRALIBS ${EXTRALIBS} ws2_32)
|
||||
endif (HAVE_LIBWS2_32)
|
||||
|
||||
check_library_exists( xnet main "" HAVE_LIBXNET )
|
||||
if (HAVE_LIBXNET)
|
||||
set(EXTRALIBS ${EXTRALIBS} xnet)
|
||||
|
9
cmake/EmptyArray.c
Normal file
9
cmake/EmptyArray.c
Normal file
@ -0,0 +1,9 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
int array[0];
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return array[1];
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
|
||||
#Works under the assumption than when gecode is installed at least the kernel component exists
|
||||
# Look for the header file
|
||||
find_path(GECODE_INCLUDE_DIR NAMES gecode/kernel.hh)
|
||||
find_path(GECODE_INCLUDE_DIR NAMES gecode/kernel.hh )
|
||||
find_file(GECODE_CONFIG gecode/support/config.hpp)
|
||||
# Look for the library
|
||||
find_library(GECODE_LIBRARY NAMES gecodekernel)
|
||||
@ -40,6 +40,10 @@ if(GECODE_FOUND)
|
||||
if(GECODE_INT_LIBRARY)
|
||||
list(APPEND GECODE_LIBRARIES ${GECODE_INT_LIBRARY})
|
||||
endif()
|
||||
find_library(GECODE_FLOAT_LIBRARY gecodefloat)
|
||||
if(GECODE_FLOAT_LIBRARY)
|
||||
list(APPEND GECODE_LIBRARIES ${GECODE_FLOAT_LIBRARY})
|
||||
endif()
|
||||
find_library(GECODE_MM_LIBRARY gecodeminimodel)
|
||||
if(GECODE_MM_LIBRARY)
|
||||
list(APPEND GECODE_LIBRARIES ${GECODE_MM_LIBRARY})
|
||||
|
@ -1,99 +1,77 @@
|
||||
# -*- cmake -*-
|
||||
|
||||
#
|
||||
# FindR.cmake: Try to find R
|
||||
# - This module locates an installed R distribution.
|
||||
#
|
||||
# (C) Copyright 2005-2012 EDF-EADS-Phimeca
|
||||
# Defines the following:
|
||||
# R_COMMAND - Path to R command
|
||||
# R_HOME - Path to 'R home', as reported by R
|
||||
# R_INCLUDE_DIR - Path to R include directory
|
||||
# R_LIBRARY_BASE - Path to R library
|
||||
# R_LIBRARY_BLAS - Path to Rblas / blas library
|
||||
# R_LIBRARY_LAPACK - Path to Rlapack / lapack library
|
||||
# R_LIBRARY_READLINE - Path to readline library
|
||||
# R_LIBRARIES - Array of: R_LIBRARY_BASE, R_LIBRARY_BLAS, R_LIBRARY_LAPACK, R_LIBRARY_BASE [, R_LIBRARY_READLINE]
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License.
|
||||
# VTK_R_HOME - (deprecated, use R_HOME instead) Path to 'R home', as reported by R
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
# Variable search order:
|
||||
# 1. Attempt to locate and set R_COMMAND
|
||||
# - If unsuccessful, generate error and prompt user to manually set R_COMMAND
|
||||
# 2. Use R_COMMAND to set R_HOME
|
||||
# 3. Locate other libraries in the priority:
|
||||
# 1. Within a user-built instance of R at R_HOME
|
||||
# 2. Within an installed instance of R
|
||||
# 3. Within external system libraries
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# @author dutka
|
||||
# @date 2010-02-04 16:44:49 +0100 (Thu, 04 Feb 2010)
|
||||
# Id Makefile.am 1473 2010-02-04 15:44:49Z dutka
|
||||
#
|
||||
#
|
||||
# - Try to find R
|
||||
# Once done this will define
|
||||
#
|
||||
# R_FOUND - System has R
|
||||
# R_LIBRARIES - The libraries needed to use R
|
||||
# R_DEFINITIONS - Compiler switches required for using R
|
||||
# R_EXECUTABLE - The R interpreter
|
||||
|
||||
set(TEMP_CMAKE_FIND_APPBUNDLE ${CMAKE_FIND_APPBUNDLE})
|
||||
set(CMAKE_FIND_APPBUNDLE "NEVER")
|
||||
find_program(R_COMMAND R DOC "R executable.")
|
||||
set(CMAKE_FIND_APPBUNDLE ${TEMP_CMAKE_FIND_APPBUNDLE})
|
||||
|
||||
if ( R_EXECUTABLE AND R_LIBRARIES )
|
||||
# in cache already
|
||||
set( R_FIND_QUIETLY TRUE )
|
||||
endif ( R_EXECUTABLE AND R_LIBRARIES )
|
||||
if(R_COMMAND)
|
||||
execute_process(WORKING_DIRECTORY .
|
||||
COMMAND ${R_COMMAND} RHOME
|
||||
OUTPUT_VARIABLE R_ROOT_DIR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
# deprecated
|
||||
if(VTK_R_HOME)
|
||||
set(R_HOME ${VTK_R_HOME} CACHE PATH "R home directory obtained from R RHOME")
|
||||
else()
|
||||
set(R_HOME ${R_ROOT_DIR} CACHE PATH "R home directory obtained from R RHOME")
|
||||
set(VTK_R_HOME ${R_HOME})
|
||||
endif()
|
||||
# /deprecated
|
||||
# the following command does nothing currently, but will be used when deprecated code is removed
|
||||
set(R_HOME ${R_ROOT_DIR} CACHE PATH "R home directory obtained from R RHOME")
|
||||
|
||||
#IF (NOT WIN32)
|
||||
# # use pkg-config to get the directories and then use these values
|
||||
# # in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
# FIND_PACKAGE(PkgConfig)
|
||||
# PKG_CHECK_MODULES(PC_R R)
|
||||
# SET(R_DEFINITIONS ${PC_R_CFLAGS_OTHER})
|
||||
#ENDIF (NOT WIN32)
|
||||
find_path(R_INCLUDE_DIR R.h
|
||||
HINTS ${R_ROOT_DIR}
|
||||
PATHS /usr/local/lib /usr/local/lib64 /usr/share
|
||||
PATH_SUFFIXES include R/include
|
||||
DOC "Path to file R.h")
|
||||
|
||||
find_program ( R_EXECUTABLE
|
||||
NAMES R R.exe
|
||||
DOC "Path to the R command interpreter"
|
||||
)
|
||||
find_library(R_LIBRARY_BASE R
|
||||
HINTS ${R_ROOT_DIR}/lib
|
||||
DOC "R library (example libR.a, libR.dylib, etc.).")
|
||||
|
||||
get_filename_component ( _R_EXE_PATH ${R_EXECUTABLE} PATH )
|
||||
find_library(R_LIBRARY_BLAS NAMES Rblas blas
|
||||
HINTS ${R_ROOT_DIR}/lib
|
||||
DOC "Rblas library (example libRblas.a, libRblas.dylib, etc.).")
|
||||
|
||||
if ( R_EXECUTABLE )
|
||||
execute_process ( COMMAND ${R_EXECUTABLE} RHOME
|
||||
OUTPUT_VARIABLE _R_HOME
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
endif ( R_EXECUTABLE )
|
||||
find_library(R_LIBRARY_LAPACK NAMES Rlapack lapack
|
||||
HINTS ${R_ROOT_DIR}/lib
|
||||
DOC "Rlapack library (example libRlapack.a, libRlapack.dylib, etc.).")
|
||||
|
||||
find_library ( R_LIBRARIES
|
||||
NAMES R
|
||||
HINTS
|
||||
${PC_R_LIBDIR}
|
||||
${PC_R_LIBRARY_DIRS}
|
||||
${_R_HOME}/lib
|
||||
${_R_HOME}/lib/x86_64
|
||||
)
|
||||
find_library(R_LIBRARY_READLINE readline
|
||||
DOC "(Optional) system readline library. Only required if the R libraries were built with readline support.")
|
||||
|
||||
set ( R_PACKAGES )
|
||||
if ( R_EXECUTABLE )
|
||||
foreach ( _component ${R_FIND_COMPONENTS} )
|
||||
if ( NOT R_${_component}_FOUND )
|
||||
execute_process ( COMMAND echo "library(${_component})"
|
||||
COMMAND ${R_EXECUTABLE} --no-save --silent --no-readline --slave
|
||||
RESULT_VARIABLE _res
|
||||
OUTPUT_VARIABLE _trashout
|
||||
ERROR_VARIABLE _trasherr
|
||||
)
|
||||
if ( NOT _res )
|
||||
message ( STATUS "Looking for R package ${_component} - found" )
|
||||
set ( R_${_component}_FOUND 1 CACHE INTERNAL "True if R package ${_component} is here" )
|
||||
else ( NOT _res )
|
||||
message ( STATUS "Looking for R package ${_component} - not found" )
|
||||
set ( R_${_component}_FOUND 0 CACHE INTERNAL "True if R package ${_component} is here" )
|
||||
endif ( NOT _res )
|
||||
list ( APPEND R_PACKAGES R_${_component}_FOUND )
|
||||
endif ( NOT R_${_component}_FOUND )
|
||||
endforeach ( _component )
|
||||
endif ( R_EXECUTABLE )
|
||||
else()
|
||||
message(SEND_ERROR "FindR.cmake requires the following variables to be set: R_COMMAND")
|
||||
endif()
|
||||
|
||||
include ( FindPackageHandleStandardArgs )
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set R_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
find_package_handle_standard_args ( R DEFAULT_MSG R_EXECUTABLE R_LIBRARIES ${R_PACKAGES} )
|
||||
|
||||
mark_as_advanced ( R_EXECUTABLE R_LIBRARIES ${R_PACKAGES} )
|
||||
# Note: R_LIBRARY_BASE is added to R_LIBRARIES twice; this may be due to circular linking dependencies; needs further investigation
|
||||
set(R_LIBRARIES ${R_LIBRARY_BASE} ${R_LIBRARY_BLAS} ${R_LIBRARY_LAPACK} ${R_LIBRARY_BASE})
|
||||
if(R_LIBRARY_READLINE)
|
||||
set(R_LIBRARIES ${R_LIBRARIES} ${R_LIBRARY_READLINE})
|
||||
endif()
|
||||
|
@ -1,106 +0,0 @@
|
||||
# Copyright (C) 2012 - 2013 by Pedro Mendes, Virginia Tech Intellectual
|
||||
# Properties, Inc., University of Heidelberg, and The University
|
||||
# of Manchester.
|
||||
# All rights reserved.
|
||||
|
||||
# - Try to find the Raptor RDF parsing library (http://librdf.org/raptor/)
|
||||
# Once done this will define
|
||||
#
|
||||
# RAPTOR_FOUND - system has Raptor
|
||||
# RAPTOR_LIBRARIES - Link these to use Raptor
|
||||
# RAPTOR_INCLUDE_DIR - Include directory for using Raptor
|
||||
# RAPTOR_DEFINITIONS - Compiler switches required for using Raptor
|
||||
#
|
||||
# Capabilities
|
||||
# RAPTOR_HAVE_TRIG - Set if raptor has TRIG
|
||||
|
||||
# (c) 2007-2011 Sebastian Trueg <trueg@kde.org>
|
||||
# (c) 2011 Artem Serebriyskiy <v.for.vandal@gmail.com>
|
||||
# (c) 2011 Michael Jansen <kde@michael-jansen.biz>
|
||||
#
|
||||
# Based on FindFontconfig Copyright (c) 2006,2007 Laurent Montel, <montel@kde.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
|
||||
MACRO (FIND_RAPTOR)
|
||||
|
||||
ENDMACRO ()
|
||||
|
||||
|
||||
|
||||
# Check if we have cached results in case the last round was successful.
|
||||
if (NOT (RAPTOR_INCLUDE_DIR AND RAPTOR_LIBRARIES) OR NOT RAPTOR_FOUND)
|
||||
|
||||
set(RAPTOR_LDFLAGS)
|
||||
|
||||
find_path(RAPTOR_INCLUDE_DIR raptor.h
|
||||
PATHS $ENV{RAPTOR_DIR}/include
|
||||
$ENV{RAPTOR_DIR}
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/sw/include # Fink
|
||||
/opt/local/include # MacPorts
|
||||
/opt/csw/include # Blastwave
|
||||
/opt/include
|
||||
/usr/freeware/include
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
if (NOT RAPTOR_INCLUDE_DIR)
|
||||
find_path(RAPTOR_INCLUDE_DIR raptor.h)
|
||||
endif ()
|
||||
|
||||
find_library(RAPTOR_LIBRARY
|
||||
NAMES raptor
|
||||
PATHS $ENV{RAPTOR_DIR}/lib
|
||||
$ENV{RAPTOR_DIR}/lib-dbg
|
||||
$ENV{RAPTOR_DIR}
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/sw/lib # Fink
|
||||
/opt/local/lib # MacPorts
|
||||
/opt/csw/lib # Blastwave
|
||||
/opt/lib
|
||||
/usr/freeware/lib64
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
if (NOT RAPTOR_LIBRARY)
|
||||
find_library(RAPTOR_LIBRARY NAMES raptor)
|
||||
endif ()
|
||||
|
||||
if (NOT WIN32)
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_RAPTOR QUIET raptor)
|
||||
|
||||
if (PC_RAPTOR_FOUND)
|
||||
set(RAPTOR_DEFINITIONS ${PC_RAPTOR_CFLAGS_OTHER})
|
||||
set(RAPTOR_VERSION ${PC_RAPTOR_VERSION} CACHE STRING "Raptor Version found" )
|
||||
string( REGEX REPLACE "^.*-lraptor;" "" RAPTOR_LDFLAGS "${PC_RAPTOR_STATIC_LDFLAGS}")
|
||||
string( REGEX REPLACE "-lexpat[;]*" "" RAPTOR_LDFLAGS "${RAPTOR_LDFLAGS}")
|
||||
endif (PC_RAPTOR_FOUND)
|
||||
endif (NOT WIN32)
|
||||
|
||||
if (RAPTOR_LDFLAGS)
|
||||
set(RAPTOR_LIBRARY ${RAPTOR_LIBRARY} ${RAPTOR_LDFLAGS})
|
||||
endif (RAPTOR_LDFLAGS)
|
||||
|
||||
mark_as_advanced(RAPTOR_INCLUDE_DIR RAPTOR_LIBRARY)
|
||||
|
||||
endif () # Check for cached values
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package_handle_standard_args(
|
||||
Raptor
|
||||
VERSION_VAR RAPTOR_VERSION
|
||||
REQUIRED_VARS RAPTOR_LIBRARY RAPTOR_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(RAPTOR_VERSION)
|
||||
|
||||
if (NOT RAPTOR_FOUND AND Raptor_FIND_VERSION_MAJOR EQUAL "2" AND NOT Raptor_FIND_QUIET )
|
||||
pkg_check_modules(PC_RAPTOR QUIET raptor)
|
||||
if (PC_RAPTOR_FOUND)
|
||||
message( STATUS "You have raptor1 version ${PC_RAPTOR_VERSION} installed. Please update." )
|
||||
endif ()
|
||||
endif ()
|
@ -1,21 +1,82 @@
|
||||
# Find the Readline libraries
|
||||
#
|
||||
# READLINE_FOUND - system has Readline lib
|
||||
# READLINE_INCLUDE_DIR - the Readline include directory
|
||||
# READLINE_LIBRARIES - Libraries needed to use Readline
|
||||
# READLINE_HAVE_READLINE_HISTORY_H - true if readline/history.h is available
|
||||
# - Find the readline library
|
||||
# This module defines
|
||||
# READLINE_INCLUDE_DIR, path to readline/readline.h, etc.
|
||||
# READLINE_LIBRARIES, the libraries required to use READLINE.
|
||||
# READLINE_FOUND, If false, do not try to use READLINE.
|
||||
# also defined, but not for general use are
|
||||
# READLINE_readline_LIBRARY, where to find the READLINE library.
|
||||
# READLINE_ncurses_LIBRARY, where to find the ncurses library [might not be defined]
|
||||
|
||||
if (READLINE_INCLUDE_DIR AND READLINE_LIBRARIES)
|
||||
# Already in cache, be silent
|
||||
set(READLINE_FIND_QUIETLY TRUE)
|
||||
endif (READLINE_INCLUDE_DIR AND READLINE_LIBRARIES)
|
||||
# Apple readline does not support readline hooks
|
||||
# So we look for another one by default
|
||||
IF(APPLE)
|
||||
FIND_PATH(READLINE_INCLUDE_DIR NAMES readline/readline.h PATHS
|
||||
/sw/include
|
||||
/opt/local/include
|
||||
/opt/include
|
||||
/usr/local/opt/readline/include #brew
|
||||
/usr/local/include
|
||||
/usr/include/
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
ENDIF(APPLE)
|
||||
FIND_PATH(READLINE_INCLUDE_DIR NAMES readline/readline.h)
|
||||
|
||||
find_path(READLINE_INCLUDE_DIR NAMES readline/readline.h )
|
||||
find_library(READLINE_LIBRARIES NAMES readline libreadline)
|
||||
|
||||
find_file(READLINE_HAVE_READLINE_HISTORY_H readline/history.h)
|
||||
# Apple readline does not support readline hooks
|
||||
# So we look for another one by default
|
||||
IF(APPLE)
|
||||
FIND_LIBRARY(READLINE_readline_LIBRARY NAMES readline PATHS
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
/usr/local/opt/readline/lib #brew
|
||||
/opt/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
ENDIF(APPLE)
|
||||
FIND_LIBRARY(READLINE_readline_LIBRARY NAMES readline)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(READLINE DEFAULT_MSG READLINE_INCLUDE_DIR READLINE_LIBRARIES)
|
||||
# Sometimes readline really needs ncurses
|
||||
IF(APPLE)
|
||||
FIND_LIBRARY(READLINE_ncurses_LIBRARY NAMES ncurses PATHS
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
/opt/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
ENDIF(APPLE)
|
||||
FIND_LIBRARY(READLINE_ncurses_LIBRARY NAMES ncurses)
|
||||
|
||||
mark_as_advanced(READLINE_INCLUDE_DIR READLINE_LIBRARIES)
|
||||
MARK_AS_ADVANCED(
|
||||
READLINE_INCLUDE_DIR
|
||||
READLINE_readline_LIBRARY
|
||||
READLINE_ncurses_LIBRARY
|
||||
)
|
||||
|
||||
SET( READLINE_FOUND "NO" )
|
||||
IF(READLINE_INCLUDE_DIR)
|
||||
IF(READLINE_readline_LIBRARY)
|
||||
SET( READLINE_FOUND "YES" )
|
||||
SET( READLINE_LIBRARIES
|
||||
${READLINE_readline_LIBRARY}
|
||||
)
|
||||
|
||||
# some readline libraries depend on ncurses
|
||||
IF(READLINE_ncurses_LIBRARY)
|
||||
SET(READLINE_LIBRARIES ${READLINE_LIBRARIES} ${READLINE_ncurses_LIBRARY})
|
||||
ENDIF(READLINE_ncurses_LIBRARY)
|
||||
|
||||
ENDIF(READLINE_readline_LIBRARY)
|
||||
ENDIF(READLINE_INCLUDE_DIR)
|
||||
|
||||
IF(READLINE_FOUND)
|
||||
MESSAGE(STATUS "Found readline library")
|
||||
ELSE(READLINE_FOUND)
|
||||
IF(READLINE_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find readline -- please give some paths to CMake")
|
||||
ENDIF(READLINE_FIND_REQUIRED)
|
||||
ENDIF(READLINE_FOUND)
|
||||
|
22
cmake/TestForHighBitCharacters.c
Normal file
22
cmake/TestForHighBitCharacters.c
Normal file
@ -0,0 +1,22 @@
|
||||
#include <ctype.h>
|
||||
#if ((' ' & 0x0FF) == 0x020)
|
||||
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
|
||||
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
|
||||
#else
|
||||
# define ISLOWER(c) \
|
||||
(('a' <= (c) && (c) <= 'i') \
|
||||
|| ('j' <= (c) && (c) <= 'r') \
|
||||
|| ('s' <= (c) && (c) <= 'z'))
|
||||
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
|
||||
#endif
|
||||
|
||||
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 256; i++)
|
||||
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i))
|
||||
exit(1);
|
||||
exit (0);
|
||||
}
|
16
cmake/TestSignalType.c
Normal file
16
cmake/TestSignalType.c
Normal file
@ -0,0 +1,16 @@
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
#ifdef signal
|
||||
# undef signal
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
extern "C" void (*signal (int, void (*)(int)))(int);
|
||||
#else
|
||||
void (*signal ()) ();
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return 0;
|
||||
}
|
106
config.h.cmake
106
config.h.cmake
@ -16,7 +16,7 @@
|
||||
|
||||
/* longs should be in addresses that are multiple of four. */
|
||||
#ifndef ALIGN_LONGS
|
||||
#cmakedefine ALIGN_LONGS "${ALIGN_LONGS}"
|
||||
#define ALIGN_LONGS 1
|
||||
#endif
|
||||
|
||||
/* if fflush(NULL) clobbers input pipes1 */
|
||||
@ -54,14 +54,9 @@
|
||||
#define C_LIBS "${EXTRALIBS}"
|
||||
#endif
|
||||
|
||||
/* "Define if _XOPEN_SOURCE is needed" */
|
||||
#ifndef DEFINE_XOPEN_SOURCE
|
||||
#cmakedefine DEFINE_XOPEN_SOURCE "${DEFINE_XOPEN_SOURCE}"
|
||||
#endif
|
||||
|
||||
/* IEEE floating-point, basically everyone except old VAXEN */
|
||||
#ifndef FFIEEE
|
||||
#cmakedefine FFIEEE "${FFIEEE}"
|
||||
#define FFIEEE 1
|
||||
#endif
|
||||
|
||||
/* old HP-UX VM magic, should be irrelevant now */
|
||||
@ -69,14 +64,11 @@
|
||||
#cmakedefine FORCE_SECOND_QUADRANT "${FORCE_SECOND_QUADRANT}"
|
||||
#endif
|
||||
|
||||
/* support GNU extensions */
|
||||
#ifndef _GNU_SOURCE
|
||||
#cmakedefine _GNU_SOURCE "${_GNU_SOURCE}"
|
||||
#endif
|
||||
|
||||
/* use Barts idea of allocating extra memory */
|
||||
/* use Barts idea of allocating extra memory,
|
||||
probbly better to use two bits on 64bit machines
|
||||
*/
|
||||
#ifndef GC_NO_TAGS
|
||||
#cmakedefine GC_NO_TAGS "${GC_NO_TAGS}"
|
||||
#define GC_NO_TAGS 1
|
||||
#endif
|
||||
|
||||
/* Define if gethostname() is provided */
|
||||
@ -286,7 +278,7 @@ function. */
|
||||
/* Define to 1 if you have the declaration of `rl_catch_signals ', and to 0 if
|
||||
you don't. */
|
||||
#ifndef HAVE_DECL_RL_CATCH_SIGNALS_
|
||||
#cmakedefine HAVE_DECL_RL_CATCH_SIGNALS_ ${HAVE_DECL_RL_CATCH_SIGNALS_}
|
||||
#cmakedefine HAVE_DECL_RL_CATCH_SIGNALS ${HAVE_DECL_RL_CATCH_SIGNALS}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the declaration of `rl_done ', and to 0 if you
|
||||
@ -604,132 +596,132 @@ you don't. */
|
||||
|
||||
/* Define to 1 if you have the `android' library (-landroid). */
|
||||
#ifndef HAVE_LIBANDROID
|
||||
#cmakedefine HAVE_LIBANDROID ${HAVE_LIBANDROID}
|
||||
#define HAVE_LIBANDROID ${HAVE_LIBANDROID}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `comdlg32' library (-lcomdlg32). */
|
||||
#ifndef HAVE_LIBCOMDLG32
|
||||
#cmakedefine HAVE_LIBCOMDLG32 ${HAVE_LIBCOMDLG32}
|
||||
#define HAVE_LIBCOMDLG32 ${HAVE_LIBCOMDLG32}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `crypt' library (-lcrypt). */
|
||||
#ifndef HAVE_LIBCRYPT
|
||||
#cmakedefine HAVE_LIBCRYPT ${HAVE_LIBCRYPT}
|
||||
#define HAVE_LIBCRYPT ${HAVE_LIBCRYPT}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `gmp' library (-lgmp). */
|
||||
#ifndef HAVE_LIBGMP
|
||||
#cmakedefine HAVE_LIBGMP ${HAVE_LIBGMP}
|
||||
#define HAVE_LIBGMP ${HAVE_LIBGMP}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `Judy' library (-lJudy). */
|
||||
#ifndef HAVE_LIBJUDY
|
||||
#cmakedefine HAVE_LIBJUDY ${HAVE_LIBJUDY}
|
||||
#define HAVE_LIBJUDY ${HAVE_LIBJUDY}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <LibLoaderAPI.h> header file. */
|
||||
#ifndef HAVE_LIBLOADERAPI_H
|
||||
#cmakedefine HAVE_LIBLOADERAPI_H ${HAVE_LIBLOADERAPI_H}
|
||||
#define HAVE_LIBLOADERAPI_H ${HAVE_LIBLOADERAPI_H}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `log' library (-llog). */
|
||||
#ifndef HAVE_LIBLOG
|
||||
#cmakedefine HAVE_LIBLOG ${HAVE_LIBLOG}
|
||||
#define HAVE_LIBLOG ${HAVE_LIBLOG}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `m' library (-lm). */
|
||||
#ifndef HAVE_LIBM
|
||||
#cmakedefine HAVE_LIBM ${HAVE_LIBM}
|
||||
#define HAVE_LIBM ${HAVE_LIBM}
|
||||
#endif
|
||||
|
||||
/* MPI Debugging off */
|
||||
#ifndef HAVE_LIBMPE
|
||||
#cmakedefine HAVE_LIBMPE ${HAVE_LIBMPE}
|
||||
#define HAVE_LIBMPE ${HAVE_LIBMPE}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `mscrt' library (-lmscrt). */
|
||||
#ifndef HAVE_LIBMSCRT
|
||||
#cmakedefine HAVE_LIBMSCRT ${HAVE_LIBMSCRT}
|
||||
#define HAVE_LIBMSCRT ${HAVE_LIBMSCRT}
|
||||
#endif
|
||||
|
||||
/* "Define if you have the nsl library (-lnsl)." */
|
||||
#ifndef HAVE_LIBNSL
|
||||
#cmakedefine HAVE_LIBNSL ${HAVE_LIBNSL}
|
||||
#define HAVE_LIBNSL ${HAVE_LIBNSL}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `nss_dns' library (-lnss_dns). */
|
||||
#ifndef HAVE_LIBNSS_DNS
|
||||
#cmakedefine HAVE_LIBNSS_DNS ${HAVE_LIBNSS_DNS}
|
||||
#define HAVE_LIBNSS_DNS ${HAVE_LIBNSS_DNS}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `nss_files' library (-lnss_files). */
|
||||
#ifndef HAVE_LIBNSS_FILES
|
||||
#cmakedefine HAVE_LIBNSS_FILES ${HAVE_LIBNSS_FILES}
|
||||
#define HAVE_LIBNSS_FILES ${HAVE_LIBNSS_FILES}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `psapi' library (-lpsapi). */
|
||||
#ifndef HAVE_LIBPSAPI
|
||||
#cmakedefine HAVE_LIBPSAPI ${HAVE_LIBPSAPI}
|
||||
#define HAVE_LIBPSAPI ${HAVE_LIBPSAPI}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `pthread' library (-lpthread). */
|
||||
#ifndef HAVE_LIBPTHREAD
|
||||
#cmakedefine HAVE_LIBPTHREAD ${HAVE_LIBPTHREAD}
|
||||
#define HAVE_LIBPTHREAD ${HAVE_LIBPTHREAD}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `raptor' library (-lraptor). */
|
||||
#ifndef HAVE_LIBRAPTOR
|
||||
#cmakedefine HAVE_LIBRAPTOR ${HAVE_LIBRAPTOR}
|
||||
#define HAVE_LIBRAPTOR ${HAVE_LIBRAPTOR}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `raptor2' library (-lraptor2). */
|
||||
#ifndef HAVE_LIBRAPTOR2
|
||||
#cmakedefine HAVE_LIBRAPTOR2 ${HAVE_LIBRAPTOR2}
|
||||
#define HAVE_LIBRAPTOR2 ${HAVE_LIBRAPTOR2}
|
||||
#endif
|
||||
|
||||
/* Define if you have libreadline */
|
||||
#ifndef HAVE_LIBREADLINE
|
||||
#cmakedefine HAVE_LIBREADLINE ${READLINE_FOUND}
|
||||
#define HAVE_LIBREADLINE ${READLINE_FOUND}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `resolv' library (-lresolv). */
|
||||
#ifndef HAVE_LIBRESOLV
|
||||
#cmakedefine HAVE_LIBRESOLV ${HAVE_LIBRESOLV}
|
||||
#define HAVE_LIBRESOLV ${HAVE_LIBRESOLV}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `shell32' library (-lshell32). */
|
||||
#ifndef HAVE_LIBSHELL32
|
||||
#cmakedefine HAVE_LIBSHELL32 ${HAVE_LIBSHELL32}
|
||||
#define HAVE_LIBSHELL32 ${HAVE_LIBSHELL32}
|
||||
#endif
|
||||
|
||||
/* "Define if you have the socket library (-lsocket)." */
|
||||
#ifndef HAVE_LIBSOCKET
|
||||
#cmakedefine HAVE_LIBSOCKET ${HAVE_LIBSOCKET}
|
||||
#define HAVE_LIBSOCKET ${HAVE_LIBSOCKET}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `stdc++' library (-lstdc++). */
|
||||
#ifndef HAVE_LIBSTDC__
|
||||
#cmakedefine HAVE_LIBSTDC__ ${HAVE_LIBSTDC__}
|
||||
#define HAVE_LIBSTDC__ ${HAVE_LIBSTDC__}
|
||||
#endif
|
||||
|
||||
/* Whether we have libunicode.a */
|
||||
#ifndef HAVE_LIBUNICODE
|
||||
#cmakedefine HAVE_LIBUNICODE ${HAVE_LIBUNICODE}
|
||||
#define HAVE_LIBUNICODE ${HAVE_LIBUNICODE}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `ws2_32' library (-lws2_32). */
|
||||
#ifndef HAVE_LIBWS2_32
|
||||
#cmakedefine HAVE_LIBWS2_32 ${HAVE_LIBWS2_32}
|
||||
#define HAVE_LIBWS2_32 ${HAVE_LIBWS2_32}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `wsock32' library (-lwsock32). */
|
||||
#ifndef HAVE_LIBWSOCK32
|
||||
#cmakedefine HAVE_LIBWSOCK32 ${HAVE_LIBWSOCK32}
|
||||
#define HAVE_LIBWSOCK32 ${HAVE_LIBWSOCK32}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `xnet' library (-lxnet). */
|
||||
#ifndef HAVE_LIBXNET
|
||||
#cmakedefine HAVE_LIBXNET ${HAVE_LIBXNET}
|
||||
#define HAVE_LIBXNET ${HAVE_LIBXNET}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
@ -959,12 +951,12 @@ you don't. */
|
||||
|
||||
/* Define to 1 if you have the <readline/history.h> header file. */
|
||||
#ifndef HAVE_READLINE_HISTORY_H
|
||||
#cmakedefine HAVE_READLINE_HISTORY_H ${HAVE_READLINE_HISTORY_H}
|
||||
#define HAVE_READLINE_HISTORY_H ${HAVE_READLINE_HISTORY_H}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <readline/readline.h> header file. */
|
||||
#ifndef HAVE_READLINE_READLINE_H
|
||||
#cmakedefine HAVE_READLINE_READLINE_H ${HAVE_READLINE_READLINE_H}
|
||||
#define HAVE_READLINE_READLINE_H ${HAVE_READLINE_READLINE_H}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `readlink' function. */
|
||||
@ -1038,9 +1030,14 @@ signal. */
|
||||
#cmakedefine HAVE_RL_DISCARD_ARGUMENT ${HAVE_RL_DISCARD_ARGUMENT}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `rl_done' variable. */
|
||||
#ifndef HAVE_RL_DONE
|
||||
#define HAVE_RL_DONE ${HAVE_RL_DONE}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `rl_filename_completion_function' function. */
|
||||
#ifndef HAVE_RL_FILENAME_COMPLETION_FUNCTION
|
||||
#cmakedefine HAVE_RL_FILENAME_COMPLETION_FUNCTION ${HAVE_RL_FILENAME_COMPLETION_FUNCTION}
|
||||
#define HAVE_RL_FILENAME_COMPLETION_FUNCTION ${HAVE_RL_FILENAME_COMPLETION_FUNCTION}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `rl_free_line_state' function. */
|
||||
@ -1406,6 +1403,7 @@ signal. */
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#ifndef HAVE_SYS_SOCKET_H
|
||||
|
||||
#cmakedefine HAVE_SYS_SOCKET_H ${HAVE_SYS_SOCKET_H}
|
||||
#endif
|
||||
|
||||
@ -1616,12 +1614,12 @@ signal. */
|
||||
|
||||
/* max number of threads, default 1 or 1024 */
|
||||
#ifndef MAX_THREADS
|
||||
#cmakedefine MAX_THREADS "${MAX_THREADS}"
|
||||
#cmakedefine MAX_THREADS ${MAX_THREADS}
|
||||
#endif
|
||||
|
||||
/* maximum amount of or-parallelism */
|
||||
#ifndef MAX_WORKERS
|
||||
#cmakedefine MAX_WORKERS "${MAX_WORKERS}"
|
||||
#cmakedefine MAX_WORKERS ${MAX_WORKERS}
|
||||
#endif
|
||||
|
||||
/* o not use realloc() from HP-UX 10.20 together with MPI */
|
||||
@ -1631,12 +1629,12 @@ signal. */
|
||||
|
||||
/* compiler should shift offsets. */
|
||||
#ifndef MSHIFTOFFS
|
||||
#cmakedefine MSHIFTOFFS "${MSHIFTOFFS}"
|
||||
#cmakedefine MSHIFTOFFS ${MSHIFTOFFS}
|
||||
#endif
|
||||
|
||||
/* myddas release */
|
||||
#ifndef MYDDAS_VERSION
|
||||
#cmakedefine MYDDAS_VERSION "${MYDDAS_VERSION}"
|
||||
#define MYDDAS_VERSION "${MYDDAS_VERSION}"
|
||||
#endif
|
||||
|
||||
/* at least 2M Cells for Heap */
|
||||
@ -1701,7 +1699,7 @@ signal. */
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#ifndef PACKAGE_VERSION
|
||||
#cmakedefine PACKAGE_VERSION "${PACKAGE_VERSION}"
|
||||
#define PACKAGE_VERSION "${YAP_VERSION}"
|
||||
#endif
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
@ -1786,7 +1784,7 @@ signal. */
|
||||
|
||||
/* relocable objects */
|
||||
#ifndef SO_EXT
|
||||
#define SO_EXT "${CMAKE_SHARED_LIBRARY_PREFIX}"
|
||||
#define SO_EXT "${CMAKE_SHARED_LIBRARY_SUFFIX}"
|
||||
#endif
|
||||
|
||||
/* library search variable */
|
||||
@ -1886,17 +1884,17 @@ significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||
|
||||
/* where the yap executable lives */
|
||||
#ifndef YAP_BINDIR
|
||||
#define YAP_BINDIR "${bindir}"
|
||||
#define YAP_BINDIR "${YAP_BINDIR}"
|
||||
#endif
|
||||
|
||||
/* YAP version string */
|
||||
#ifndef YAP_FULL_VERSION
|
||||
#define YAP_FULL_VERSION "${YAP_FULL_VERSION}"
|
||||
#define YAP_FULL_VERSION "YAP ${YAP_FULL_VERSION}: ${YAP_ARCH}-${CMAKE_SYSTEM}, @${YAP_SITE}, ${YAP_TIMESTAMP}"
|
||||
#endif
|
||||
|
||||
/* where to look for shared libraries */
|
||||
#ifndef YAP_LIBDIR
|
||||
#define YAP_LIBDIR "${libdir}"
|
||||
#define YAP_LIBDIR "${YAP_LIBDIR}"
|
||||
#endif
|
||||
|
||||
/* numerical version */
|
||||
@ -1941,7 +1939,7 @@ significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||
|
||||
/* name of YAP library */
|
||||
#ifndef YAP_YAPLIB
|
||||
#cmakedefine YAP_YAPLIB "${YAP_YAPLIB}"
|
||||
#define YAP_YAPLIB "${YAP_YAPLIB}"
|
||||
#endif
|
||||
|
||||
/* HP-UX old socket stuff */
|
||||
|
@ -167,6 +167,7 @@ main (int argc, char **argv)
|
||||
t_goal = YAP_MkApplTerm(YAP_MkFunctor(YAP_LookupAtom("ypp_define"),2), 2, t_args);
|
||||
YAP_RunGoalOnce(t_goal);
|
||||
}
|
||||
|
||||
}
|
||||
YAP_Reset( YAP_FULL_RESET );
|
||||
/* End preprocessor code */
|
||||
|
@ -1,3 +1,64 @@
|
||||
set (LIBRARY_PL
|
||||
INDEX.pl
|
||||
apply.yap
|
||||
apply_macros.yap
|
||||
arg.yap
|
||||
assoc.yap
|
||||
atts.yap
|
||||
autoloader.yap
|
||||
avl.yap
|
||||
bhash.yap
|
||||
charsio.yap
|
||||
coinduction.yap
|
||||
dbqueues.yap
|
||||
dbusage.yap
|
||||
dgraphs.yap
|
||||
exo_interval.yap
|
||||
expand_macros.yap
|
||||
gensym.yap
|
||||
hacks.yap
|
||||
heaps.yap
|
||||
lambda.pl
|
||||
lineutils.yap
|
||||
listing.yap
|
||||
lists.yap
|
||||
nb.yap
|
||||
ordsets.yap
|
||||
mapargs.yap
|
||||
maplist.yap
|
||||
maputils.yap
|
||||
matlab.yap
|
||||
matrix.yap
|
||||
prandom.yap
|
||||
queues.yap
|
||||
random.yap
|
||||
range.yap
|
||||
rbtrees.yap
|
||||
regexp.yap
|
||||
rltree.yap
|
||||
sockets.yap
|
||||
splay.yap
|
||||
stringutils.yap
|
||||
system.yap
|
||||
terms.yap
|
||||
tries.yap
|
||||
itries.yap
|
||||
timeout.yap
|
||||
trees.yap
|
||||
ugraphs.yap
|
||||
undgraphs.yap
|
||||
varnumbers.yap
|
||||
wdgraphs.yap
|
||||
wgraphs.yap
|
||||
wundgraphs.yap
|
||||
lam_mpi.yap
|
||||
ypp.yap
|
||||
c_alarms.yap
|
||||
flags.yap
|
||||
block_diagram.yap
|
||||
)
|
||||
|
||||
add_subdirectory(clp)
|
||||
add_subdirectory(lammpi)
|
||||
add_subdirectory(matlab)
|
||||
add_subdirectory(matrix)
|
||||
@ -7,3 +68,11 @@ add_subdirectory(regex)
|
||||
add_subdirectory(rltree)
|
||||
add_subdirectory(system)
|
||||
add_subdirectory(tries)
|
||||
|
||||
install(FILES ${LIBRARY_PL}
|
||||
DESTINATION ${libpl}
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
macro_optional_find_package (Matlab OFF)
|
||||
macro_log_feature (MATLAB_FOUND "matlab"
|
||||
"MATLAB Distributed Parallel Programming"
|
||||
"MATLAB A Language for Technical Computing"
|
||||
"http://matlab.com")
|
||||
if (MATLAB_FOUND)
|
||||
# MATLAB_INCLUDE_DIR: include path for mex.h, engine.h
|
||||
@ -8,5 +8,16 @@ if (MATLAB_FOUND)
|
||||
# MATLAB_MEX_LIBRARY: path to libmex.lib
|
||||
# MATLAB_MX_LIBRARY: path to libmx.lib
|
||||
# MATLAB_ENG_LIBRARY: path to libeng.lib
|
||||
|
||||
add_library (matlab SHARED matlab.c)
|
||||
|
||||
set_target_properties (matlab PROPERTIES prefix "")
|
||||
|
||||
include_directories (${MATLAB_INCLUDE_DIR})
|
||||
target_link_libraries(matlab libYap $(MATLAB_LIBRARIES) )
|
||||
|
||||
install(TARGETS matlab
|
||||
LIBRARY DESTINATION ${dlls} )
|
||||
|
||||
endif (MATLAB_FOUND)
|
||||
|
||||
|
@ -0,0 +1,10 @@
|
||||
|
||||
add_library (matrix SHARED matrix.c)
|
||||
|
||||
target_link_libraries(matrix libYap)
|
||||
|
||||
set_target_properties (matrix PROPERTIES PREFIX "")
|
||||
|
||||
install(TARGETS matrix
|
||||
LIBRARY DESTINATION ${dlls} )
|
||||
|
@ -0,0 +1,10 @@
|
||||
|
||||
add_library (yap_random SHARED yap_random.c)
|
||||
|
||||
target_link_libraries(yap_random libYap)
|
||||
|
||||
set_target_properties (yap_random PROPERTIES PREFIX "")
|
||||
|
||||
install(TARGETS yap_random
|
||||
LIBRARY DESTINATION ${dlls} )
|
||||
|
@ -0,0 +1,22 @@
|
||||
|
||||
add_library (regexp SHARED regexp.c)
|
||||
|
||||
if( NOT HAVE_REGEX_H )
|
||||
set ( REGEX_SOURCES
|
||||
cclass.h
|
||||
cname.h
|
||||
collate.h
|
||||
utils.h
|
||||
yapregex.h
|
||||
engine.c
|
||||
regcomp.c
|
||||
)
|
||||
endif( NOT HAVE_REGEX_H )
|
||||
|
||||
target_link_libraries(regexp libYap ${REGEX_SOURCES})
|
||||
|
||||
set_target_properties (regexp PROPERTIES PREFIX "")
|
||||
|
||||
install(TARGETS regexp
|
||||
LIBRARY DESTINATION ${dlls} )
|
||||
|
@ -0,0 +1,15 @@
|
||||
|
||||
set ( RLTREE_SOURCES
|
||||
range_list.c
|
||||
range_list.h
|
||||
)
|
||||
|
||||
add_library (yap_rl SHARED yap_rl.c ${RLTREE_SOURCES})
|
||||
|
||||
target_link_libraries(yap_rl libYap)
|
||||
|
||||
set_target_properties (yap_rl PROPERTIES PREFIX "")
|
||||
|
||||
install(TARGETS yap_rl
|
||||
LIBRARY DESTINATION ${dlls} )
|
||||
|
@ -0,0 +1,10 @@
|
||||
|
||||
add_library (sys SHARED sys.c)
|
||||
|
||||
target_link_libraries(sys libYap)
|
||||
|
||||
set_target_properties (sys PROPERTIES PREFIX "")
|
||||
|
||||
install(TARGETS sys
|
||||
LIBRARY DESTINATION ${dlls} )
|
||||
|
@ -0,0 +1,32 @@
|
||||
|
||||
set ( TRIES_SOURCES
|
||||
core_tries.c
|
||||
base_tries.c
|
||||
tries.c
|
||||
)
|
||||
|
||||
add_library (tries SHARED ${TRIES_SOURCES})
|
||||
|
||||
target_link_libraries(tries libYap)
|
||||
|
||||
set_target_properties (tries PROPERTIES PREFIX "")
|
||||
|
||||
install(TARGETS tries
|
||||
LIBRARY DESTINATION ${dlls} )
|
||||
|
||||
|
||||
set ( ITRIES_SOURCES
|
||||
core_tries.c
|
||||
base_itries.c
|
||||
itries.c
|
||||
)
|
||||
|
||||
add_library (itries SHARED ${ITRIES_SOURCES})
|
||||
|
||||
target_link_libraries(itries libYap)
|
||||
|
||||
set_target_properties (itries PROPERTIES PREFIX "")
|
||||
|
||||
install(TARGETS itries
|
||||
LIBRARY DESTINATION ${dlls} )
|
||||
|
@ -65,6 +65,9 @@ gen_struct(Inp,Out) :-
|
||||
gen_struct(Inp,Out) :-
|
||||
split(Inp," ",["union",Type, Field|_]), !,
|
||||
append([" union ",Type," ",Field,";"], Out).
|
||||
gen_struct(Inp,Out) :-
|
||||
split(Inp," ",["const",Type, Field|_]), !,
|
||||
append([" const ",Type," ",Field,";"], Out).
|
||||
gen_struct(Inp,"") :-
|
||||
split(Inp," ",["void","void"|_]), !.
|
||||
gen_struct(Inp,Out) :-
|
||||
@ -105,6 +108,10 @@ gen_dstruct(Inp,Out) :-
|
||||
split(Inp," ",["union"|Inp2]), !,
|
||||
glue(Inp2, " ", Inp3),
|
||||
gen_dstruct(Inp3, Out).
|
||||
gen_dstruct(Inp,Out) :-
|
||||
split(Inp," ",["const"|Inp2]), !,
|
||||
glue(Inp2, " ", Inp3),
|
||||
gen_dstruct(Inp3, Out).
|
||||
gen_dstruct(Inp,Out) :-
|
||||
split(Inp," ",[_, Field, Name|_]), !,
|
||||
cut_c_stuff(Field, RField),
|
||||
@ -177,6 +184,10 @@ gen_hstruct(Inp,Out) :-
|
||||
split(Inp," ",["union"|Inp2]), !,
|
||||
glue(Inp2, " ", Inp3),
|
||||
gen_hstruct(Inp3,Out).
|
||||
gen_hstruct(Inp,Out) :-
|
||||
split(Inp," ",["const"|Inp2]), !,
|
||||
glue(Inp2, " ", Inp3),
|
||||
gen_hstruct(Inp3,Out).
|
||||
gen_hstruct(Inp,Out) :-
|
||||
split(Inp," ",[_, Field, MacroName, "MkAT", _]), !,
|
||||
fetch_name(Global,Field,MacroName),
|
||||
@ -254,6 +265,10 @@ gen_init(Inp,Out) :-
|
||||
split(Inp," ",["union"|Inp2]), !,
|
||||
glue(Inp2, " ", Inp3),
|
||||
gen_init(Inp3, Out).
|
||||
gen_init(Inp,Out) :-
|
||||
split(Inp," ",["const"|Inp2]), !,
|
||||
glue(Inp2, " ", Inp3),
|
||||
gen_init(Inp3, Out).
|
||||
gen_init(Inp,"") :-
|
||||
split(Inp," ",[_, _, _, "void"|_]), !.
|
||||
gen_init(Inp,Init) :-
|
||||
|
@ -1136,7 +1136,7 @@ initPrologFlags(void)
|
||||
#endif
|
||||
#if defined(HAVE_DLOPEN) || defined(HAVE_SHL_LOAD) || defined(EMULATE_DLOPEN) || defined(HAVE_LOAD_LIBRARY)
|
||||
setPrologFlag("open_shared_object", FT_BOOL|FF_READONLY, TRUE, 0);
|
||||
setPrologFlag("shared_object_extension", FT_ATOM|FF_READONLY, SO_EXT);
|
||||
setPrologFlag("shared_object_extension", FT_ATOM|FF_READONLY, SO_EXT+1);
|
||||
setPrologFlag("shared_object_search_path", FT_ATOM|FF_READONLY, SO_PATH);
|
||||
#endif
|
||||
setPrologFlag("address_bits", FT_INTEGER|FF_READONLY, sizeof(void*)*8);
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 55f1b0d765c607c99b9b9c67f150df64d33128b0
|
||||
Subproject commit dc25a433df1f77e6271179664080d338e10c9d6b
|
@ -1,6 +1,8 @@
|
||||
|
||||
#TODO: change macro_log_feature to check both WITH_{$name} and ${name}_FOUND
|
||||
#TODO: improve FindGecode.cmake to be similar to other Find*.cmake
|
||||
#CHECK: GECODE
|
||||
|
||||
macro_optional_find_package (Gecode ON)
|
||||
macro_log_feature (GECODE_FOUND "libgecode"
|
||||
"Use Generic Constraint Development Environment (GECODE) library"
|
||||
@ -13,6 +15,44 @@ if (GECODE_FOUND)
|
||||
|
||||
#set (EXTRALIBS gecode)
|
||||
|
||||
#include_directories (${GECODE_INCLUDE_DIR})
|
||||
#set (EXTRALIBS ${EXTRALIBS} ${GECODE_LIBRARIES})
|
||||
string(SUBSTRING ${GECODE_VERSION} 0 1 GECODE_MAJOR )
|
||||
|
||||
set (GECODE_SOURCES gecode${GECODE_MAJOR}_yap.cc
|
||||
gecode${GECODE_MAJOR}-common.icc
|
||||
${GECODE_VERSION}/gecode_yap_cc_impl_auto_generated.icc
|
||||
${GECODE_VERSION}/gecode_yap_cc_init_auto_generated.icc
|
||||
${GECODE_VERSION}/gecode_yap_cc_forward_auto_generated.icc
|
||||
disjunctor.icc
|
||||
disjunctor.hh )
|
||||
|
||||
add_custom_target (gecodeyap ALL DEPENDS gecode${GECODE_MAJOR}_yap_hand_written.yap ${GECODE_VERSION}/gecode_yap_auto_generated.yap gecode
|
||||
) # WORKING_DIRECTORY ${CMAKE_BINARY_DIR} )
|
||||
|
||||
# create a startup.yss on the top directory.
|
||||
add_custom_command (TARGET gecodeyap
|
||||
COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/gecode${GECODE_MAJOR}_yap_hand_written.yap ${CMAKE_CURRENT_SOURCE_DIR}/${GECODE_VERSION}/gecode_yap_auto_generated.yap > gecode.yap
|
||||
VERBATIM
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
add_library (gecode SHARED ${GECODE_SOURCES})
|
||||
|
||||
target_link_libraries(gecode libYap ${GECODE_LIBRARIES})
|
||||
|
||||
set_target_properties (gecode PROPERTIES PREFIX "")
|
||||
|
||||
include_directories (${GECODE_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${GECODE_VERSION})
|
||||
|
||||
install(TARGETS gecode
|
||||
LIBRARY DESTINATION ${dlls}
|
||||
)
|
||||
|
||||
install(FILES gecode.yap
|
||||
DESTINATION ${libpl}
|
||||
)
|
||||
|
||||
install(FILES clpfd.yap
|
||||
DESTINATION ${libpl}/gecode
|
||||
)
|
||||
|
||||
endif (GECODE_FOUND)
|
||||
|
@ -610,7 +610,7 @@ WARN_LOGFILE =
|
||||
# directories like "/usr/src/myproject". Separate the files or directories
|
||||
# with spaces.
|
||||
|
||||
INPUT = /usr/include/gecode
|
||||
INPUT = /usr/local/include/gecode
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2,83 +2,83 @@
|
||||
// It is subject to the same Copyright as the source files from which
|
||||
// it is derived, and is distributed under the same Licensing conditions.
|
||||
BrancherHandle assign(Home,BoolVar,IntAssign,BoolVarValPrint=NULL);
|
||||
BrancherHandle assign(Home,FloatVar,FloatAssign,FloatVarValPrint=NULL);
|
||||
BrancherHandle assign(Home,IntVar,IntAssign,IntVarValPrint=NULL);
|
||||
BrancherHandle assign(Home,SetVar,SetAssign,SetVarValPrint=NULL);
|
||||
BrancherHandle assign(Home,const BoolVarArgs&,IntAssign,BoolBranchFilter=NULL,BoolVarValPrint=NULL);
|
||||
BrancherHandle assign(Home,const FloatVarArgs&,FloatAssign,FloatBranchFilter=NULL,FloatVarValPrint=NULL);
|
||||
BrancherHandle assign(Home,const IntVarArgs&,IntAssign,IntBranchFilter=NULL,IntVarValPrint=NULL);
|
||||
BrancherHandle assign(Home,const SetVarArgs&,SetAssign,SetBranchFilter=NULL,SetVarValPrint=NULL);
|
||||
BrancherHandle assign(Home,FloatVar,FloatAssign,FloatVarValPrint=NULL);
|
||||
BrancherHandle assign(Home,IntVar,IntAssign,IntVarValPrint=NULL);
|
||||
BrancherHandle assign(Home,SetVar,SetAssign,SetVarValPrint=NULL);
|
||||
BrancherHandle branch(Home,BoolVar,IntValBranch,BoolVarValPrint=NULL);
|
||||
BrancherHandle branch(Home,FloatVar,FloatValBranch,FloatVarValPrint=NULL);
|
||||
BrancherHandle branch(Home,IntVar,IntValBranch,IntVarValPrint=NULL);
|
||||
BrancherHandle branch(Home,SetVar,SetValBranch,SetVarValPrint=NULL);
|
||||
BrancherHandle branch(Home,const BoolVarArgs&,IntVarBranch,IntValBranch,BoolBranchFilter=NULL,BoolVarValPrint=NULL);
|
||||
BrancherHandle branch(Home,const BoolVarArgs&,IntVarBranch,IntValBranch,const Symmetries&,BoolBranchFilter=NULL,BoolVarValPrint=NULL);
|
||||
BrancherHandle branch(Home,const BoolVarArgs&,TieBreak<IntVarBranch>,IntValBranch,BoolBranchFilter=NULL,BoolVarValPrint=NULL);
|
||||
BrancherHandle branch(Home,const BoolVarArgs&,TieBreak<IntVarBranch>,IntValBranch,const Symmetries&,BoolBranchFilter=NULL,BoolVarValPrint=NULL);
|
||||
BrancherHandle branch(Home,const FloatVarArgs&,FloatVarBranch,FloatValBranch,FloatBranchFilter=NULL,FloatVarValPrint=NULL);
|
||||
BrancherHandle branch(Home,const FloatVarArgs&,TieBreak<FloatVarBranch>,FloatValBranch,FloatBranchFilter=NULL,FloatVarValPrint=NULL);
|
||||
BrancherHandle branch(Home,const IntVarArgs&,IntVarBranch,IntValBranch,const Symmetries&,IntBranchFilter=NULL,IntVarValPrint=NULL);
|
||||
BrancherHandle branch(Home,const IntVarArgs&,IntVarBranch,IntValBranch,IntBranchFilter=NULL,IntVarValPrint=NULL);
|
||||
BrancherHandle branch(Home,const IntVarArgs&,TieBreak<IntVarBranch>,IntValBranch,const Symmetries&,IntBranchFilter=NULL,IntVarValPrint=NULL);
|
||||
BrancherHandle branch(Home,const IntVarArgs&,IntVarBranch,IntValBranch,const Symmetries&,IntBranchFilter=NULL,IntVarValPrint=NULL);
|
||||
BrancherHandle branch(Home,const IntVarArgs&,TieBreak<IntVarBranch>,IntValBranch,IntBranchFilter=NULL,IntVarValPrint=NULL);
|
||||
BrancherHandle branch(Home,const SetVarArgs&,SetVarBranch,SetValBranch,const Symmetries&,SetBranchFilter=NULL,SetVarValPrint=NULL);
|
||||
BrancherHandle branch(Home,const IntVarArgs&,TieBreak<IntVarBranch>,IntValBranch,const Symmetries&,IntBranchFilter=NULL,IntVarValPrint=NULL);
|
||||
BrancherHandle branch(Home,const SetVarArgs&,SetVarBranch,SetValBranch,SetBranchFilter=NULL,SetVarValPrint=NULL);
|
||||
BrancherHandle branch(Home,const SetVarArgs&,TieBreak<SetVarBranch>,SetValBranch,const Symmetries&,SetBranchFilter=NULL,SetVarValPrint=NULL);
|
||||
BrancherHandle branch(Home,const SetVarArgs&,SetVarBranch,SetValBranch,const Symmetries&,SetBranchFilter=NULL,SetVarValPrint=NULL);
|
||||
BrancherHandle branch(Home,const SetVarArgs&,TieBreak<SetVarBranch>,SetValBranch,SetBranchFilter=NULL,SetVarValPrint=NULL);
|
||||
BrancherHandle branch(Home,FloatVar,FloatValBranch,FloatVarValPrint=NULL);
|
||||
BrancherHandle branch(Home,IntVar,IntValBranch,IntVarValPrint=NULL);
|
||||
BrancherHandle branch(Home,SetVar,SetValBranch,SetVarValPrint=NULL);
|
||||
BrancherHandle branch(Home,const SetVarArgs&,TieBreak<SetVarBranch>,SetValBranch,const Symmetries&,SetBranchFilter=NULL,SetVarValPrint=NULL);
|
||||
void abs(Home,FloatVar,FloatVar);
|
||||
void abs(Home,IntVar,IntVar,IntConLevel=ICL_DEF);
|
||||
void atmostOne(Home,const SetVarArgs&,unsigned int);
|
||||
void binpacking(Home,const IntVarArgs&,const IntVarArgs&,const IntArgs&,IntConLevel=ICL_DEF);
|
||||
void cardinality(Home,const SetVarArgs&,unsigned int,unsigned int);
|
||||
void cardinality(Home,SetVar,IntVar);
|
||||
void cardinality(Home,SetVar,unsigned int,unsigned int);
|
||||
void cardinality(Home,const SetVarArgs&,unsigned int,unsigned int);
|
||||
void channel(Home,BoolVar,IntVar,IntConLevel=ICL_DEF);
|
||||
void channel(Home,FloatVar,IntVar);
|
||||
void channel(Home,IntVar,FloatVar);
|
||||
void channel(Home,const BoolVarArgs&,IntVar,int=0,IntConLevel=ICL_DEF);
|
||||
void channel(Home,const BoolVarArgs&,SetVar);
|
||||
void channel(Home,const IntVarArgs&,const IntVarArgs&,IntConLevel=ICL_DEF);
|
||||
void channel(Home,const IntVarArgs&,const SetVarArgs&);
|
||||
void channel(Home,const IntVarArgs&,int,const IntVarArgs&,int,IntConLevel=ICL_DEF);
|
||||
void channel(Home,const SetVarArgs&,const SetVarArgs&);
|
||||
void channel(Home,FloatVar,IntVar);
|
||||
void channel(Home,IntVar,FloatVar);
|
||||
void channelSorted(Home,const IntVarArgs&,SetVar);
|
||||
void circuit(Home,const IntArgs&,const IntVarArgs&,const IntVarArgs&,IntVar,IntConLevel=ICL_DEF);
|
||||
void circuit(Home,const IntArgs&,const IntVarArgs&,IntVar,IntConLevel=ICL_DEF);
|
||||
void circuit(Home,const IntArgs&,int,const IntVarArgs&,const IntVarArgs&,IntVar,IntConLevel=ICL_DEF);
|
||||
void circuit(Home,const IntArgs&,const IntVarArgs&,const IntVarArgs&,IntVar,IntConLevel=ICL_DEF);
|
||||
void circuit(Home,const IntArgs&,int,const IntVarArgs&,IntVar,IntConLevel=ICL_DEF);
|
||||
void circuit(Home,const IntArgs&,int,const IntVarArgs&,const IntVarArgs&,IntVar,IntConLevel=ICL_DEF);
|
||||
void circuit(Home,const IntVarArgs&,IntConLevel=ICL_DEF);
|
||||
void circuit(Home,int,const IntVarArgs&,IntConLevel=ICL_DEF);
|
||||
void clause(Home,BoolOpType,const BoolVarArgs&,const BoolVarArgs&,BoolVar,IntConLevel=ICL_DEF);
|
||||
void clause(Home,BoolOpType,const BoolVarArgs&,const BoolVarArgs&,int,IntConLevel=ICL_DEF);
|
||||
void convex(Home,SetVar);
|
||||
void convex(Home,SetVar,SetVar);
|
||||
void count(Home,const IntVarArgs&,const IntArgs&,IntRelType,int,IntConLevel=ICL_DEF);
|
||||
void count(Home,const IntVarArgs&,const IntArgs&,IntRelType,IntVar,IntConLevel=ICL_DEF);
|
||||
void count(Home,const IntVarArgs&,const IntSetArgs&,const IntArgs&,IntConLevel=ICL_DEF);
|
||||
void count(Home,const IntVarArgs&,const IntSetArgs&,IntConLevel=ICL_DEF);
|
||||
void count(Home,const IntVarArgs&,const IntSet&,const IntArgs&,IntConLevel=ICL_DEF);
|
||||
void count(Home,const IntVarArgs&,const IntSet&,IntRelType,int,IntConLevel=ICL_DEF);
|
||||
void count(Home,const IntVarArgs&,const IntSet&,IntRelType,IntVar,IntConLevel=ICL_DEF);
|
||||
void count(Home,const IntVarArgs&,const IntVarArgs&,const IntArgs&,IntConLevel=ICL_DEF);
|
||||
void count(Home,const IntVarArgs&,const IntVarArgs&,IntConLevel=ICL_DEF);
|
||||
void count(Home,const IntVarArgs&,int,IntRelType,int,IntConLevel=ICL_DEF);
|
||||
void count(Home,const IntVarArgs&,int,IntRelType,IntVar,IntConLevel=ICL_DEF);
|
||||
void count(Home,const IntVarArgs&,IntVar,IntRelType,int,IntConLevel=ICL_DEF);
|
||||
void count(Home,const IntVarArgs&,IntVar,IntRelType,IntVar,IntConLevel=ICL_DEF);
|
||||
void cumulative(Home,int,const IntVarArgs&,const IntArgs&,const IntArgs&,const BoolVarArgs&,IntConLevel=ICL_DEF);
|
||||
void cumulative(Home,int,const IntVarArgs&,const IntArgs&,const IntArgs&,IntConLevel=ICL_DEF);
|
||||
void cumulative(Home,int,const IntVarArgs&,const IntVarArgs&,const IntVarArgs&,const IntArgs&,const BoolVarArgs&,IntConLevel=ICL_DEF);
|
||||
void cumulative(Home,int,const IntVarArgs&,const IntVarArgs&,const IntVarArgs&,const IntArgs&,IntConLevel=ICL_DEF);
|
||||
void cumulative(Home,int,const TaskTypeArgs&,const IntVarArgs&,const IntArgs&,const IntArgs&,const BoolVarArgs&,IntConLevel=ICL_DEF);
|
||||
void cumulative(Home,int,const TaskTypeArgs&,const IntVarArgs&,const IntArgs&,const IntArgs&,IntConLevel=ICL_DEF);
|
||||
void cumulative(Home,IntVar,const IntVarArgs&,const IntArgs&,const IntArgs&,const BoolVarArgs&,IntConLevel=ICL_DEF);
|
||||
void count(Home,const IntVarArgs&,IntVar,IntRelType,int,IntConLevel=ICL_DEF);
|
||||
void count(Home,const IntVarArgs&,const IntArgs&,IntRelType,IntVar,IntConLevel=ICL_DEF);
|
||||
void count(Home,const IntVarArgs&,const IntArgs&,IntRelType,int,IntConLevel=ICL_DEF);
|
||||
void count(Home,const IntVarArgs&,const IntSet&,IntRelType,IntVar,IntConLevel=ICL_DEF);
|
||||
void count(Home,const IntVarArgs&,const IntSet&,IntRelType,int,IntConLevel=ICL_DEF);
|
||||
void count(Home,const IntVarArgs&,const IntSet&,const IntArgs&,IntConLevel=ICL_DEF);
|
||||
void count(Home,const IntVarArgs&,const IntSetArgs&,IntConLevel=ICL_DEF);
|
||||
void count(Home,const IntVarArgs&,const IntSetArgs&,const IntArgs&,IntConLevel=ICL_DEF);
|
||||
void count(Home,const IntVarArgs&,const IntVarArgs&,IntConLevel=ICL_DEF);
|
||||
void count(Home,const IntVarArgs&,const IntVarArgs&,const IntArgs&,IntConLevel=ICL_DEF);
|
||||
void count(Home,const IntVarArgs&,int,IntRelType,IntVar,IntConLevel=ICL_DEF);
|
||||
void count(Home,const IntVarArgs&,int,IntRelType,int,IntConLevel=ICL_DEF);
|
||||
void cumulative(Home,IntVar,const IntVarArgs&,const IntArgs&,const IntArgs&,IntConLevel=ICL_DEF);
|
||||
void cumulative(Home,IntVar,const IntVarArgs&,const IntVarArgs&,const IntVarArgs&,const IntArgs&,const BoolVarArgs&,IntConLevel=ICL_DEF);
|
||||
void cumulative(Home,IntVar,const IntVarArgs&,const IntArgs&,const IntArgs&,const BoolVarArgs&,IntConLevel=ICL_DEF);
|
||||
void cumulative(Home,IntVar,const IntVarArgs&,const IntVarArgs&,const IntVarArgs&,const IntArgs&,IntConLevel=ICL_DEF);
|
||||
void cumulative(Home,IntVar,const TaskTypeArgs&,const IntVarArgs&,const IntArgs&,const IntArgs&,const BoolVarArgs&,IntConLevel=ICL_DEF);
|
||||
void cumulative(Home,IntVar,const IntVarArgs&,const IntVarArgs&,const IntVarArgs&,const IntArgs&,const BoolVarArgs&,IntConLevel=ICL_DEF);
|
||||
void cumulative(Home,IntVar,const TaskTypeArgs&,const IntVarArgs&,const IntArgs&,const IntArgs&,IntConLevel=ICL_DEF);
|
||||
void cumulative(Home,IntVar,const TaskTypeArgs&,const IntVarArgs&,const IntArgs&,const IntArgs&,const BoolVarArgs&,IntConLevel=ICL_DEF);
|
||||
void cumulative(Home,int,const IntVarArgs&,const IntArgs&,const IntArgs&,IntConLevel=ICL_DEF);
|
||||
void cumulative(Home,int,const IntVarArgs&,const IntArgs&,const IntArgs&,const BoolVarArgs&,IntConLevel=ICL_DEF);
|
||||
void cumulative(Home,int,const IntVarArgs&,const IntVarArgs&,const IntVarArgs&,const IntArgs&,IntConLevel=ICL_DEF);
|
||||
void cumulative(Home,int,const IntVarArgs&,const IntVarArgs&,const IntVarArgs&,const IntArgs&,const BoolVarArgs&,IntConLevel=ICL_DEF);
|
||||
void cumulative(Home,int,const TaskTypeArgs&,const IntVarArgs&,const IntArgs&,const IntArgs&,IntConLevel=ICL_DEF);
|
||||
void cumulative(Home,int,const TaskTypeArgs&,const IntVarArgs&,const IntArgs&,const IntArgs&,const BoolVarArgs&,IntConLevel=ICL_DEF);
|
||||
void cumulatives(Home,const IntArgs&,const IntVarArgs&,const IntArgs&,const IntVarArgs&,const IntArgs&,const IntArgs&,bool,IntConLevel=ICL_DEF);
|
||||
void cumulatives(Home,const IntArgs&,const IntVarArgs&,const IntArgs&,const IntVarArgs&,const IntVarArgs&,const IntArgs&,bool,IntConLevel=ICL_DEF);
|
||||
void cumulatives(Home,const IntArgs&,const IntVarArgs&,const IntVarArgs&,const IntVarArgs&,const IntArgs&,const IntArgs&,bool,IntConLevel=ICL_DEF);
|
||||
@ -93,65 +93,65 @@ void div(Home,FloatVar,FloatVar,FloatVar);
|
||||
void div(Home,IntVar,IntVar,IntVar,IntConLevel=ICL_DEF);
|
||||
void divmod(Home,IntVar,IntVar,IntVar,IntVar,IntConLevel=ICL_DEF);
|
||||
void dom(Home,BoolVar,BoolVar,IntConLevel=ICL_DEF);
|
||||
void dom(Home,const BoolVarArgs&,const BoolVarArgs&,IntConLevel=ICL_DEF);
|
||||
void dom(Home,const FloatVarArgs&,const FloatVarArgs&);
|
||||
void dom(Home,const FloatVarArgs&,FloatNum,FloatNum);
|
||||
void dom(Home,const FloatVarArgs&,FloatVal);
|
||||
void dom(Home,const IntVarArgs&,const IntSet&,IntConLevel=ICL_DEF);
|
||||
void dom(Home,const IntVarArgs&,const IntVarArgs&,IntConLevel=ICL_DEF);
|
||||
void dom(Home,const IntVarArgs&,int,IntConLevel=ICL_DEF);
|
||||
void dom(Home,const IntVarArgs&,int,int,IntConLevel=ICL_DEF);
|
||||
void dom(Home,const SetVarArgs&,const SetVarArgs&);
|
||||
void dom(Home,const SetVarArgs&,SetRelType,const IntSet&);
|
||||
void dom(Home,const SetVarArgs&,SetRelType,int);
|
||||
void dom(Home,const SetVarArgs&,SetRelType,int,int);
|
||||
void dom(Home,FloatVar,FloatNum,FloatNum);
|
||||
void dom(Home,FloatVar,FloatNum,FloatNum,Reify);
|
||||
void dom(Home,FloatVar,FloatVal);
|
||||
void dom(Home,FloatVar,FloatVal,Reify);
|
||||
void dom(Home,FloatVar,FloatVar);
|
||||
void dom(Home,IntVar,IntVar,IntConLevel=ICL_DEF);
|
||||
void dom(Home,IntVar,const IntSet&,IntConLevel=ICL_DEF);
|
||||
void dom(Home,IntVar,const IntSet&,Reify,IntConLevel=ICL_DEF);
|
||||
void dom(Home,IntVar,int,IntConLevel=ICL_DEF);
|
||||
void dom(Home,IntVar,int,Reify,IntConLevel=ICL_DEF);
|
||||
void dom(Home,IntVar,int,int,IntConLevel=ICL_DEF);
|
||||
void dom(Home,IntVar,int,int,Reify,IntConLevel=ICL_DEF);
|
||||
void dom(Home,IntVar,int,Reify,IntConLevel=ICL_DEF);
|
||||
void dom(Home,IntVar,IntVar,IntConLevel=ICL_DEF);
|
||||
void dom(Home,SetVar,SetRelType,const IntSet&);
|
||||
void dom(Home,SetVar,SetRelType,const IntSet&,Reify);
|
||||
void dom(Home,SetVar,SetRelType,int);
|
||||
void dom(Home,SetVar,SetRelType,int,Reify);
|
||||
void dom(Home,SetVar,SetRelType,int,int);
|
||||
void dom(Home,SetVar,SetRelType,int,int,Reify);
|
||||
void dom(Home,SetVar,SetRelType,int,Reify);
|
||||
void dom(Home,SetVar,SetVar);
|
||||
void element(Home,const BoolVarArgs&,IntVar,BoolVar,IntConLevel=ICL_DEF);
|
||||
void element(Home,const BoolVarArgs&,IntVar,int,IntConLevel=ICL_DEF);
|
||||
void element(Home,const BoolVarArgs&,IntVar,int,IntVar,int,BoolVar,IntConLevel=ICL_DEF);
|
||||
void element(Home,const IntSetArgs&,IntVar,int,IntVar,int,SetVar);
|
||||
void element(Home,const IntSetArgs&,IntVar,SetVar);
|
||||
void element(Home,const IntVarArgs&,IntVar,int,IntConLevel=ICL_DEF);
|
||||
void element(Home,const IntVarArgs&,IntVar,int,IntVar,int,IntVar,IntConLevel=ICL_DEF);
|
||||
void element(Home,const IntVarArgs&,IntVar,IntVar,IntConLevel=ICL_DEF);
|
||||
void element(Home,const SetVarArgs&,IntVar,int,IntVar,int,SetVar);
|
||||
void element(Home,const SetVarArgs&,IntVar,SetVar);
|
||||
void dom(Home,const BoolVarArgs&,const BoolVarArgs&,IntConLevel=ICL_DEF);
|
||||
void dom(Home,const FloatVarArgs&,FloatNum,FloatNum);
|
||||
void dom(Home,const FloatVarArgs&,FloatVal);
|
||||
void dom(Home,const FloatVarArgs&,const FloatVarArgs&);
|
||||
void dom(Home,const IntVarArgs&,const IntSet&,IntConLevel=ICL_DEF);
|
||||
void dom(Home,const IntVarArgs&,const IntVarArgs&,IntConLevel=ICL_DEF);
|
||||
void dom(Home,const IntVarArgs&,int,IntConLevel=ICL_DEF);
|
||||
void dom(Home,const IntVarArgs&,int,int,IntConLevel=ICL_DEF);
|
||||
void dom(Home,const SetVarArgs&,SetRelType,const IntSet&);
|
||||
void dom(Home,const SetVarArgs&,SetRelType,int);
|
||||
void dom(Home,const SetVarArgs&,SetRelType,int,int);
|
||||
void dom(Home,const SetVarArgs&,const SetVarArgs&);
|
||||
void element(Home,IntSharedArray,IntVar,BoolVar,IntConLevel=ICL_DEF);
|
||||
void element(Home,IntSharedArray,IntVar,IntVar,IntConLevel=ICL_DEF);
|
||||
void element(Home,IntSharedArray,IntVar,int,IntConLevel=ICL_DEF);
|
||||
void element(Home,IntSharedArray,IntVar,int,IntVar,int,BoolVar,IntConLevel=ICL_DEF);
|
||||
void element(Home,IntSharedArray,IntVar,int,IntVar,int,IntVar,IntConLevel=ICL_DEF);
|
||||
void element(Home,IntSharedArray,IntVar,IntVar,IntConLevel=ICL_DEF);
|
||||
void element(Home,SetOpType,const IntArgs&,SetVar,SetVar,const IntSet&=IntSet(Set::Limits::min,Set::Limits::max));
|
||||
void element(Home,SetOpType,const IntSetArgs&,SetVar,SetVar,const IntSet&=IntSet(Set::Limits::min,Set::Limits::max));
|
||||
void element(Home,SetOpType,const IntVarArgs&,SetVar,SetVar,const IntSet&=IntSet(Set::Limits::min,Set::Limits::max));
|
||||
void element(Home,SetOpType,const SetVarArgs&,SetVar,SetVar,const IntSet&=IntSet(Set::Limits::min,Set::Limits::max));
|
||||
void extensional(Home,const BoolVarArgs&,const TupleSet&,ExtensionalPropKind=EPK_DEF,IntConLevel=ICL_DEF);
|
||||
void element(Home,const BoolVarArgs&,IntVar,BoolVar,IntConLevel=ICL_DEF);
|
||||
void element(Home,const BoolVarArgs&,IntVar,int,IntConLevel=ICL_DEF);
|
||||
void element(Home,const BoolVarArgs&,IntVar,int,IntVar,int,BoolVar,IntConLevel=ICL_DEF);
|
||||
void element(Home,const IntSetArgs&,IntVar,SetVar);
|
||||
void element(Home,const IntSetArgs&,IntVar,int,IntVar,int,SetVar);
|
||||
void element(Home,const IntVarArgs&,IntVar,IntVar,IntConLevel=ICL_DEF);
|
||||
void element(Home,const IntVarArgs&,IntVar,int,IntConLevel=ICL_DEF);
|
||||
void element(Home,const IntVarArgs&,IntVar,int,IntVar,int,IntVar,IntConLevel=ICL_DEF);
|
||||
void element(Home,const SetVarArgs&,IntVar,SetVar);
|
||||
void element(Home,const SetVarArgs&,IntVar,int,IntVar,int,SetVar);
|
||||
void extensional(Home,const BoolVarArgs&,DFA,IntConLevel=ICL_DEF);
|
||||
void extensional(Home,const IntVarArgs&,const TupleSet&,ExtensionalPropKind=EPK_DEF,IntConLevel=ICL_DEF);
|
||||
void extensional(Home,const BoolVarArgs&,const TupleSet&,ExtensionalPropKind=EPK_DEF,IntConLevel=ICL_DEF);
|
||||
void extensional(Home,const IntVarArgs&,DFA,IntConLevel=ICL_DEF);
|
||||
void extensional(Home,const IntVarArgs&,const TupleSet&,ExtensionalPropKind=EPK_DEF,IntConLevel=ICL_DEF);
|
||||
void ite(Home,BoolVar,IntVar,IntVar,IntVar,IntConLevel=ICL_DEF);
|
||||
void linear(Home,const BoolVarArgs&,IntRelType,int,IntConLevel=ICL_DEF);
|
||||
void linear(Home,const BoolVarArgs&,IntRelType,int,Reify,IntConLevel=ICL_DEF);
|
||||
void linear(Home,const BoolVarArgs&,IntRelType,IntVar,IntConLevel=ICL_DEF);
|
||||
void linear(Home,const BoolVarArgs&,IntRelType,IntVar,Reify,IntConLevel=ICL_DEF);
|
||||
void linear(Home,const BoolVarArgs&,IntRelType,int,IntConLevel=ICL_DEF);
|
||||
void linear(Home,const BoolVarArgs&,IntRelType,int,Reify,IntConLevel=ICL_DEF);
|
||||
void linear(Home,const FloatValArgs&,const FloatVarArgs&,FloatRelType,FloatNum);
|
||||
void linear(Home,const FloatValArgs&,const FloatVarArgs&,FloatRelType,FloatNum,Reify);
|
||||
void linear(Home,const FloatValArgs&,const FloatVarArgs&,FloatRelType,FloatVar);
|
||||
@ -160,53 +160,53 @@ void linear(Home,const FloatVarArgs&,FloatRelType,FloatNum);
|
||||
void linear(Home,const FloatVarArgs&,FloatRelType,FloatNum,Reify);
|
||||
void linear(Home,const FloatVarArgs&,FloatRelType,FloatVar);
|
||||
void linear(Home,const FloatVarArgs&,FloatRelType,FloatVar,Reify);
|
||||
void linear(Home,const IntArgs&,const BoolVarArgs&,IntRelType,int,IntConLevel=ICL_DEF);
|
||||
void linear(Home,const IntArgs&,const BoolVarArgs&,IntRelType,int,Reify,IntConLevel=ICL_DEF);
|
||||
void linear(Home,const IntArgs&,const BoolVarArgs&,IntRelType,IntVar,IntConLevel=ICL_DEF);
|
||||
void linear(Home,const IntArgs&,const BoolVarArgs&,IntRelType,IntVar,Reify,IntConLevel=ICL_DEF);
|
||||
void linear(Home,const IntArgs&,const IntVarArgs&,IntRelType,int,IntConLevel=ICL_DEF);
|
||||
void linear(Home,const IntArgs&,const IntVarArgs&,IntRelType,int,Reify,IntConLevel=ICL_DEF);
|
||||
void linear(Home,const IntArgs&,const BoolVarArgs&,IntRelType,int,IntConLevel=ICL_DEF);
|
||||
void linear(Home,const IntArgs&,const BoolVarArgs&,IntRelType,int,Reify,IntConLevel=ICL_DEF);
|
||||
void linear(Home,const IntArgs&,const IntVarArgs&,IntRelType,IntVar,IntConLevel=ICL_DEF);
|
||||
void linear(Home,const IntArgs&,const IntVarArgs&,IntRelType,IntVar,Reify,IntConLevel=ICL_DEF);
|
||||
void linear(Home,const IntVarArgs&,IntRelType,int,IntConLevel=ICL_DEF);
|
||||
void linear(Home,const IntVarArgs&,IntRelType,int,Reify,IntConLevel=ICL_DEF);
|
||||
void linear(Home,const IntArgs&,const IntVarArgs&,IntRelType,int,IntConLevel=ICL_DEF);
|
||||
void linear(Home,const IntArgs&,const IntVarArgs&,IntRelType,int,Reify,IntConLevel=ICL_DEF);
|
||||
void linear(Home,const IntVarArgs&,IntRelType,IntVar,IntConLevel=ICL_DEF);
|
||||
void linear(Home,const IntVarArgs&,IntRelType,IntVar,Reify,IntConLevel=ICL_DEF);
|
||||
void max(Home,const FloatVarArgs&,FloatVar);
|
||||
void max(Home,const IntVarArgs&,IntVar,IntConLevel=ICL_DEF);
|
||||
void linear(Home,const IntVarArgs&,IntRelType,int,IntConLevel=ICL_DEF);
|
||||
void linear(Home,const IntVarArgs&,IntRelType,int,Reify,IntConLevel=ICL_DEF);
|
||||
void max(Home,FloatVar,FloatVar,FloatVar);
|
||||
void max(Home,IntVar,IntVar,IntVar,IntConLevel=ICL_DEF);
|
||||
void max(Home,SetVar,IntVar);
|
||||
void max(Home,SetVar,IntVar,Reify);
|
||||
void max(Home,const FloatVarArgs&,FloatVar);
|
||||
void max(Home,const IntVarArgs&,IntVar,IntConLevel=ICL_DEF);
|
||||
void member(Home,const BoolVarArgs&,BoolVar,IntConLevel=ICL_DEF);
|
||||
void member(Home,const BoolVarArgs&,BoolVar,Reify,IntConLevel=ICL_DEF);
|
||||
void member(Home,const IntVarArgs&,IntVar,IntConLevel=ICL_DEF);
|
||||
void member(Home,const IntVarArgs&,IntVar,Reify,IntConLevel=ICL_DEF);
|
||||
void min(Home,const FloatVarArgs&,FloatVar);
|
||||
void min(Home,const IntVarArgs&,IntVar,IntConLevel=ICL_DEF);
|
||||
void min(Home,FloatVar,FloatVar,FloatVar);
|
||||
void min(Home,IntVar,IntVar,IntVar,IntConLevel=ICL_DEF);
|
||||
void min(Home,SetVar,IntVar);
|
||||
void min(Home,SetVar,IntVar,Reify);
|
||||
void min(Home,const FloatVarArgs&,FloatVar);
|
||||
void min(Home,const IntVarArgs&,IntVar,IntConLevel=ICL_DEF);
|
||||
void mod(Home,IntVar,IntVar,IntVar,IntConLevel=ICL_DEF);
|
||||
void mult(Home,FloatVar,FloatVar,FloatVar);
|
||||
void mult(Home,IntVar,IntVar,IntVar,IntConLevel=ICL_DEF);
|
||||
void nooverlap(Home,const IntVarArgs&,const IntArgs&,const IntVarArgs&,const IntArgs&,const BoolVarArgs&,IntConLevel=ICL_DEF);
|
||||
void nooverlap(Home,const IntVarArgs&,const IntArgs&,const IntVarArgs&,const IntArgs&,IntConLevel=ICL_DEF);
|
||||
void nooverlap(Home,const IntVarArgs&,const IntVarArgs&,const IntVarArgs&,const IntVarArgs&,const IntVarArgs&,const IntVarArgs&,const BoolVarArgs&,IntConLevel=ICL_DEF);
|
||||
void nooverlap(Home,const IntVarArgs&,const IntArgs&,const IntVarArgs&,const IntArgs&,const BoolVarArgs&,IntConLevel=ICL_DEF);
|
||||
void nooverlap(Home,const IntVarArgs&,const IntVarArgs&,const IntVarArgs&,const IntVarArgs&,const IntVarArgs&,const IntVarArgs&,IntConLevel=ICL_DEF);
|
||||
void nooverlap(Home,const IntVarArgs&,const IntVarArgs&,const IntVarArgs&,const IntVarArgs&,const IntVarArgs&,const IntVarArgs&,const BoolVarArgs&,IntConLevel=ICL_DEF);
|
||||
void notMax(Home,SetVar,IntVar);
|
||||
void notMin(Home,SetVar,IntVar);
|
||||
void nroot(Home,FloatVar,int,FloatVar);
|
||||
void nroot(Home,IntVar,int,IntVar,IntConLevel=ICL_DEF);
|
||||
void nvalues(Home,const BoolVarArgs&,IntRelType,int,IntConLevel=ICL_DEF);
|
||||
void nvalues(Home,const BoolVarArgs&,IntRelType,IntVar,IntConLevel=ICL_DEF);
|
||||
void nvalues(Home,const IntVarArgs&,IntRelType,int,IntConLevel=ICL_DEF);
|
||||
void nvalues(Home,const BoolVarArgs&,IntRelType,int,IntConLevel=ICL_DEF);
|
||||
void nvalues(Home,const IntVarArgs&,IntRelType,IntVar,IntConLevel=ICL_DEF);
|
||||
void path(Home,const IntArgs&,const IntVarArgs&,IntVar,IntVar,const IntVarArgs&,IntVar,IntConLevel=ICL_DEF);
|
||||
void nvalues(Home,const IntVarArgs&,IntRelType,int,IntConLevel=ICL_DEF);
|
||||
void path(Home,const IntArgs&,const IntVarArgs&,IntVar,IntVar,IntVar,IntConLevel=ICL_DEF);
|
||||
void path(Home,const IntArgs&,int,const IntVarArgs&,IntVar,IntVar,const IntVarArgs&,IntVar,IntConLevel=ICL_DEF);
|
||||
void path(Home,const IntArgs&,const IntVarArgs&,IntVar,IntVar,const IntVarArgs&,IntVar,IntConLevel=ICL_DEF);
|
||||
void path(Home,const IntArgs&,int,const IntVarArgs&,IntVar,IntVar,IntVar,IntConLevel=ICL_DEF);
|
||||
void path(Home,const IntArgs&,int,const IntVarArgs&,IntVar,IntVar,const IntVarArgs&,IntVar,IntConLevel=ICL_DEF);
|
||||
void path(Home,const IntVarArgs&,IntVar,IntVar,IntConLevel=ICL_DEF);
|
||||
void path(Home,int,const IntVarArgs&,IntVar,IntVar,IntConLevel=ICL_DEF);
|
||||
void pow(Home,FloatVar,int,FloatVar);
|
||||
@ -223,58 +223,58 @@ void rel(Home,BoolVar,IntRelType,BoolVar,IntConLevel=ICL_DEF);
|
||||
void rel(Home,BoolVar,IntRelType,BoolVar,Reify,IntConLevel=ICL_DEF);
|
||||
void rel(Home,BoolVar,IntRelType,int,IntConLevel=ICL_DEF);
|
||||
void rel(Home,BoolVar,IntRelType,int,Reify,IntConLevel=ICL_DEF);
|
||||
void rel(Home,const BoolVarArgs&,IntRelType,BoolVar,IntConLevel=ICL_DEF);
|
||||
void rel(Home,const BoolVarArgs&,IntRelType,const BoolVarArgs&,IntConLevel=ICL_DEF);
|
||||
void rel(Home,const BoolVarArgs&,IntRelType,IntConLevel=ICL_DEF);
|
||||
void rel(Home,const BoolVarArgs&,IntRelType,int,IntConLevel=ICL_DEF);
|
||||
void rel(Home,const FloatVarArgs&,FloatRelType,FloatVal);
|
||||
void rel(Home,const FloatVarArgs&,FloatRelType,FloatVar);
|
||||
void rel(Home,const IntSet&,SetOpType,SetVar,SetRelType,const IntSet&);
|
||||
void rel(Home,const IntSet&,SetOpType,SetVar,SetRelType,SetVar);
|
||||
void rel(Home,const IntVarArgs&,IntRelType,const IntVarArgs&,IntConLevel=ICL_DEF);
|
||||
void rel(Home,const IntVarArgs&,IntRelType,IntConLevel=ICL_DEF);
|
||||
void rel(Home,const IntVarArgs&,IntRelType,int,IntConLevel=ICL_DEF);
|
||||
void rel(Home,const IntVarArgs&,IntRelType,IntVar,IntConLevel=ICL_DEF);
|
||||
void rel(Home,FloatVar,FloatRelType,FloatVal);
|
||||
void rel(Home,FloatVar,FloatRelType,FloatVal,Reify);
|
||||
void rel(Home,FloatVar,FloatRelType,FloatVar);
|
||||
void rel(Home,FloatVar,FloatRelType,FloatVar,Reify);
|
||||
void rel(Home,IntVar,IntRelType,int,IntConLevel=ICL_DEF);
|
||||
void rel(Home,IntVar,IntRelType,int,Reify,IntConLevel=ICL_DEF);
|
||||
void rel(Home,IntVar,IntRelType,IntVar,IntConLevel=ICL_DEF);
|
||||
void rel(Home,IntVar,IntRelType,IntVar,Reify,IntConLevel=ICL_DEF);
|
||||
void rel(Home,IntVar,IntRelType,SetVar);
|
||||
void rel(Home,IntVar,IntRelType,int,IntConLevel=ICL_DEF);
|
||||
void rel(Home,IntVar,IntRelType,int,Reify,IntConLevel=ICL_DEF);
|
||||
void rel(Home,IntVar,SetRelType,SetVar);
|
||||
void rel(Home,IntVar,SetRelType,SetVar,Reify);
|
||||
void rel(Home,SetOpType,const IntVarArgs&,const IntSet&,SetVar);
|
||||
void rel(Home,SetOpType,const IntVarArgs&,SetVar);
|
||||
void rel(Home,SetOpType,const SetVarArgs&,const IntSet&,SetVar);
|
||||
void rel(Home,SetOpType,const IntVarArgs&,const IntSet&,SetVar);
|
||||
void rel(Home,SetOpType,const SetVarArgs&,SetVar);
|
||||
void rel(Home,SetOpType,const SetVarArgs&,const IntSet&,SetVar);
|
||||
void rel(Home,SetVar,IntRelType,IntVar);
|
||||
void rel(Home,SetVar,SetOpType,const IntSet&,SetRelType,const IntSet&);
|
||||
void rel(Home,SetVar,SetOpType,const IntSet&,SetRelType,SetVar);
|
||||
void rel(Home,SetVar,SetOpType,SetVar,SetRelType,const IntSet&);
|
||||
void rel(Home,SetVar,SetOpType,SetVar,SetRelType,SetVar);
|
||||
void rel(Home,SetVar,SetOpType,SetVar,SetRelType,const IntSet&);
|
||||
void rel(Home,SetVar,SetOpType,const IntSet&,SetRelType,SetVar);
|
||||
void rel(Home,SetVar,SetOpType,const IntSet&,SetRelType,const IntSet&);
|
||||
void rel(Home,SetVar,SetRelType,IntVar);
|
||||
void rel(Home,SetVar,SetRelType,IntVar,Reify);
|
||||
void rel(Home,SetVar,SetRelType,SetVar);
|
||||
void rel(Home,SetVar,SetRelType,SetVar,Reify);
|
||||
void rel(Home,const BoolVarArgs&,IntRelType,BoolVar,IntConLevel=ICL_DEF);
|
||||
void rel(Home,const BoolVarArgs&,IntRelType,IntConLevel=ICL_DEF);
|
||||
void rel(Home,const BoolVarArgs&,IntRelType,const BoolVarArgs&,IntConLevel=ICL_DEF);
|
||||
void rel(Home,const BoolVarArgs&,IntRelType,int,IntConLevel=ICL_DEF);
|
||||
void rel(Home,const FloatVarArgs&,FloatRelType,FloatVal);
|
||||
void rel(Home,const FloatVarArgs&,FloatRelType,FloatVar);
|
||||
void rel(Home,const IntSet&,SetOpType,SetVar,SetRelType,SetVar);
|
||||
void rel(Home,const IntSet&,SetOpType,SetVar,SetRelType,const IntSet&);
|
||||
void rel(Home,const IntVarArgs&,IntRelType,IntConLevel=ICL_DEF);
|
||||
void rel(Home,const IntVarArgs&,IntRelType,IntVar,IntConLevel=ICL_DEF);
|
||||
void rel(Home,const IntVarArgs&,IntRelType,const IntVarArgs&,IntConLevel=ICL_DEF);
|
||||
void rel(Home,const IntVarArgs&,IntRelType,int,IntConLevel=ICL_DEF);
|
||||
void sequence(Home,const BoolVarArgs&,const IntSet&,int,int,int,IntConLevel=ICL_DEF);
|
||||
void sequence(Home,const IntVarArgs&,const IntSet&,int,int,int,IntConLevel=ICL_DEF);
|
||||
void sequence(Home,const SetVarArgs&);
|
||||
void sequence(Home,const SetVarArgs&,SetVar);
|
||||
void sorted(Home,const IntVarArgs&,const IntVarArgs&,const IntVarArgs&,IntConLevel=ICL_DEF);
|
||||
void sorted(Home,const IntVarArgs&,const IntVarArgs&,IntConLevel=ICL_DEF);
|
||||
void sorted(Home,const IntVarArgs&,const IntVarArgs&,const IntVarArgs&,IntConLevel=ICL_DEF);
|
||||
void sqr(Home,FloatVar,FloatVar);
|
||||
void sqr(Home,IntVar,IntVar,IntConLevel=ICL_DEF);
|
||||
void sqrt(Home,FloatVar,FloatVar);
|
||||
void sqrt(Home,IntVar,IntVar,IntConLevel=ICL_DEF);
|
||||
void unary(Home,const IntVarArgs&,const IntArgs&,const BoolVarArgs&,IntConLevel=ICL_DEF);
|
||||
void unary(Home,const IntVarArgs&,const IntArgs&,IntConLevel=ICL_DEF);
|
||||
void unary(Home,const IntVarArgs&,const IntVarArgs&,const IntVarArgs&,const BoolVarArgs&,IntConLevel=ICL_DEF);
|
||||
void unary(Home,const IntVarArgs&,const IntArgs&,const BoolVarArgs&,IntConLevel=ICL_DEF);
|
||||
void unary(Home,const IntVarArgs&,const IntVarArgs&,const IntVarArgs&,IntConLevel=ICL_DEF);
|
||||
void unary(Home,const TaskTypeArgs&,const IntVarArgs&,const IntArgs&,const BoolVarArgs&,IntConLevel=ICL_DEF);
|
||||
void unary(Home,const IntVarArgs&,const IntVarArgs&,const IntVarArgs&,const BoolVarArgs&,IntConLevel=ICL_DEF);
|
||||
void unary(Home,const TaskTypeArgs&,const IntVarArgs&,const IntArgs&,IntConLevel=ICL_DEF);
|
||||
void unary(Home,const TaskTypeArgs&,const IntVarArgs&,const IntArgs&,const BoolVarArgs&,IntConLevel=ICL_DEF);
|
||||
void unshare(Home,BoolVarArgs&,IntConLevel=ICL_DEF);
|
||||
void unshare(Home,IntVarArgs&,IntConLevel=ICL_DEF);
|
||||
void weights(Home,IntSharedArray,IntSharedArray,SetVar,IntVar);
|
||||
|
@ -1,36 +1,73 @@
|
||||
|
||||
set( MYDDAS_SOURCES
|
||||
myddas_mysql.c
|
||||
myddas_odbc.c
|
||||
myddas_util.c
|
||||
myddas_initialization.c
|
||||
myddas_shared.c
|
||||
myddas_statistics.c
|
||||
myddas_top_level.c
|
||||
myddas_wkb2prolog.c )
|
||||
|
||||
set( MYDDAS_PROLOG
|
||||
pl/myddas.ypp
|
||||
pl/myddas_assert_predicates.ypp
|
||||
pl/myddas_mysql.ypp
|
||||
pl/myddas_top_level.ypp
|
||||
pl/myddas_errors.ypp
|
||||
pl/myddas_prolog2sql.ypp
|
||||
pl/myddas_util_predicates.ypp
|
||||
pl/myddas_prolog2sql_optimizer.ypp )
|
||||
|
||||
function(cpp_compile filename)
|
||||
get_filename_component(base ${filename} NAME_WE)
|
||||
set(base_abs ${CMAKE_CURRENT_BINARY_DIR}/${base})
|
||||
set(output ${base_abs}.yap)
|
||||
add_custom_command(
|
||||
OUTPUT ${output}
|
||||
COMMAND ${CMAKE_C_COMPILER} -E ${CMAKE_C_FLAGS} -P -E -w -o ${CMAKE_CURRENT_BINARY_DIR} ${filename})
|
||||
set_source_files_properties(${output} PROPERTIES GENERATED TRUE)
|
||||
endfunction()
|
||||
|
||||
foreach(file ${MYDDAS_PROLOG})
|
||||
cpp_compile(GENERATED_SOURCES ${file})
|
||||
endforeach()
|
||||
|
||||
source_group("" FILES ${MYDDAS_PROLOG})
|
||||
source_group(generated FILES ${GENERATED_SOURCES})
|
||||
|
||||
macro_optional_find_package(ODBC ON)
|
||||
if (ODBC_FOUND)
|
||||
macro_log_feature (ODBC_FOUND "ODBC"
|
||||
"Use ODBC Data-Base Interface "
|
||||
"http://www.odbc.org" FALSE)
|
||||
add_definitions (-DMYDDAS_ODBC=1)
|
||||
set (EXTRALIBS ${EXTRALIBS} ${ODBC_LIBRARY})
|
||||
if (APPLE)
|
||||
set (EXTRALIBS ${EXTRALIBS} "-framework CoreFoundation")
|
||||
endif (APPLE)
|
||||
endif (ODBC_FOUND)
|
||||
|
||||
macro_optional_find_package(MySQL ON)
|
||||
if (MYSQL_FOUND)
|
||||
macro_log_feature (MYSQL_FOUND "MySQL"
|
||||
"Use MYSQL Data-Base Interface "
|
||||
"http://www.odbc.org" FALSE)
|
||||
add_definitions (-DMYDDAS_MYSQL=1)
|
||||
endif (MYSQL_FOUND)
|
||||
|
||||
option (WITH_MYDDAS
|
||||
"enable the MYDDAS library" ON)
|
||||
if (WITH_MYDDAS)
|
||||
if (ODBC_FOUND OR MYSQL_FOUND)
|
||||
add_library (myddas SHARED ${MYDDAS_SOURCES})
|
||||
target_link_libraries(myddas libYap)
|
||||
if (ODBC_FOUND)
|
||||
# ODBC_INCLUDE_DIRECTORIES, where to find sql.h
|
||||
# ODBC_LIBRARIES, the libraries to link against to use ODBC
|
||||
# ODBC_FOUND. If false, you cannot build anything that requires MySQL.
|
||||
macro_log_feature (ODBC_FOUND "ODBC"
|
||||
"Use ODBC Data-Base Interface "
|
||||
"http://www.unixodbc.org" FALSE)
|
||||
add_definitions (-DMYDDAS_ODBC=1)
|
||||
target_link_libraries(myddas ${ODBC_LIBRARIES})
|
||||
include_directories (${ODBC_INCLUDE_DIRECTORIES})
|
||||
endif (ODBC_FOUND)
|
||||
|
||||
if (MYSQL_FOUND)
|
||||
# MYSQL_INCLUDE_DIR - where to find mysql.h, etc.
|
||||
# MYSQL_LIBRARIES - List of libraries when using MySQL.
|
||||
# MYSQL_FOUND - True if MySQL found.
|
||||
macro_log_feature (MYSQL_FOUND "MySQL"
|
||||
"Use MYSQL Data-Base Interface "
|
||||
"http://www.mysql.org" FALSE)
|
||||
add_definitions (-DMYDDAS_MYSQL=1)
|
||||
target_link_libraries(myddas ${MYSQL_LIBRARIES})
|
||||
include_directories (${MYSQL_INCLUDE_DIR})
|
||||
endif (MYSQL_FOUND)
|
||||
|
||||
if (MYSQL_FOUND OR ODBC_FOUND)
|
||||
set (EXTRALIBS ${EXTRALIBS} myddas)
|
||||
else (MYSQL_FOUND OR ODBC_FOUND)
|
||||
message(SEND_ERROR "MYDDAS needs either MYSQL or ODBC none where found")
|
||||
endif (MYSQL_FOUND OR ODBC_FOUND)
|
||||
endif (WITH_MYDDAS)
|
||||
add_custom_target (plmyddas ALL DEPENDS ${GENERATED_SOURCES} ) # WORKING_DIRECTORY ${CMAKE_BINARY_DIR} )
|
||||
endif (ODBC_FOUND OR MYSQL_FOUND)
|
||||
|
||||
cmake_dependent_option (WITH_MYDDAS_Stats
|
||||
"enable the MYDDAS library statistics support" OFF
|
||||
|
@ -1,4 +1,8 @@
|
||||
#CHECK: PythonLibs
|
||||
|
||||
set (PYTHON_SOURCES
|
||||
python.c)
|
||||
|
||||
macro_optional_find_package(PythonInterp ON)
|
||||
macro_optional_find_package (PythonLibs ON)
|
||||
macro_log_feature (PYTHONLIBS_FOUND "Python"
|
||||
@ -30,5 +34,21 @@ if (PYTHONLIBS_FOUND) # PYTHONLIBS_FOUND - have the Python l
|
||||
# first to get the currently active Python version by default with a consistent
|
||||
# version of PYTHON_LIBRARIES.
|
||||
|
||||
add_library (python SHARED ${PYTHON_SOURCES})
|
||||
|
||||
target_link_libraries(python libYap ${PYTHON_LIBRARIES})
|
||||
|
||||
set_target_properties (python PROPERTIES PREFIX "")
|
||||
|
||||
include_directories (${PYTHON_INCLUDE_DIRS})
|
||||
|
||||
install(TARGETS python
|
||||
LIBRARY DESTINATION ${dlls}
|
||||
)
|
||||
|
||||
install(FILES python.pl
|
||||
DESTINATION ${libpl}
|
||||
)
|
||||
|
||||
|
||||
endif (PYTHONLIBS_FOUND)
|
||||
|
@ -83,7 +83,7 @@ fetch_module(M:E, M1, E1, MRef) :-
|
||||
%
|
||||
% extend the module as much as we can.
|
||||
%
|
||||
module_extend(M0, M:E, MF, EF, MRef0, MRef) :-
|
||||
module_extend(M0, M:E, MF, EF, _MRef0, MRef) :-
|
||||
atom(M),
|
||||
atom_concat([M0,'.',M], MM),
|
||||
python_import(MM, MRef1), !,
|
||||
@ -118,7 +118,7 @@ python_class(Obj) :-
|
||||
process_obj(Obj, _, S, Obj, NS, Dict) :-
|
||||
python_callable(Obj), !,
|
||||
python_check_args(S, NS, Dict).
|
||||
process_obj(Obj, _, S, Obj, NS, Dict) :-
|
||||
process_obj(Obj, _, S, FObj, NS, Dict) :-
|
||||
python_class(Obj),
|
||||
descend_object(Obj:'__init__', FObj, _, _),
|
||||
python_check_args(S, NS, Dict).
|
||||
@ -133,7 +133,7 @@ python_eval_term([H|T], [NH|NT]) :- !,
|
||||
python_eval_term(T, NT).
|
||||
python_eval_term(N, N) :- atomic(N), !.
|
||||
python_eval_term(Exp, O) :-
|
||||
descend_exp(Exp, Obj, Old, S), !,
|
||||
descend_exp(Exp, Obj, _Old, S), !,
|
||||
(functor(S, _, 0) ->
|
||||
O = Obj
|
||||
;
|
||||
@ -185,7 +185,7 @@ match_from_anames([_|ArgNames], K, VA, [V|Defaults], [V|NDefaults]) :-
|
||||
|
||||
fetch_args(FRef, Args, Kwd, Defaults) :-
|
||||
FRef = '__obj__'(_), !,
|
||||
python_mref_cache('inspect', M),
|
||||
%python_mref_cache('inspect', M),
|
||||
python_obj_cache(inspect:getargspec(_), F),
|
||||
python_apply(F, getargspec(FRef), {}, ExtraArgs),
|
||||
ExtraArgs=t(Args, _, Kwd, Defaults).
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit e75f61fe11da02633e61501dae21122b9adad687
|
||||
Subproject commit c488f2493012e8e3b83bbcd4db020a3db5b96062
|
@ -1 +1 @@
|
||||
Subproject commit 54d9b5d24c60b1be4dc6c1167a59ef46a0f79ac8
|
||||
Subproject commit e0a566b31a14f28a49fe112f6e56bbd58a12ccd4
|
@ -69,7 +69,7 @@ static lbfgsfloatval_t evaluate(
|
||||
optimizer_status=OPTIMIZER_STATUS_RUNNING;
|
||||
|
||||
if (result==FALSE) {
|
||||
printf("ERROR: Calling the evaluate call back function in YAP.\n");
|
||||
printf("ERROR: the evaluate call failed in YAP.\n");
|
||||
// Goal did not succeed
|
||||
return FALSE;
|
||||
}
|
||||
@ -127,7 +127,7 @@ static int progress(
|
||||
call = YAP_GetFromSlot( s1 );
|
||||
|
||||
if (result==FALSE) {
|
||||
printf("ERROR: Calling the progress call back function in YAP.\n");
|
||||
printf("ERROR: the progress call failed in YAP.\n");
|
||||
// Goal did not succeed
|
||||
return FALSE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user