support interface to minisat2.

This commit is contained in:
Vítor Santos Costa 2015-11-09 11:28:44 +00:00
parent 1d66c45fc2
commit 6975c60645
4 changed files with 71 additions and 1 deletions

View File

@ -0,0 +1,51 @@
#cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
set ( MINISAT2_HEADERS
Alg.h
BasicHeap.h
BoxedVec.h
Heap.h
Map.h
Queue.h
Solver.h
SolverTypes.h
Sort.h
Vec.h
)
set ( MINISAT2_SOURCES
Solver.C
pl-minisat.C
)
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}
)
ADD_LIBRARY(minisat2 SHARED ${MINISAT2_SOURCES} ${MINISAT2_HEADERS} )
set_target_properties (minisat2 PROPERTIES OUTPUT_NAME pl-minisat)
set_target_properties (minisat2 PROPERTIES PREFIX "")
if(DEFINED YAP_MAJOR_VERSION)
TARGET_LINK_LIBRARIES(minisat2
libYap
)
else()
ADD_LIBRARY(minisat2 SHARED ${MINISAT2_SOURCES} )
endif()
#set_property(TARGET minisat2 PROPERTY CXX_STANDARD 11)
#set_property(TARGET minisat2 PROPERTY CXX_STANDARD_REQUIRED ON)
install (
TARGETS minisat2
RUNTIME DESTINATION ${bindir}
ARCHIVE DESTINATION ${libdir}
LIBRARY DESTINATION ${dlls}
)

View File

@ -1,4 +1,4 @@
#include <SWI-Stream.h>
//#include <SWI-Stream.h>
#include <SWI-Prolog.h>
#include <stdio.h>
#include <assert.h>

View File

@ -0,0 +1,18 @@
set (PROGRAMS
cnf.pl
minisat.pl
)
set (EXAMPLE_PROGRAMS
examples/adder.pl
examples/pearl_examples.pl
)
install(FILES
${PROGRAMS}
DESTINATION ${libpl}
)
add_subDIRECTORY (C)

View File

@ -41,6 +41,7 @@
maximize_v3/2
]).
:- use_module(library(shlib)).
:- use_module(library(lists)).