foreign files
This commit is contained in:
parent
e97eb4696e
commit
143684731e
@ -12,6 +12,10 @@ cmake_minimum_required(VERSION 2.8)
|
|||||||
# set path to additional CMake modules
|
# set path to additional CMake modules
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
|
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
|
||||||
|
|
||||||
|
include(disallow)
|
||||||
|
|
||||||
|
disallow_intree_builds()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# set(CMAKE_BUILD_TYPE Debug)
|
# set(CMAKE_BUILD_TYPE Debug)
|
||||||
@ -114,6 +118,7 @@ add_library(libYap
|
|||||||
$<TARGET_OBJECTS:libYAPOs>
|
$<TARGET_OBJECTS:libYAPOs>
|
||||||
$<TARGET_OBJECTS:libOPTYap>
|
$<TARGET_OBJECTS:libOPTYap>
|
||||||
$<TARGET_OBJECTS:myddas>
|
$<TARGET_OBJECTS:myddas>
|
||||||
|
$<TARGET_OBJECTS:libswi>
|
||||||
)
|
)
|
||||||
|
|
||||||
set_property(DIRECTORY PROPERTY CXX_STANDARD 11)
|
set_property(DIRECTORY PROPERTY CXX_STANDARD 11)
|
||||||
@ -411,7 +416,7 @@ add_subDIRECTORY (packages/raptor)
|
|||||||
|
|
||||||
add_subDIRECTORY (packages/xml)
|
add_subDIRECTORY (packages/xml)
|
||||||
|
|
||||||
add_subDIRECTORY (docs)
|
# add_subDIRECTORY (docs)
|
||||||
|
|
||||||
# add_subDIRECTORY (packages/cuda)
|
# add_subDIRECTORY (packages/cuda)
|
||||||
|
|
||||||
|
@ -79,8 +79,6 @@ set (ENGINE_SOURCES
|
|||||||
C/utilpreds.c
|
C/utilpreds.c
|
||||||
C/yap-args.c
|
C/yap-args.c
|
||||||
C/write.c
|
C/write.c
|
||||||
library/dialect/swi/fli/swi.c
|
|
||||||
library/dialect/swi/fli/blobs.c
|
|
||||||
C/udi.c
|
C/udi.c
|
||||||
#packages/udi/rtree.c
|
#packages/udi/rtree.c
|
||||||
#packages/udi/rtree_udi.c
|
#packages/udi/rtree_udi.c
|
||||||
@ -161,7 +159,6 @@ set(C_INTERFACE_SOURCES
|
|||||||
CXX/yapdb.hh
|
CXX/yapdb.hh
|
||||||
CXX/yapi.hh
|
CXX/yapi.hh
|
||||||
BEAM/eam.h BEAM/eamamasm.h
|
BEAM/eam.h BEAM/eamamasm.h
|
||||||
library/dialect/swi/fli/swi.h
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1913,7 +1913,15 @@ signal. */
|
|||||||
|
|
||||||
/* library search variable */
|
/* library search variable */
|
||||||
#ifndef SO_PATH
|
#ifndef SO_PATH
|
||||||
#define SO_PATH "${dlls}"
|
#ifdef __APPLE__
|
||||||
|
#define SO_PATH "DYLD_LIBRARY_PATH"
|
||||||
|
#elif _WIN32
|
||||||
|
#define SO_PATH "PATH"
|
||||||
|
#elif __unix__
|
||||||
|
#define SO_PATH "LD_LIBRARY_PATH"
|
||||||
|
#else
|
||||||
|
#define SO_PATH NULL
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* enable condor distributed execution, static compilation */
|
/* enable condor distributed execution, static compilation */
|
||||||
|
@ -4,6 +4,7 @@ set (SDIALECTS_PL
|
|||||||
syspred_options.pl
|
syspred_options.pl
|
||||||
)
|
)
|
||||||
|
|
||||||
|
add_SubDirectory( fli )
|
||||||
|
|
||||||
install(FILES ${SDIALECTS_PL}
|
install(FILES ${SDIALECTS_PL}
|
||||||
DESTINATION ${libpl}/dialect/swi
|
DESTINATION ${libpl}/dialect/swi
|
||||||
|
@ -1,24 +1,25 @@
|
|||||||
|
|
||||||
set (LIBSWIFLI_SOURCES
|
set (LIBSWI_SOURCES
|
||||||
swi.c blobs.c)
|
swi.c blobs.c)
|
||||||
|
|
||||||
set (POSITION_INDEPENDENT_CODE TRUE)
|
set (POSITION_INDEPENDENT_CODE TRUE)
|
||||||
|
|
||||||
add_library (libSWIFLi OBJECT
|
add_library (libswi OBJECT
|
||||||
${LIBSWIFLI_SOURCES})
|
${LIBSWI_SOURCES})
|
||||||
|
|
||||||
set_target_properties(libSWIFLi
|
set_target_properties(libswi
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
# RPATH ${libdir} VERSION ${LIBYAPTAI_FULL_VERSION}
|
# RPATH ${libdir} VERSION ${LIBYAPTAI_FULL_VERSION}
|
||||||
# SOVERSION ${LIBYAPTAI_MAJOR_VERSION}.${LIBYAPTAI_MINOR_VERSION}
|
# SOVERSION ${LIBYAPTAI_MAJOR_VERSION}.${LIBYAPTAI_MINOR_VERSION}
|
||||||
POSITION_INDEPENDENT_CODE TRUE
|
POSITION_INDEPENDENT_CODE ON
|
||||||
OUTPUT_NAME swiFLI
|
|
||||||
)
|
)
|
||||||
|
|
||||||
include_directories (../../../H ../.../../include ../os ${CMAKE_BINARY_DIR} ${GMP_INCLUDE_DIR})
|
include_directories (../../../H ../.../../include ../os ${CMAKE_BINARY_DIR} ${GMP_INCLUDE_DIR})
|
||||||
|
|
||||||
target_link_libraries( libYap)
|
target_link_libraries( libYap)
|
||||||
|
|
||||||
|
set (YAP_SWILIB $<TARGET_FILE_NAME:libswi> )
|
||||||
|
|
||||||
set( CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${GMP_INCLUDE_DIR} )
|
set( CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${GMP_INCLUDE_DIR} )
|
||||||
#set( CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${GMP_LIBRARIES} )
|
#set( CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${GMP_LIBRARIES} )
|
||||||
|
|
||||||
|
@ -35,7 +35,6 @@
|
|||||||
directory_files/2,
|
directory_files/2,
|
||||||
environ/2,
|
environ/2,
|
||||||
exec/3,
|
exec/3,
|
||||||
file_exists/1,
|
|
||||||
file_exists/2,
|
file_exists/2,
|
||||||
file_property/2,
|
file_property/2,
|
||||||
host_id/1,
|
host_id/1,
|
||||||
|
@ -1435,8 +1435,8 @@ static Int p_file_expansion(USES_REGS1) { /* '$file_expansion'(+File,-Name) */
|
|||||||
Term file_name = Deref(ARG1);
|
Term file_name = Deref(ARG1);
|
||||||
|
|
||||||
/* we know file_name is bound */
|
/* we know file_name is bound */
|
||||||
if (!IsAtomTerm(file_name)) {
|
if (IsVarTerm(file_name)) {
|
||||||
PlIOError(TYPE_ERROR_ATOM, file_name, "absolute_file_name/3");
|
PlIOError(INSTANTIATION_ERROR, file_name, "absolute_file_name/3");
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
if (!Yap_TrueFileName(RepAtom(AtomOfTerm(file_name))->StrOfAE,
|
if (!Yap_TrueFileName(RepAtom(AtomOfTerm(file_name))->StrOfAE,
|
||||||
|
@ -11,31 +11,31 @@ macro_log_feature (Java_Development_FOUND "Java"
|
|||||||
"http://www.java.org" FALSE)
|
"http://www.java.org" FALSE)
|
||||||
|
|
||||||
if (Java_Development_FOUND)
|
if (Java_Development_FOUND)
|
||||||
|
|
||||||
|
find_package(JNI)
|
||||||
|
include(UseJava)
|
||||||
|
|
||||||
|
#
|
||||||
# Java_JAVA_EXECUTABLE = the full path to the Java runtime
|
# Java_JAVA_EXECUTABLE = the full path to the Java runtime
|
||||||
# Java_JAVAC_EXECUTABLE = the full path to the Java compiler
|
# Java_JAVAC_EXECUTABLE = the full path to the Java compiler
|
||||||
# Java_JAVAH_EXECUTABLE = the full path to the Java header generator
|
# Java_JAVAH_EXECUTABLE = the full path to the Java header generator
|
||||||
# Java_JAVADOC_EXECUTABLE = the full path to the Java documention generator
|
# Java_JAVADOC_EXECUTABLE = the full path to the Java documention generator
|
||||||
|
# Java_IDLJ_EXECUTABLE = the full path to the Java idl compiler
|
||||||
# Java_JAR_EXECUTABLE = the full path to the Java archiver
|
# Java_JAR_EXECUTABLE = the full path to the Java archiver
|
||||||
|
# Java_JARSIGNER_EXECUTABLE = the full path to the Java jar signer
|
||||||
# Java_VERSION_STRING = Version of java found, eg. 1.6.0_12
|
# Java_VERSION_STRING = Version of java found, eg. 1.6.0_12
|
||||||
# Java_VERSION_MAJOR = The major version of the package found.
|
# Java_VERSION_MAJOR = The major version of the package found.
|
||||||
# Java_VERSION_MINOR = The minor version of the package found.
|
# Java_VERSION_MINOR = The minor version of the package found.
|
||||||
# Java_VERSION_PATCH = The patch version of the package found.
|
# Java_VERSION_PATCH = The patch version of the package found.
|
||||||
# Java_VERSION_TWEAK = The tweak version of the package found (after '_')
|
# Java_VERSION_TWEAK = The tweak version of the package found (after '_')
|
||||||
# Java_VERSION = This is set to: $major.$minor.$patch(.$tweak)
|
# Java_VERSION = This is set to: $major.$minor.$patch(.$tweak)
|
||||||
# JAVA_LIBRARIES - path to the java library
|
|
||||||
# JAVA_INCLUDE_PATH - path to where Java.h is found (deprecated)
|
|
||||||
# JAVA_INCLUDE_DIRS - path to where Java.h is found
|
|
||||||
# JAVA_DEBUG_LIBRARIES - path to the debug library (deprecated)
|
|
||||||
# JAVALIBS_VERSION_STRING - version of the Java libs found (since CMake 2.8.8)
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#
|
#
|
||||||
# The Java_ADDITIONAL_VERSIONS variable can be used to specify a list
|
# The Java_ADDITIONAL_VERSIONS variable can be used to specify a list
|
||||||
# of version numbers that should be taken into account when searching
|
# of version numbers that should be taken into account when searching
|
||||||
# for Java. You need to set this variable before calling
|
# for Java. You need to set this variable before calling
|
||||||
# find_package(JavaLibs).
|
# find_package(JavaLibs).
|
||||||
#
|
#
|
||||||
macro_optional_find_package(JNI ON)
|
#macro_optional_find_package(JNI ON)
|
||||||
# JNI_INCLUDE_DIRS = the include dirs to use
|
# JNI_INCLUDE_DIRS = the include dirs to use
|
||||||
# JNI_LIBRARIES = the libraries to use
|
# JNI_LIBRARIES = the libraries to use
|
||||||
# JNI_FOUND = TRUE if JNI headers and libraries were found.
|
# JNI_FOUND = TRUE if JNI headers and libraries were found.
|
||||||
@ -45,23 +45,10 @@ if (Java_Development_FOUND)
|
|||||||
# JAVA_INCLUDE_PATH2 = the include path to jni_md.h
|
# JAVA_INCLUDE_PATH2 = the include path to jni_md.h
|
||||||
# JAVA_AWT_INCLUDE_PATH = the include path to jawt.h
|
# JAVA_AWT_INCLUDE_PATH = the include path to jawt.h
|
||||||
|
|
||||||
add_library (jplYap SHARED src/c/jpl.c)
|
add_subdirectory (src/c)
|
||||||
|
|
||||||
add_subdirectory (src/java)
|
add_subdirectory (src/java)
|
||||||
|
|
||||||
include_directories (${JAVA_INCLUDE_DIRS} ${JNI_INCLUDE_DIRS})
|
|
||||||
|
|
||||||
target_link_libraries(jplYap libYap ${JAVA_LIBRARIES} ${JNI_LIBRARIES})
|
|
||||||
|
|
||||||
set_target_properties(jplYap PROPERTIES
|
|
||||||
OUTPUT_NAME jpl )
|
|
||||||
|
|
||||||
set(YAP_SYSTEM_OPTIONS "jpl " ${YAP_SYSTEM_OPTIONS} PARENT_SCOPE)
|
|
||||||
|
|
||||||
install(TARGETS jplYap
|
|
||||||
LIBRARY DESTINATION ${dlls}
|
|
||||||
)
|
|
||||||
|
|
||||||
install(FILES jpl.pl
|
install(FILES jpl.pl
|
||||||
DESTINATION ${libpl}
|
DESTINATION ${libpl}
|
||||||
)
|
)
|
||||||
|
@ -4488,8 +4488,8 @@ search_path_separator(:).
|
|||||||
% we do not check for that.
|
% we do not check for that.
|
||||||
|
|
||||||
check_java_environment :-
|
check_java_environment :-
|
||||||
check_lib(java),
|
check_lib(jvm),
|
||||||
check_lib(jvm).
|
check_lib(java).
|
||||||
|
|
||||||
check_lib(Name) :-
|
check_lib(Name) :-
|
||||||
check_shared_object(Name, File, EnvVar, Absolute),
|
check_shared_object(Name, File, EnvVar, Absolute),
|
||||||
@ -4666,13 +4666,17 @@ java_home(Home) :-
|
|||||||
atomic_list_concat([Key0, Version], /, Key),
|
atomic_list_concat([Key0, Version], /, Key),
|
||||||
win_registry_get_value(Key, 'JavaHome', WinHome),
|
win_registry_get_value(Key, 'JavaHome', WinHome),
|
||||||
prolog_to_os_filename(Home, WinHome),
|
prolog_to_os_filename(Home, WinHome),
|
||||||
exists_directory(Home), !.
|
exists_directory(Home).
|
||||||
:- else.
|
:- else.
|
||||||
java_home(Home) :-
|
java_home(Home) :-
|
||||||
member(Home, [ '/usr/lib/java',
|
member(Home, [ '/usr/lib/java',
|
||||||
'/usr/local/lib/java'
|
'/usr/lib/jvm',
|
||||||
|
'/usr/lib/jvm/jre',
|
||||||
|
'/usr/local/lib/java',
|
||||||
|
'/usr/local/lib/jvm',
|
||||||
|
'/usr/local/lib/jvm/jre'
|
||||||
]),
|
]),
|
||||||
exists_directory(Home), !.
|
exists_directory(Home).
|
||||||
:- endif.
|
:- endif.
|
||||||
|
|
||||||
:- dynamic
|
:- dynamic
|
||||||
|
@ -6,10 +6,10 @@ include_directories (${JAVA_INCLUDE_DIRS} ${JNI_INCLUDE_DIRS} )
|
|||||||
target_link_libraries(jplYap libYap ${JNI_LIBRARIES} ${JAVA_LIBRARIES})
|
target_link_libraries(jplYap libYap ${JNI_LIBRARIES} ${JAVA_LIBRARIES})
|
||||||
|
|
||||||
set_target_properties(jplYap PROPERTIES
|
set_target_properties(jplYap PROPERTIES
|
||||||
OUTPUT_NAME jpl )
|
OUTPUT_NAME jpl
|
||||||
|
INSTALL_RPATH_USE_LINK_PATH TRUE )
|
||||||
set(YAP_SYSTEM_OPTIONS "jpl " ${YAP_SYSTEM_OPTIONS} PARENT_SCOPE)
|
|
||||||
|
|
||||||
|
# set(YAP_SYSTEM_OPTIONS "jpl " ${YAP_SYSTEM_OPTIONS} PARENT_SCOPE)
|
||||||
install(TARGETS jplYap
|
install(TARGETS jplYap
|
||||||
LIBRARY DESTINATION ${dlls}
|
LIBRARY DESTINATION ${dlls}
|
||||||
)
|
)
|
||||||
|
@ -1969,7 +1969,7 @@ jni_ensure_jvm_plc(void)
|
|||||||
|
|
||||||
|
|
||||||
#if __YAP_PROLOG__
|
#if __YAP_PROLOG__
|
||||||
#include "hacks.c"
|
#include "hacks.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* NB after any JNI call which clearly indicates success, */
|
/* NB after any JNI call which clearly indicates success, */
|
||||||
|
@ -49,12 +49,12 @@
|
|||||||
op(100, fy, '.')
|
op(100, fy, '.')
|
||||||
]).
|
]).
|
||||||
|
|
||||||
|
|
||||||
:- use_module(library(shlib)).
|
:- use_module(library(shlib)).
|
||||||
:- use_module(library(lists)).
|
:- use_module(library(lists)).
|
||||||
:- use_module(library(apply_macros)).
|
:- use_module(library(apply_macros)).
|
||||||
:- use_module(library(charsio)).
|
:- use_module(library(charsio)).
|
||||||
:- use_module(library(readutil)).
|
:- use_module(library(readutil)).
|
||||||
:- use_module(library(debug)).
|
|
||||||
|
|
||||||
:- dynamic( real:r_started/1 ).
|
:- dynamic( real:r_started/1 ).
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ xc/*************************************************************************
|
|||||||
% This protects all code from further changes
|
% This protects all code from further changes
|
||||||
% and also makes it impossible from some predicates to be seen
|
% and also makes it impossible from some predicates to be seen
|
||||||
'$protect' :-
|
'$protect' :-
|
||||||
'$current_predicate'(Name,M,P,_),riteln(P),
|
'$current_predicate'(Name,M,P,_),
|
||||||
M \= user,
|
M \= user,
|
||||||
functor(P,Name,Arity),
|
functor(P,Name,Arity),
|
||||||
'$new_system_predicate'(Name,Arity,M),
|
'$new_system_predicate'(Name,Arity,M),
|
||||||
|
@ -318,6 +318,9 @@ qend_program :-
|
|||||||
prompt(_,'| '),
|
prompt(_,'| '),
|
||||||
catch(once(user:G),Error,user:'$Error'(Error)),
|
catch(once(user:G),Error,user:'$Error'(Error)),
|
||||||
fail.
|
fail.
|
||||||
|
'$init_from_saved_state_and_args' :-
|
||||||
|
'$protect',
|
||||||
|
fail.
|
||||||
'$init_from_saved_state_and_args'.
|
'$init_from_saved_state_and_args'.
|
||||||
|
|
||||||
'$init_path_extensions' :-
|
'$init_path_extensions' :-
|
||||||
@ -371,6 +374,9 @@ qend_program :-
|
|||||||
call(db_open(mysql,myddas,Host/Db,User,Pass)),
|
call(db_open(mysql,myddas,Host/Db,User,Pass)),
|
||||||
'$myddas_import_all',
|
'$myddas_import_all',
|
||||||
fail.
|
fail.
|
||||||
|
'$startup_goals' :-
|
||||||
|
'$protect',
|
||||||
|
fail.
|
||||||
'$startup_goals'.
|
'$startup_goals'.
|
||||||
|
|
||||||
%
|
%
|
||||||
|
Reference in New Issue
Block a user