cmake & files

This commit is contained in:
Vítor Santos Costa 2015-06-19 01:25:12 +01:00
parent 5f71b15c03
commit edbd2654e8
3 changed files with 23 additions and 30 deletions

View File

@ -26,7 +26,7 @@ if (GECODE_FOUND)
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
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} )
# create a startup.yss on the top directory.
@ -36,15 +36,15 @@ if (GECODE_FOUND)
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})
install(TARGETS gecode
install(TARGETS gecode_yap
LIBRARY DESTINATION ${dlls}
)

View File

@ -76,10 +76,9 @@ extern "C"
static int
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_;
Sfprintf(stream,"<space %p>", p);
fprintf(stream,"<space %p>", p);
return TRUE;
}

View File

@ -24,6 +24,8 @@ using namespace Gecode;
extern "C"
{
void gecode_init(void);
#include "config.h"
}
@ -62,7 +64,6 @@ namespace generic_gecode
extern "C"
{
#include "SWI-Stream.h"
#include "YapInterface.h"
static YAP_opaque_tag_t gecode_space_tag;
@ -76,10 +77,9 @@ extern "C"
static YAP_Bool
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_;
Sfprintf(stream,"<space %p>", p);
fprintf(stream,"<space %p>", p);
return TRUE;
}
@ -565,10 +565,9 @@ extern "C"
static YAP_Bool
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_;
Sfprintf(stream,"<engine %p>", p);
fprintf(stream,"<engine %p>", p);
return TRUE;
}
@ -597,10 +596,9 @@ extern "C"
static YAP_Bool
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_;
Sfprintf(stream,"<disjunctor %p>", p);
fprintf(stream,"<disjunctor %p>", p);
return TRUE;
}
@ -616,10 +614,9 @@ extern "C"
static YAP_Bool
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_;
Sfprintf(stream,"<clause %p>", p);
fprintf(stream,"<clause %p>", p);
return TRUE;
}
@ -1553,10 +1550,9 @@ extern "C"
static YAP_Bool
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_;
Sfprintf(stream,"<reify %p>", p);
fprintf(stream,"<reify %p>", p);
return TRUE;
}
@ -1591,10 +1587,9 @@ extern "C"
static YAP_Bool
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_;
Sfprintf(stream,"<tupleset %p>", p);
fprintf(stream,"<tupleset %p>", p);
return TRUE;
}
@ -1640,10 +1635,9 @@ extern "C"
static YAP_Bool
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_;
Sfprintf(stream,"<dfa %p>", p);
fprintf(stream,"<dfa %p>", p);
return TRUE;
}