cmake & files
This commit is contained in:
parent
5f71b15c03
commit
edbd2654e8
@ -26,7 +26,7 @@ if (GECODE_FOUND)
|
|||||||
disjunctor.icc
|
disjunctor.icc
|
||||||
disjunctor.hh )
|
disjunctor.hh )
|
||||||
|
|
||||||
add_custom_target (gecodeyap ALL DEPENDS gecode${GECODE_MAJOR}_yap_hand_written.yap ${GECODE_VERSION}/gecode_yap_auto_generated.yap gecode
|
add_custom_target (gecodeyap ALL DEPENDS gecode${GECODE_MAJOR}_yap_hand_written.yap ${GECODE_VERSION}/gecode_yap_auto_generated.yap gecode_yap
|
||||||
) # WORKING_DIRECTORY ${CMAKE_BINARY_DIR} )
|
) # WORKING_DIRECTORY ${CMAKE_BINARY_DIR} )
|
||||||
|
|
||||||
# create a startup.yss on the top directory.
|
# create a startup.yss on the top directory.
|
||||||
@ -36,15 +36,15 @@ if (GECODE_FOUND)
|
|||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library (gecode SHARED ${GECODE_SOURCES})
|
add_library (gecode_yap SHARED ${GECODE_SOURCES})
|
||||||
|
|
||||||
target_link_libraries(gecode libYap ${GECODE_LIBRARIES})
|
target_link_libraries(gecode_yap libYap ${GECODE_LIBRARIES})
|
||||||
|
|
||||||
set_target_properties (gecode PROPERTIES PREFIX "")
|
set_target_properties (gecode_yap PROPERTIES PREFIX "")
|
||||||
|
|
||||||
include_directories (${GECODE_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${GECODE_VERSION})
|
include_directories (${GECODE_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${GECODE_VERSION})
|
||||||
|
|
||||||
install(TARGETS gecode
|
install(TARGETS gecode_yap
|
||||||
LIBRARY DESTINATION ${dlls}
|
LIBRARY DESTINATION ${dlls}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -76,10 +76,9 @@ extern "C"
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
gecode_space_write_handler
|
gecode_space_write_handler
|
||||||
(void *stream_, YAP_opaque_tag_t type, void *p, int flags)
|
(FILE *stream, YAP_opaque_tag_t type, void *p, int flags)
|
||||||
{
|
{
|
||||||
IOSTREAM* stream = (IOSTREAM*) stream_;
|
fprintf(stream,"<space %p>", p);
|
||||||
Sfprintf(stream,"<space %p>", p);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,6 +24,8 @@ using namespace Gecode;
|
|||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
|
void gecode_init(void);
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,7 +64,6 @@ namespace generic_gecode
|
|||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
#include "SWI-Stream.h"
|
|
||||||
#include "YapInterface.h"
|
#include "YapInterface.h"
|
||||||
|
|
||||||
static YAP_opaque_tag_t gecode_space_tag;
|
static YAP_opaque_tag_t gecode_space_tag;
|
||||||
@ -76,10 +77,9 @@ extern "C"
|
|||||||
|
|
||||||
static YAP_Bool
|
static YAP_Bool
|
||||||
gecode_space_write_handler
|
gecode_space_write_handler
|
||||||
(void *stream_, YAP_opaque_tag_t type, void *p, int flags)
|
(FILE *stream, YAP_opaque_tag_t type, void *p, int flags)
|
||||||
{
|
{
|
||||||
IOSTREAM* stream = (IOSTREAM*) stream_;
|
fprintf(stream,"<space %p>", p);
|
||||||
Sfprintf(stream,"<space %p>", p);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -565,10 +565,9 @@ extern "C"
|
|||||||
|
|
||||||
static YAP_Bool
|
static YAP_Bool
|
||||||
gecode_engine_write_handler
|
gecode_engine_write_handler
|
||||||
(void *stream_, YAP_opaque_tag_t type, void *p, int flags)
|
(FILE *stream, YAP_opaque_tag_t type, void *p, int flags)
|
||||||
{
|
{
|
||||||
IOSTREAM* stream = (IOSTREAM*) stream_;
|
fprintf(stream,"<engine %p>", p);
|
||||||
Sfprintf(stream,"<engine %p>", p);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -597,10 +596,9 @@ extern "C"
|
|||||||
|
|
||||||
static YAP_Bool
|
static YAP_Bool
|
||||||
gecode_disjunctor_write_handler
|
gecode_disjunctor_write_handler
|
||||||
(void *stream_, YAP_opaque_tag_t type, void *p, int flags)
|
(FILE *stream, YAP_opaque_tag_t type, void *p, int flags)
|
||||||
{
|
{
|
||||||
IOSTREAM* stream = (IOSTREAM*) stream_;
|
fprintf(stream,"<disjunctor %p>", p);
|
||||||
Sfprintf(stream,"<disjunctor %p>", p);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -616,10 +614,9 @@ extern "C"
|
|||||||
|
|
||||||
static YAP_Bool
|
static YAP_Bool
|
||||||
gecode_clause_write_handler
|
gecode_clause_write_handler
|
||||||
(void *stream_, YAP_opaque_tag_t type, void *p, int flags)
|
(FILE *stream_, YAP_opaque_tag_t type, void *p, int flags)
|
||||||
{
|
{
|
||||||
IOSTREAM* stream = (IOSTREAM*) stream_;
|
fprintf(stream,"<clause %p>", p);
|
||||||
Sfprintf(stream,"<clause %p>", p);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1553,10 +1550,9 @@ extern "C"
|
|||||||
|
|
||||||
static YAP_Bool
|
static YAP_Bool
|
||||||
gecode_reify_write_handler
|
gecode_reify_write_handler
|
||||||
(void *stream_, YAP_opaque_tag_t type, void *p, int flags)
|
(FILE *stream, YAP_opaque_tag_t type, void *p, int flags)
|
||||||
{
|
{
|
||||||
IOSTREAM* stream = (IOSTREAM*) stream_;
|
fprintf(stream,"<reify %p>", p);
|
||||||
Sfprintf(stream,"<reify %p>", p);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1591,10 +1587,9 @@ extern "C"
|
|||||||
|
|
||||||
static YAP_Bool
|
static YAP_Bool
|
||||||
gecode_tupleset_write_handler
|
gecode_tupleset_write_handler
|
||||||
(void *stream_, YAP_opaque_tag_t type, void *p, int flags)
|
(FILE *stream, YAP_opaque_tag_t type, void *p, int flags)
|
||||||
{
|
{
|
||||||
IOSTREAM* stream = (IOSTREAM*) stream_;
|
fprintf(stream,"<tupleset %p>", p);
|
||||||
Sfprintf(stream,"<tupleset %p>", p);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1640,10 +1635,9 @@ extern "C"
|
|||||||
|
|
||||||
static YAP_Bool
|
static YAP_Bool
|
||||||
gecode_dfa_write_handler
|
gecode_dfa_write_handler
|
||||||
(void *stream_, YAP_opaque_tag_t type, void *p, int flags)
|
(FILE *stream, YAP_opaque_tag_t type, void *p, int flags)
|
||||||
{
|
{
|
||||||
IOSTREAM* stream = (IOSTREAM*) stream_;
|
fprintf(stream,"<dfa %p>", p);
|
||||||
Sfprintf(stream,"<dfa %p>", p);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user