cmake
This commit is contained in:
parent
916f010504
commit
30664a5344
149
CMakeLists.txt
149
CMakeLists.txt
@ -5,6 +5,12 @@
|
||||
# libraries
|
||||
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
cmake_policy( SET CMP0042 NEW)
|
||||
cmake_policy( NO_POLICY_SCOPE )
|
||||
endif()
|
||||
|
||||
cmake_policy(SET CMP0043 NEW)
|
||||
|
||||
project(YAP C CXX)
|
||||
|
||||
@ -41,10 +47,6 @@ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
|
||||
set(CMAKE_TOP_BINARY_DIR ${CMAKE_BINARY_DIR})
|
||||
set(YAP_PL_SRCDIR ${CMAKE_SOURCE_DIR}/pl)
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
cmake_policy( SET CMP0042 NEW)
|
||||
endif()
|
||||
|
||||
# Compatibility vars with autotols
|
||||
set ( prefix "${CMAKE_INSTALL_PREFIX}")
|
||||
set ( exec_prefix "${prefix}")
|
||||
@ -73,7 +75,8 @@ set(YAP_STARTUP startup.yss)
|
||||
string(TIMESTAMP YAP_TIMESTAMP)
|
||||
string( SUBSTRING ${CMAKE_SHARED_LIBRARY_SUFFIX} 1 -1 SO_EXT )
|
||||
#
|
||||
include_directories (H include os ${CMAKE_BINARY_DIR})
|
||||
include_directories (H include os)
|
||||
include_directories (BEFORE ${CMAKE_BINARY_DIR})
|
||||
|
||||
# Optional libraries that affect compilation
|
||||
#
|
||||
@ -89,7 +92,7 @@ include (MacroLogFeature)
|
||||
include (CMakeDependentOption)
|
||||
include (CheckSymbolExists)
|
||||
|
||||
set ( MALLOC_T void *)
|
||||
set ( YAP_MALLOC_T void *)
|
||||
set ( MIN_STACKSPACE 1024*SIZEOF_INT_P )
|
||||
set ( MIN_HEAPSPACE 2*1024*SIZEOF_INT_P )
|
||||
set ( MIN_TRAILSPACE 512*SIZEOF_INT_P )
|
||||
@ -98,19 +101,21 @@ set ( DEF_HEAPSPACE 0 )
|
||||
set ( DEF_TRAILSPACE 0 )
|
||||
|
||||
# option (RATIONAL_TREES "support infinite rational trees" ON)
|
||||
add_definitions (-DRATIONAL_TREES=1)
|
||||
# dd_definitions (-D)
|
||||
|
||||
# option (COROUTINING
|
||||
# "support co-routining, attributed variables and constraints" ON)
|
||||
add_definitions (-DCOROUTINING=1)
|
||||
## don't touch these opts
|
||||
set_property( DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS DEPTH_LIMIT=1;COROUTINING=1;RATIONAL_TREES=1 )
|
||||
|
||||
# if (RATIONAL_TREES and COROUTINING)
|
||||
#TODO: install (cd LGPL/clp ; $(MAKE) install)
|
||||
# endif (RATIONAL_TREES and COROUTINING)
|
||||
# inform we are compiling YAP
|
||||
set_property( DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS _YAP_NOT_INSTALLED_=1;HAVE_CONFIG_H )
|
||||
|
||||
# option (DEPTH_LIMIT
|
||||
# "support depth-bound computation" ON)
|
||||
add_definitions (-DDEPTH_LIMIT=1)
|
||||
# Compilation model
|
||||
set_property( DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS GNU_SOURCE=1;_XOPEN_SOURCE=700 )
|
||||
|
||||
#add_definitions( -Wall -Wstrict-prototypes -Wmissing-prototypes)
|
||||
|
||||
# Model Specific
|
||||
set_property( DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:Debug>:DEBUG=1;LOW_LEVEL_TRACER=1> )
|
||||
|
||||
#ensure cells are properly aligned in code
|
||||
set (ALIGN_LONGS 1)
|
||||
@ -133,14 +138,13 @@ if ( ${C_COMPILER} MATCHES "Intel")
|
||||
set (HAVE_GCC 1)
|
||||
endif()
|
||||
|
||||
add_definitions( -Wall -Wstrict-prototypes -Wmissing-prototypes)
|
||||
add_definitions(-D_YAP_NOT_INSTALLED_=1 -DHAVE_CONFIG_H)
|
||||
add_definitions(-D_GNU_SOURCE=1 -D_XOPEN_SOURCE=700)
|
||||
# Model Specific
|
||||
if (HAVE_GCC)
|
||||
set_property( DIRECTORY APPEND_STRING PROPERTY COMPILE_OPTIONS -Wall;-Wstrict-prototypes;-Wmissing-prototypes )
|
||||
endif()
|
||||
|
||||
message(STATUS "Original CMAKE_C_FLAGS ${CMAKE_C_FLAGS}")
|
||||
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DLOW_LEVEL_TRACER=1 -DDEBUG=1 ")
|
||||
|
||||
# Compilation Flags
|
||||
if (CMAKE_COMPILER_IS_GNUCC)
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -O3 -fomit-frame-pointer -fstrict-aliasing -freorder-blocks -fsched-interblock")
|
||||
@ -150,11 +154,11 @@ message(STATUS "Running with CMAKE_C_FLAGS ${CMAKE_C_FLAGS}")
|
||||
|
||||
if (HAVE_GCC)
|
||||
# replace instructions codes by the address of their code
|
||||
option (THREADED_CODE "threaded code" ON)
|
||||
if (THREADED_CODE)
|
||||
option (YAP_THREADED_CODE "threaded code" ON)
|
||||
if (YAP_THREADED_CODE)
|
||||
set (USE_THREADED_CODE 1)
|
||||
add_definitions(-DTHREADEAD_CODE=1)
|
||||
endif (THREADED_CODE)
|
||||
endif (YAP_THREADED_CODE)
|
||||
endif (HAVE_GCC)
|
||||
|
||||
#
|
||||
@ -165,8 +169,8 @@ set (BUILD_SHARED_LIBS ON)
|
||||
#
|
||||
add_subdirectory (os/libtai)
|
||||
|
||||
option (TABLING "Support tabling" ON)
|
||||
if (TABLING)
|
||||
option (YAP_TABLING "Support tabling" ON)
|
||||
if (YAP_TABLING)
|
||||
#this depends on DEPTH_LIMIT define it after
|
||||
|
||||
#this macro should realy be in config.h or other like it
|
||||
@ -174,16 +178,16 @@ if (TABLING)
|
||||
add_definitions (-DTABLING=1)
|
||||
include_directories (OPTYap)
|
||||
add_subdirectory (OPTYap)
|
||||
endif(TABLING)
|
||||
endif(YAP_TABLING)
|
||||
|
||||
option (EAM "enable EAM (Extended Andorra Model)" OFF)
|
||||
if (EAM)
|
||||
option (YAP_EAM "enable EAM (Extended Andorra Model)" OFF)
|
||||
if (YAP_EAM)
|
||||
#this macro should realy be in config.h or other like it
|
||||
add_definitions (-DBEAM=1)
|
||||
include_directories (BEAM)
|
||||
add_subdirectory (BEAM)
|
||||
set (EXTRALIBS ${EXTRALIBS} beam)
|
||||
endif (EAM)
|
||||
endif (YAP_EAM)
|
||||
|
||||
#TODO: option (or-parallelism)
|
||||
|
||||
@ -191,11 +195,14 @@ endif (EAM)
|
||||
# option (WAM_Profile
|
||||
# "support low level profiling of abstract machine" OFF)
|
||||
|
||||
option (Low_Level_Tracer
|
||||
"support for procedure-call tracing" OFF)
|
||||
option (YAP_CALL_TRACER
|
||||
"support for procedure-call tracing" ON)
|
||||
#TODO:
|
||||
if (YAP_CALL_TRACER)
|
||||
set_directory_properties(PROPERTIES COMPILE_DEFINITIONS_DEBUG LOW_LEVEL_TRACER=1)
|
||||
endif (YAP_CALL_TRACER)
|
||||
|
||||
option (System_Threads
|
||||
option (YAP_THREADS
|
||||
"support system threads" OFF)
|
||||
#TODO:
|
||||
|
||||
@ -391,8 +398,6 @@ set_target_properties(libYap
|
||||
OUTPUT_NAME Yap
|
||||
)
|
||||
|
||||
option (Dynamic_BDD
|
||||
"dynamic bdd library" OFF)
|
||||
#TODO:
|
||||
|
||||
#TODO:
|
||||
@ -412,8 +417,8 @@ if (GMP_FOUND)
|
||||
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} )
|
||||
set( CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${GMP_INCLUDE_DIR} )
|
||||
set( CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${GMP_LIBRARIES} )
|
||||
endif (GMP_FOUND)
|
||||
|
||||
macro_optional_find_package (Readline ON)
|
||||
@ -423,10 +428,10 @@ macro_log_feature (READLINE_FOUND "libreadline"
|
||||
if (READLINE_FOUND)
|
||||
include_directories (${READLINE_INCLUDE_DIR})
|
||||
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} )
|
||||
set( CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${READLINE_INCLUDE_DIR} )
|
||||
set( CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${READLINE_LIBRARIES} )
|
||||
|
||||
check_include_file( readline/readline.h HAVE_READLINE_READLINE_H )
|
||||
check_function_exists( add_history HAVE_ADD_HISTORY )
|
||||
check_function_exists( rl_begin_undo_group HAVE_RL_BEGIN_UNDO_GROUP)
|
||||
check_function_exists( rl_clear_pending_input HAVE_RL_CLEAR_PENDING_INPUT)
|
||||
@ -446,11 +451,12 @@ if (READLINE_FOUND)
|
||||
endif (READLINE_FOUND)
|
||||
|
||||
|
||||
macro_optional_find_package (Threads OFF)
|
||||
option (YAP_THREADS OFF)
|
||||
macro_optional_find_package (Threads ON)
|
||||
macro_log_feature (THREADS_FOUND "Threads Support"
|
||||
"GNU Threads Library (or similar)"
|
||||
"http://www.gnu.org/software/threads")
|
||||
if (THREADS_FOUND)
|
||||
if (YAP_THREADS AND THREADS_FOUND)
|
||||
#
|
||||
# CMAKE_THREAD_LIBS_INIT - the thread library
|
||||
# CMAKE_USE_SPROC_INIT - are we using sproc?
|
||||
@ -489,50 +495,47 @@ if (THREADS_FOUND)
|
||||
# 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)
|
||||
endif (YAP_THREADS AND THREADS_FOUND)
|
||||
|
||||
cmake_dependent_option (PThreadLocking
|
||||
cmake_dependent_option (YAP_PTHREADLOCKING
|
||||
"use pthread locking primitives for internal locking" ON
|
||||
System_Threads OFF)
|
||||
"NOT YAP_THREADS; NOT THREADS_FOUND" OFF)
|
||||
|
||||
add_subdirectory (CXX)
|
||||
add_subdirectory (pl)
|
||||
add_subdirectory (CXX)
|
||||
ADD_SUBDIRECTORY(library)
|
||||
ADD_SUBDIRECTORY(swi/library)
|
||||
# ADD_SUBDIRECTORY(os)
|
||||
# ADD_SUBDIRECTORY(packages)
|
||||
ADD_SUBDIRECTORY(pl)
|
||||
|
||||
option (JIT
|
||||
"use just-in-time compilation (experimental)" ON)
|
||||
if (JIT)
|
||||
macro_optional_find_package (LLVM ON)
|
||||
macro_log_feature (LLVM_FOUND "LLVM JIT generator"
|
||||
"The LLVM Compiler Infrastructure" "http://www.llvm.org")
|
||||
if (LLVM_FOUND)
|
||||
INCLUDE_DIRECTORIES(JIT/HPP)
|
||||
add_definitions (-DYAP_JIT=1)
|
||||
add_subdirectory (JIT)
|
||||
endif (LLVM_FOUND)
|
||||
endif (JIT)
|
||||
if (BUILD_JIT)
|
||||
add_definitions (-DYAP_JIT=1)
|
||||
INCLUDE_DIRECTORIES(JIT JIT/HPP)
|
||||
macro_optional_add_subdirectory(JIT ON)
|
||||
endif()
|
||||
|
||||
macro_optional_add_subdirectory(library/mpi)
|
||||
macro_optional_add_subdirectory(library/lammpi)
|
||||
|
||||
macro_optional_add_subdirectory (packages/gecode)
|
||||
|
||||
macro_optional_add_subdirectory (packages/cuda)
|
||||
|
||||
macro_optional_add_subdirectory (packages/myddas)
|
||||
|
||||
macro_optional_add_subdirectory (packages/real)
|
||||
|
||||
macro_optional_add_subdirectory (packages/python)
|
||||
|
||||
macro_optional_add_subdirectory (packages/raptor)
|
||||
|
||||
#macro_optional_add_subdirectory (packages/archive)
|
||||
#add_subdirectory (packages/archive)
|
||||
|
||||
macro_optional_add_subdirectory (packages/jpl)
|
||||
|
||||
#macro_optional_add_subdirectory (packages/prosqlite)
|
||||
#add_subdirectory (packages/prosqlite)
|
||||
|
||||
#macro_optional_add_subdirectory (packages/zlib)
|
||||
#add_subdirectory (packages/zlib)
|
||||
|
||||
#todo: use cmake target builds
|
||||
# option (MAXPERFORMANCE
|
||||
@ -550,28 +553,32 @@ macro_optional_add_subdirectory (packages/jpl)
|
||||
# option (CYGWIN
|
||||
# "use cygwin library in WIN32" OFF)
|
||||
|
||||
option (PRISM
|
||||
option (YAP_PRISM
|
||||
"use PRISM system in YAP" ON)
|
||||
#TODO:
|
||||
|
||||
option (Dynamic_Loading
|
||||
option (YAP_DLL
|
||||
"compile YAP as a DLL" ON)
|
||||
#TODO:
|
||||
|
||||
option (Static_compilation
|
||||
option (YAP_STATIC
|
||||
"compile YAP statically" OFF)
|
||||
#TODO:
|
||||
|
||||
option (MALLOC
|
||||
option (YAP_MALLOC
|
||||
"use malloc to allocate memory" ON)
|
||||
if (MALLOC)
|
||||
if (YAP_MALLOC)
|
||||
# use default allocator
|
||||
set ( USE_SYSTEM_MALLOC 1 )
|
||||
endif()
|
||||
|
||||
option(CONDOR
|
||||
option(YAP_CONDOR
|
||||
"allow YAP to be used from condor" OFF)
|
||||
#TODO:
|
||||
if (YAP_MALLOC)
|
||||
# use default allocator
|
||||
set ( YAP_STATIC ON )
|
||||
set ( YAP_DLL OFF )
|
||||
endif()
|
||||
|
||||
#TODO: detect arch before allow this option
|
||||
# OPTION(WIN64
|
||||
@ -625,10 +632,6 @@ set_target_properties (yap-bin PROPERTIES OUTPUT_NAME yap)
|
||||
|
||||
target_link_libraries(yap-bin libYap )
|
||||
|
||||
if (JIT)
|
||||
|
||||
endif(JIT)
|
||||
|
||||
if (MPI_C_FOUND)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MPI_C_COMPILE_FLAGS} ")
|
||||
include_directories(${MPI_C_INCLUDE_PATH})
|
||||
|
@ -15,6 +15,11 @@ set(LIBJIT_SOURCES
|
||||
JIT_Init.cpp
|
||||
)
|
||||
|
||||
macro_optional_find_package (LLVM ON)
|
||||
macro_log_feature (LLVM_FOUND "LLVM JIT generator"
|
||||
"The LLVM Compiler Infrastructure" "http://www.llvm.org")
|
||||
|
||||
|
||||
# The following variables are defined:
|
||||
# LLVM_FOUND - true if LLVM was found
|
||||
# LLVM_CXXFLAGS - C++ compiler flags for files that include LLVM headers.
|
||||
|
@ -12,8 +12,9 @@
|
||||
#include <time.h>
|
||||
#include <dlfcn.h>
|
||||
#include "config.h"
|
||||
extern "C" {
|
||||
#include "absmi.h"
|
||||
|
||||
}
|
||||
using namespace std;
|
||||
|
||||
#else
|
||||
|
@ -25,21 +25,15 @@ extern int errno;
|
||||
strcpy(S, tmp); \
|
||||
free(tmp);
|
||||
|
||||
#if YAP_JIT
|
||||
void Yap_InitJitAnalysisPreds(void);
|
||||
void Yap_InitJitCodegenPreds(void);
|
||||
void Yap_InitJitConfigPreds(void);
|
||||
void Yap_InitJitTransformPreds(void);
|
||||
#if YAP_STAT_PREDS
|
||||
void Yap_InitJitStatisticPreds(void);
|
||||
#endif
|
||||
#endif /* YAP_JIT */
|
||||
#if YAP_DBG_PREDS
|
||||
void Yap_InitJitDebugPreds(void);
|
||||
#endif
|
||||
|
||||
Environment ExpEnv;
|
||||
#if YAP_JIT
|
||||
Environment ExpEnv;
|
||||
extern NativeContext *NativeArea;
|
||||
extern IntermediatecodeContext *IntermediatecodeArea;
|
||||
#endif
|
||||
|
148
cmake/x.cmake
148
cmake/x.cmake
@ -1,148 +0,0 @@
|
||||
#include <dirent.h>
|
||||
check_symbol_exists( opendir HAVE_OPENDIR )
|
||||
|
||||
|
||||
# locale.h
|
||||
check_symbol_exists( localeconv HAVE_LOCALECONV )
|
||||
check_symbol_exists( setlocale HAVE_SETLOCALE )
|
||||
|
||||
#include <mach-o/dyld.h>
|
||||
check_symbol_exists( NSLinkModule HAVE_NSLINKMODULE )
|
||||
|
||||
#include <malloc.h>
|
||||
check_symbol_exists( mallinfo HAVE_MALLINFO )
|
||||
|
||||
#math.h
|
||||
check_symbol_exists( acosh math.h HAVE_ACOSH )
|
||||
check_symbol_exists( asinh math.h HAVE_ASINH )
|
||||
check_symbol_exists( atanh math.h HAVE_ATANH )
|
||||
check_symbol_exists( erf math.h HAVE_ERF )
|
||||
check_symbol_exists( finite math.h HAVE_FINITE )
|
||||
check_symbol_exists( ftruncate HAVE_FTRUNCATE )
|
||||
check_symbol_exists( isfinite math.h HAVE_ISFINITE )
|
||||
check_symbol_exists( lgamma math.h HAVE_LGAMMA )
|
||||
check_symbol_exists( rint math.h AVE_RINT )
|
||||
|
||||
#include <netdb.h>
|
||||
check_symbol_exists( h_errno HAVE_H_ERRNO )
|
||||
check_symbol_exists( socklen_t HAVE_SOCKLEN_T ))
|
||||
|
||||
|
||||
#include <regex.h>
|
||||
check_symbol_exists( regexec HAVE_REGEXEC )
|
||||
|
||||
#include <setjmp.h>
|
||||
check_symbol_exists( sigsetjmp HAVE_SIGSETJMP )
|
||||
check_symbol_exists( __sigsetjmp HAVE__SIGSETJMP )
|
||||
if(HAVE___SIGSETJMP)
|
||||
set(HAVE_SIGSETJMP 1)
|
||||
endif(HAVE___SIGSETJMP)
|
||||
|
||||
#include <signal.h>
|
||||
check_symbol_exists( siggetmask HAVE_SIGGETMASK )
|
||||
check_symbol_exists( SIGFPE HAVE_SIGFPE )
|
||||
check_symbol_exists( SIGINFO HAVE_SIGINFO )
|
||||
check_symbol_exists( SIGPROF HAVE_SIGPROF )
|
||||
check_symbol_exists( SIGSEGV HAVE_SIGSEGV )
|
||||
|
||||
#include <stdbool.h>
|
||||
check_symbol_exists( _bool HAVE__BOOL )
|
||||
|
||||
#include <stdio.h>
|
||||
check_symbol_exists( popen HAVE_POPEN )
|
||||
check_symbol_exists( rename HAVE_RENAME )
|
||||
check_symbol_exists( setbuf HAVE_SETBUF )
|
||||
check_symbol_exists( setlinebuf HAVE_SETLINEBUF )
|
||||
check_symbol_exists( snprintf HAVE_SNPRINTF )
|
||||
check_symbol_exists( tmpnam HAVE_TMPNAM )
|
||||
check_symbol_exists( vsnprintf HAVE_VSNPRINTF )
|
||||
|
||||
#string.h
|
||||
check_symbol_exists( memcpy HAVE_MEMCPY )
|
||||
check_symbol_exists( memmove HAVE_MEMMOVE )
|
||||
check_symbol_exists( strcasestr HAVE_STRCASESTR )
|
||||
check_symbol_exists( strerror HAVE_STRERROR )
|
||||
check_symbol_exists( strncat HAVE_STRNCAT )
|
||||
check_symbol_exists( strncpy HAVE_STRNCPY )
|
||||
check_symbol_exists( strnlen HAVE_STRNLEN )
|
||||
check_symbol_exists( strchr HAVE_STRCHR )
|
||||
check_symbol_exists( strlwr HAVE_STRLWR )
|
||||
|
||||
#include strings.h
|
||||
check_symbol_exists( strncasecmp HAVE_STRNCASECMP )
|
||||
|
||||
#include <sys/shm.h>
|
||||
check_symbol_exists( mmap HAVE_MMAP )
|
||||
|
||||
# sys/resource
|
||||
check_symbol_exists( getrusage sys/resource HAVE_GETRUSAGE )
|
||||
|
||||
#include <sys/select.h>
|
||||
check_symbol_exists( select HAVE_SELECT )
|
||||
|
||||
#include <sys/shm.h>
|
||||
check_symbol_exists( shmat HAVE_SHMAT )
|
||||
|
||||
#include <sys/socket.h>
|
||||
check_symbol_exists( socket HAVE_SOCKET )
|
||||
|
||||
# sys/stat.h
|
||||
check_symbol_exists( lstat HAVE_LSTAT )
|
||||
check_symbol_exists( stat HAVE_STAT )
|
||||
|
||||
#include <sys/time.h>
|
||||
check_symbol_exists( gettimeofday HAVE_GETTIMEOFDAY )
|
||||
|
||||
#include <sys/times.h>
|
||||
check_symbol_exists( times HAVE_TIMES )
|
||||
|
||||
#include <sys/types.h>
|
||||
check_symbol_exists( ssize_t HAVE_SSIZE_T )
|
||||
|
||||
#include <sys/wait.h>
|
||||
ocheck_symbol_exists( waitpid HAVE_WAITPID )
|
||||
|
||||
# time.h
|
||||
check_symbol_exists( localtime HAVE_LOCALTIME )
|
||||
check_symbol_exists( nanosleep HAVE_NANOSLEEP )
|
||||
check_symbol_exists( setitimer HAVE_SETITIMER )
|
||||
check_symbol_exists( timegm HAVE_TIMEGM )
|
||||
|
||||
# unistd.h
|
||||
check_symbol_exists( access unistd.h HAVE_ACCESS )
|
||||
check_symbol_exists( alarm unistd.h HAVE_ALARM )
|
||||
check_symbol_exists( chdir unistd.h HAVE_CHDIR )
|
||||
check_symbol_exists( crypt unistd.h HAVE_CRYPT )
|
||||
check_symbol_exists( dup2 unistd.h HAVE_DUP2 )
|
||||
check_symbol_exists( getcwd unistd.h HAVE_GETCWD )
|
||||
check_symbol_exists( gethostid unistd.h HAVE_GETHOSTID )
|
||||
check_symbol_exists( gethostname unistd.h HAVE_GETHOSTNAME )
|
||||
check_symbol_exists( getpagesize unistd.h HAVE_GETPAGESIZE)
|
||||
check_symbol_exists( pipe2 unistd.h HAVE_PIPE2 )
|
||||
check_symbol_exists( sbrk unistd.h HAVE_SBRK )
|
||||
|
||||
#include <utime.h>
|
||||
check_symbol_exists( utime HAVE_UTIME )
|
||||
|
||||
#include <wchar.h>
|
||||
check_symbol_exists( wcsdup HAVE_WCSDUP )
|
||||
check_symbol_exists( wcsnlen HAVE_WCSNLEN )
|
||||
|
||||
#windows.h
|
||||
check_symbol_exists( LoadLibrary HAVE_LOADLIBRARY )
|
||||
check_symbol_exists( mbscasecoll HAVE_MBSCASECOLL )
|
||||
check_symbol_exists( mbscoll HAVE_MBSCOLL )
|
||||
check_symbol_exists( mbsnrtowcs HAVE_MBSNRTOWCS )
|
||||
check_symbol_exists( stricmp HAVE_STRICMP )
|
||||
|
||||
|
||||
check_symbol_exists( nullptr HAVE_NULLPTR )
|
||||
check_symbol_exists( sqllen HAVE_SQLLEN )
|
||||
check_symbol_exists( sqlulen HAVE_SQLULEN )
|
||||
check_symbol_exists( struct_time_tm_gmtoff HAVE_STRUCT_TIME_TM_GMTOFF )
|
||||
check_symbol_exists( var_timezone HAVE_VAR_TIMEZONE )
|
||||
check_symbol_exists( _chsize_s HAVE__CHSIZE_S )
|
||||
check_symbol_exists( _NSGetEnviron HAVE__NSGETENVIRON )
|
||||
check_symbol_exists( __builtin_ffsll HAVE___BUILTIN_FFSLL )
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
* This file is autogenerated from config.h.in
|
||||
* This file is autogenerated from config.h.in
|
||||
* during the cmake configuration of your project. If you need to make changes
|
||||
* edit the original file NOT THIS FILE.
|
||||
* --------------------------------------------------------------------------*/
|
||||
@ -51,7 +51,7 @@
|
||||
|
||||
/* main libs for YAP */
|
||||
#ifndef C_LIBS
|
||||
#define C_LIBS "${EXTRALIBS}"
|
||||
#define C_LIBS "${EXTRALIBS}"
|
||||
#endif
|
||||
|
||||
/* IEEE floating-point, basically everyone except old VAXEN */
|
||||
@ -951,12 +951,12 @@ you don't. */
|
||||
|
||||
/* Define to 1 if you have the <readline/history.h> header file. */
|
||||
#ifndef HAVE_READLINE_HISTORY_H
|
||||
#define HAVE_READLINE_HISTORY_H ${HAVE_READLINE_HISTORY_H}
|
||||
#cmakedefine 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
|
||||
#define HAVE_READLINE_READLINE_H ${HAVE_READLINE_READLINE_H}
|
||||
#cmakedefine HAVE_READLINE_READLINE_H ${HAVE_READLINE_READLINE_H}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `readlink' function. */
|
||||
@ -1771,7 +1771,7 @@ signal. */
|
||||
#ifndef SIZEOF_VOIDP
|
||||
#define SIZEOF_VOIDP ${SIZEOF_VOIDP}
|
||||
#endif
|
||||
|
||||
|
||||
/* The size of `void *', as computed by sizeof. */
|
||||
#ifndef SIZEOF_VOID_P
|
||||
#define SIZEOF_VOID_P ${SIZEOF_VOID_P}
|
||||
|
84
configure
vendored
84
configure
vendored
@ -10332,6 +10332,8 @@ if test "${with_myddas+set}" = set; then :
|
||||
CPPFLAGS="$CPPFLAGS -I${yap_cv_myddas}/include "
|
||||
ODBC_LDFLAGS="-L${yap_cv_myddas}/lib "
|
||||
ODBC_CFLAGS="-I${yap_cv_myddas}/include "
|
||||
SQLITE3_LDFLAGS="-L${yap_cv_myddas}/lib "
|
||||
SQLITE3_CFLAGS="-I${yap_cv_myddas}/include "
|
||||
fi
|
||||
else
|
||||
yap_cv_myddas=/usr
|
||||
@ -10680,6 +10682,69 @@ done
|
||||
then
|
||||
YAP_EXTRAS="$YAP_EXTRAS -DMYDDAS_TOP_LEVEL"
|
||||
fi
|
||||
#from SWI PROSQLITE library.
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_open in -lsqlite3" >&5
|
||||
$as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; }
|
||||
if ${ac_cv_lib_sqlite3_sqlite3_open+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lsqlite3 $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char sqlite3_open ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return sqlite3_open ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_lib_sqlite3_sqlite3_open=yes
|
||||
else
|
||||
ac_cv_lib_sqlite3_sqlite3_open=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
|
||||
$as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
|
||||
if test "x$ac_cv_lib_sqlite3_sqlite3_open" = xyes; then :
|
||||
MYDDAS_LIBS+="-lsqlite3"
|
||||
havelib=yes
|
||||
fi
|
||||
|
||||
|
||||
|
||||
for ac_header in sqlite3.h
|
||||
do :
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_sqlite3_h" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_SQLITE3_H 1
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
yap_cv_sqlite3="no"
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
if test "$yap_cv_odbc" = yes
|
||||
then
|
||||
YAP_EXTRAS="$YAP_EXTRAS -DMYDDAS_SQLITE3"
|
||||
fi
|
||||
|
||||
LIBS="$OLD_LIBS"
|
||||
else
|
||||
ENABLE_MYDDAS=""
|
||||
@ -14190,7 +14255,7 @@ else
|
||||
JAVA_TEST=Test.java
|
||||
CLASS_TEST=Test.class
|
||||
cat << \EOF > $JAVA_TEST
|
||||
/* #line 14193 "configure" */
|
||||
/* #line 14258 "configure" */
|
||||
public class Test {
|
||||
}
|
||||
EOF
|
||||
@ -14366,7 +14431,7 @@ EOF
|
||||
if uudecode$EXEEXT Test.uue; then
|
||||
ac_cv_prog_uudecode_base64=yes
|
||||
else
|
||||
echo "configure: 14369: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
|
||||
echo "configure: 14434: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
|
||||
echo "configure: failed file was:" >&5
|
||||
cat Test.uue >&5
|
||||
ac_cv_prog_uudecode_base64=no
|
||||
@ -14497,7 +14562,7 @@ else
|
||||
JAVA_TEST=Test.java
|
||||
CLASS_TEST=Test.class
|
||||
cat << \EOF > $JAVA_TEST
|
||||
/* #line 14500 "configure" */
|
||||
/* #line 14565 "configure" */
|
||||
public class Test {
|
||||
}
|
||||
EOF
|
||||
@ -14532,7 +14597,7 @@ JAVA_TEST=Test.java
|
||||
CLASS_TEST=Test.class
|
||||
TEST=Test
|
||||
cat << \EOF > $JAVA_TEST
|
||||
/* [#]line 14535 "configure" */
|
||||
/* [#]line 14600 "configure" */
|
||||
public class Test {
|
||||
public static void main (String args[]) {
|
||||
System.exit (0);
|
||||
@ -17286,7 +17351,7 @@ fi
|
||||
PKG_CUDA="packages/cuda"
|
||||
case "$target_os" in
|
||||
*darwin*)
|
||||
CUDA_LDFLAGS="$LDFLAGS"
|
||||
CUDA_LDFLAGS="$LDFLAGS $LIBS"
|
||||
CUDA_CPPFLAGS="-arch=sm_20 -Xcompiler -fPIC -O3 "
|
||||
CUDA_SHLIB_LD="$NVCC --shared -L../.. -lYap "
|
||||
;;
|
||||
@ -17390,7 +17455,7 @@ if test "$use_gecode" != no; then
|
||||
fi
|
||||
if test "$use_gecode" = yes; then
|
||||
GECODE_PATH=`which fzn-gecode`
|
||||
GECODE_PATH=`dirname "$GECODE_PATH"`
|
||||
GECODE_PATH=`dirname "$GECODE_PATH"`
|
||||
else
|
||||
GECODE_PATH="$use_gecode"
|
||||
fi
|
||||
@ -17518,8 +17583,6 @@ fi
|
||||
|
||||
|
||||
|
||||
CPPFLAGS="$saved_CPPFLAGS"
|
||||
|
||||
|
||||
|
||||
|
||||
@ -17531,6 +17594,8 @@ ac_config_files="$ac_config_files packages/gecode/Makefile"
|
||||
|
||||
fi
|
||||
|
||||
CPPFLAGS="$saved_CPPFLAGS"
|
||||
|
||||
|
||||
|
||||
|
||||
@ -17557,7 +17622,8 @@ if test "${with_prosqlite+set}" = set; then :
|
||||
PROSQLITE_DIR=/usr
|
||||
elif test "$withval" = no; then
|
||||
yap_cv_prosqlite=no
|
||||
else
|
||||
|
||||
else
|
||||
PROSQLITE_DIR=$withval
|
||||
fi
|
||||
else
|
||||
|
@ -1,69 +1,67 @@
|
||||
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
|
||||
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(dialect)
|
||||
add_subdirectory(lammpi)
|
||||
add_subdirectory(matlab)
|
||||
add_subdirectory(matrix)
|
||||
add_subdirectory(mpi)
|
||||
add_subdirectory(random)
|
||||
add_subdirectory(regex)
|
||||
add_subdirectory(rltree)
|
||||
@ -73,7 +71,3 @@ add_subdirectory(tries)
|
||||
install(FILES ${LIBRARY_PL}
|
||||
DESTINATION ${libpl}
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1908,7 +1908,7 @@ X_API int
|
||||
PL_skip_list(term_t list, term_t tail, size_t *len)
|
||||
{
|
||||
CACHE_REGS
|
||||
Term *l = Yap_AddressFromSlot(list PASS_REGS);
|
||||
Term *l = Yap_AddressFromSlot(list);
|
||||
Term *t;
|
||||
intptr_t length;
|
||||
|
||||
@ -2302,7 +2302,7 @@ PL_open_foreign_frame(void)
|
||||
#ifdef DEPTH_LIMIT
|
||||
cp_b->cp_depth = DEPTH;
|
||||
#endif /* DEPTH_LIMIT */
|
||||
cp_b->cp_a1 = MkIntTerm(Yap_StartSlots( PASS_REGS1 ));
|
||||
cp_b->cp_a1 = MkIntTerm(Yap_StartSlots());
|
||||
HB = HR;
|
||||
B = cp_b;
|
||||
ASP = (CELL *)B;
|
||||
@ -2381,7 +2381,7 @@ X_API qid_t PL_open_query(module_t ctx, int flags, predicate_t p, term_t t0)
|
||||
CACHE_REGS
|
||||
YAP_Term *t = NULL;
|
||||
if (t0)
|
||||
t = Yap_AddressFromSlot(t0 PASS_REGS);
|
||||
t = Yap_AddressFromSlot(t0);
|
||||
|
||||
/* ignore flags and module for now */
|
||||
qid_t new = (qid_t)Yap_AllocCodeSpace(sizeof(struct open_query_struct));
|
||||
|
@ -2,12 +2,12 @@
|
||||
set (MPI_SOURCES
|
||||
hash.c prologterms2c.c yap_mpi.c)
|
||||
|
||||
macro_optional_find_package(MPI ON)
|
||||
macro_optional_find_package(MPI ON)
|
||||
macro_log_feature (MPI_C_FOUND "Mpi"
|
||||
"Use Mpi System"
|
||||
"http://www.mpi.org" FALSE)
|
||||
|
||||
macro_log_feature (MPI_C_FOUND "Mpi"
|
||||
"Use Mpi System"
|
||||
"http://www.mpi.org" FALSE)
|
||||
if (MPI_C_FOUND)
|
||||
if (MPI_C_FOUND)
|
||||
# === Variables ===
|
||||
#
|
||||
# This module will set the following variables per language in your
|
||||
@ -69,7 +69,7 @@ if (MPI_C_FOUND)
|
||||
# program, EXECUTABLE is the MPI program, and ARGS are the arguments to
|
||||
# pass to the MPI program.
|
||||
#
|
||||
|
||||
|
||||
add_library (yap_mpi SHARED ${MPI_SOURCES})
|
||||
|
||||
target_link_libraries(yap_mpi libYap ${MPI_LIBRARIES})
|
||||
@ -77,9 +77,9 @@ if (MPI_C_FOUND)
|
||||
set_target_properties (yap_mpi PROPERTIES PREFIX "")
|
||||
|
||||
include_directories (${MPI_INCLUDE_DIRS})
|
||||
|
||||
|
||||
install(TARGETS yap_mpi
|
||||
LIBRARY DESTINATION ${dlls}
|
||||
)
|
||||
|
||||
|
||||
endif (MPI_C_FOUND)
|
||||
|
Reference in New Issue
Block a user