make fixes
- options to use WITH - FIX RPATH ON MAC - newer Find - bdd exports to cplint
This commit is contained in:
parent
c450a712d0
commit
d66db4cf70
165
CMakeLists.txt
165
CMakeLists.txt
@ -167,7 +167,7 @@ SET(CMAKE_SKIP_BUILD_RPATH FALSE)
|
||||
# (but later on when installing)
|
||||
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
||||
|
||||
SET(CMAKE_INSTALL_RPATH "${dlls}:${libdir}")
|
||||
SET(CMAKE_INSTALL_RPATH "${libdir};${dlls}:")
|
||||
|
||||
# add the automatically determined parts of the RPATH
|
||||
# which point to directories outside the build tree to the install RPATH
|
||||
@ -175,9 +175,9 @@ SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
|
||||
|
||||
# the RPATH to be used when installing, but only if it's not a system directory
|
||||
LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
|
||||
LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${libdir};${dlls}" isSystemDir)
|
||||
IF("${isSystemDir}" STREQUAL "-1")
|
||||
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
SET(CMAKE_INSTALL_RPATH "${libdir};${dlls}")
|
||||
ENDIF("${isSystemDir}" STREQUAL "-1")
|
||||
|
||||
|
||||
@ -240,10 +240,10 @@ message(STATUS "Running with CMAKE_C_FLAGS ${CMAKE_C_FLAGS}")
|
||||
|
||||
if (HAVE_GCC)
|
||||
# replace instructions codes by the address of their code
|
||||
option (USE_THREADED_CODE "threaded code" ON)
|
||||
if (USE_THREADED_CODE)
|
||||
option (WITH_THREADED_CODE "threaded code" ON)
|
||||
if (WITH_THREADED_CODE)
|
||||
set_property( DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS THREADED_CODE=1)
|
||||
endif (USE_THREADED_CODE)
|
||||
endif (WITH_THREADED_CODE)
|
||||
endif (HAVE_GCC)
|
||||
|
||||
#
|
||||
@ -251,14 +251,12 @@ set (BUILD_SHARED_LIBS ON)
|
||||
|
||||
#option (YAP_SWI_IO ON)
|
||||
|
||||
|
||||
|
||||
CMAKE_DEPENDENT_OPTION (USE_CALL_TRACER
|
||||
"support for procedure-call tracing" ON "CMAKE_BUILD_TYPE=DEBUG" OFF )
|
||||
OPTION (WITH_CALL_TRACER
|
||||
"support for procedure-call tracing" ON)
|
||||
#TODO:
|
||||
if (USE_CALL_TRACER)
|
||||
set_target_properties(libYap PUBLIC PROPERTIES APPEND COMPILE_DEFINITIONS $<$<CONFIG:Debug>:LOW_LEVEL_TRACER=1>)
|
||||
endif (USE_CALL_TRACER)
|
||||
if (WITH_CALL_TRACER)
|
||||
set_property( DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:Debug>:LOW_LEVEL_TRACER=1> )
|
||||
endif (WITH_CALL_TRACER)
|
||||
|
||||
#set( CMAKE_REQUIRED_LIBRARIES ${READLINE_LIBS} ${CMAKE_REQUIRED_LIBRARIES} )
|
||||
#target_link_libraries(libYap ${READLINE_LIBS})
|
||||
@ -268,34 +266,27 @@ endif (USE_CALL_TRACER)
|
||||
#available at the Julia project
|
||||
include_directories ( utf8proc )
|
||||
set_property( DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS UTF8PROC=1)
|
||||
add_subDIRECTORY ( utf8proc )
|
||||
ADD_SUBDIRECTORY ( utf8proc )
|
||||
|
||||
|
||||
option (USE_GMP "Use Multiprecision Library" ON)
|
||||
if (USE_GMP)
|
||||
find_package (GMP)
|
||||
macro_log_feature (GMP_FOUND
|
||||
"libgmp"
|
||||
"GNU big integers and rationals"
|
||||
"http://gmplib.org")
|
||||
if (GMP_FOUND)
|
||||
include_directories (${GMP_INCLUDE_DIR})
|
||||
macro_optional_find_package (GMP ON)
|
||||
macro_log_feature (GMP_FOUND
|
||||
"libgmp"
|
||||
"GNU big integers and rationals"
|
||||
"http://gmplib.org")
|
||||
if (GMP_FOUND)
|
||||
include_directories (${GMP_INCLUDE_DIR})
|
||||
#add_executable(test ${SOURCES})
|
||||
target_link_libraries(libYap ${GMP_LIBRARIES})
|
||||
#config.h needs this (TODO: change in code latter)
|
||||
set( CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${GMP_INCLUDE_DIR} )
|
||||
#set( CMAKE_REQUIRED_LIBRARIES ${GMP_LIBRARIES} ${CMAKE_REQUIRED_LIBRARIES} )
|
||||
endif (GMP_FOUND)
|
||||
endif(USE_GMP)
|
||||
|
||||
|
||||
macro_optional_find_package (Threads OFF)
|
||||
macro_log_feature (THREADS_FOUND "Threads Support"
|
||||
"GNU Threads Library (or similar)"
|
||||
"http://www.gnu.org/software/threads")
|
||||
CMAKE_DEPENDENT_OPTION (USE_THREADS
|
||||
"support system threads" OFF "THREADS_FOUND" OFF)
|
||||
if (USE_THREADS)
|
||||
if (WITH_Threads)
|
||||
#
|
||||
# CMAKE_THREAD_LIBS_INIT - the thread library
|
||||
# CMAKE_USE_SPROC_INIT - are we using sproc?
|
||||
@ -335,20 +326,19 @@ if (USE_THREADS)
|
||||
# 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.
|
||||
else()
|
||||
endif (USE_THREADS)
|
||||
endif (WITH_Threads)
|
||||
|
||||
CMAKE_DEPENDENT_OPTION (USE_MAX_THREADS 1024
|
||||
"maximum number of threads" "USE_THREADS" 1)
|
||||
CMAKE_DEPENDENT_OPTION (WITH_MAX_Threads 1024
|
||||
"maximum number of threads" "WITH_MAX_Threads" 1)
|
||||
|
||||
CMAKE_DEPENDENT_OPTION (USE_MAX_WORKERS 64
|
||||
"maximum number of or-parallel workers" "USE_THREADS" 1)
|
||||
CMAKE_DEPENDENT_OPTION (WITH_MAX_Workers 64
|
||||
"maximum number of or-parallel workers" "WITH_MAX_Workers" 1)
|
||||
|
||||
cmake_dependent_option (USE_USE_PTHREAD_LOCKING
|
||||
cmake_dependent_option (WITH_Pthread_Locking
|
||||
"use pthread locking primitives for internal locking" ON
|
||||
"USE_THREADS" OFF)
|
||||
"WITH_ThreadsS" OFF)
|
||||
|
||||
IF(USE_USE_PTHREAD_LOCKING)
|
||||
IF(WITH_Pthread_Lockin)
|
||||
set_DIRECTORY_properties(PROPERTIES APPEND COMPILE_DEFINITIONS USE_PTHREAD_LOCKING=1)
|
||||
ENDIF()
|
||||
|
||||
@ -361,10 +351,8 @@ ENDIF()
|
||||
#
|
||||
add_subDIRECTORY (OPTYap)
|
||||
|
||||
option (USE_MYDDAS "MYDDAS High-Level Data-base interface" ON)
|
||||
if (USE_MYDDAS)
|
||||
#add_subDIRECTORY (packages/myddas)
|
||||
endif (USE_MYDDAS)
|
||||
|
||||
|
||||
add_subDIRECTORY (os)
|
||||
|
||||
@ -379,73 +367,36 @@ ADD_SUBDIRECTORY(swi/library)
|
||||
# ADD_SUBDIRECTORY(os)
|
||||
# ADD_SUBDIRECTORY(packages)
|
||||
|
||||
option (USE_JIT
|
||||
option (WITH_JIT
|
||||
"just in Time Clause Compilation" OFF)
|
||||
if (USE_JIT)
|
||||
if (WITH_JIT)
|
||||
add_subDIRECTORY(JIT)
|
||||
endif (USE_JIT)
|
||||
endif (WITH_JIT)
|
||||
|
||||
macro_optional_add_subDIRECTORY(library/mpi)
|
||||
|
||||
option (USE_GECODE "Generic Constraint Development Environment (GECODE) library" ON)
|
||||
if (USE_GECODE)
|
||||
add_subDIRECTORY (packages/gecode)
|
||||
endif (USE_GECODE)
|
||||
|
||||
option (USE_REAL "Prolog->R interface" ON)
|
||||
if (USE_REAL)
|
||||
add_subDIRECTORY (packages/real)
|
||||
endif (USE_REAL)
|
||||
|
||||
option (USE_PYTHON "Prolog->Python interface" ON)
|
||||
if (USE_PYTHON)
|
||||
add_subDIRECTORY (packages/python)
|
||||
endif (USE_PYTHON)
|
||||
|
||||
#add_subDIRECTORY (packages/archive)
|
||||
option (USE_JPL "Prolog<->Python interface" ON)
|
||||
if (USE_JPL)
|
||||
add_subDIRECTORY (packages/jpl)
|
||||
endif (USE_JPL)
|
||||
|
||||
option (USE_SWIG "ON")
|
||||
if (USE_SWIG)
|
||||
add_subDIRECTORY (packages/swig)
|
||||
endif (USE_SWIG)
|
||||
|
||||
option (USE_BDD "ON")
|
||||
if (USE_BDD)
|
||||
add_subDIRECTORY (packages/bdd)
|
||||
endif (USE_BDD)
|
||||
|
||||
option (USE_CLPBN "ON")
|
||||
if (USE_CLPBN)
|
||||
add_subDIRECTORY (packages/CLPBN)
|
||||
endif (USE_CLPBN)
|
||||
|
||||
option (USE_HORUS "enable HORUS graphical model tookit" "ON")
|
||||
if (USE_HORUS)
|
||||
add_subDIRECTORY (packages/CLPBN/horus)
|
||||
endif (USE_HORUS)
|
||||
|
||||
option (USE_PROBLOG "ON")
|
||||
if (USE_PROBLOG)
|
||||
add_subDIRECTORY (packages/cplint)
|
||||
add_subDIRECTORY (packages/ProbLog)
|
||||
endif (USE_PROBLOG)
|
||||
|
||||
option (USE_RAPTOR "ON")
|
||||
if (USE_RAPTOR)
|
||||
add_subDIRECTORY (packages/CLPBN)
|
||||
|
||||
|
||||
|
||||
add_subDIRECTORY (packages/CLPBN/horus)
|
||||
|
||||
|
||||
add_subDIRECTORY (packages/raptor)
|
||||
endif (USE_RAPTOR)
|
||||
|
||||
option (USE_CUDA "ON")
|
||||
if (USE_CUDA)
|
||||
# add_subDIRECTORY (packages/cuda)
|
||||
endif(USE_CUDA)
|
||||
|
||||
#add_subDIRECTORY (packages/prosqlite)
|
||||
|
||||
#add_subDIRECTORY (packages/zlib)
|
||||
|
||||
#todo: use cmake target builds
|
||||
# option (USE_MAXPERFORMANCE
|
||||
@ -463,32 +414,32 @@ endif(USE_CUDA)
|
||||
# option (USE_CYGWIN
|
||||
# "use cygwin library in WIN32" OFF)
|
||||
|
||||
option (USE_PRISM
|
||||
option (WITH_PRISM
|
||||
"use PRISM system in YAP" ON)
|
||||
#TODO:
|
||||
|
||||
option (USE_YAP_DLL
|
||||
option (WITH_YAP_DLL
|
||||
"compile YAP as a DLL" ON)
|
||||
#TODO:
|
||||
|
||||
option (USE_YAP_STATIC
|
||||
option (WITH_YAP_STATIC
|
||||
"compile YAP statically" OFF)
|
||||
#TODO:
|
||||
|
||||
# modern systems do this.
|
||||
set ( MALLOC_T "void *" )
|
||||
CMAKE_DEPENDENT_OPTION (USE_SYSTEM_MALLOC
|
||||
"use malloc to allocate memory" ON "NOT USE_COPY_OR_PARALELISM" OFF)
|
||||
CMAKE_DEPENDENT_OPTION (USE_DL_MALLOC
|
||||
"use malloc to allocate memory" ON "NOT USE_SYSTEM_MALLOC" OFF)
|
||||
CMAKE_DEPENDENT_OPTION (USE_YAP_MALLOC
|
||||
"use malloc to allocate memory" ON "NOT USE_SYSTEM_MALLOC;NOT USE_DL_MALLOC" OFF)
|
||||
CMAKE_DEPENDENT_OPTION (WITH_SYSTEM_MALLOC
|
||||
"use malloc to allocate memory" ON "NOT WITH_COPY_OR_PARALELISM" OFF)
|
||||
CMAKE_DEPENDENT_OPTION (WITH_DL_MALLOC
|
||||
"use malloc to allocate memory" ON "NOT WITH_SYSTEM_MALLOC" OFF)
|
||||
CMAKE_DEPENDENT_OPTION (WITH_YAP_MALLOC
|
||||
"use malloc to allocate memory" ON "NOT WITH_SYSTEM_MALLOC;NOT WITH_DL_MALLOC" OFF)
|
||||
|
||||
|
||||
option(USE_YAP_CONDOR
|
||||
option(WITH_YAP_CONDOR
|
||||
"allow YAP to be used from condor" OFF)
|
||||
|
||||
if (USE_YAP_CONDOR)
|
||||
if (WITH_YAP_CONDOR)
|
||||
# use default allocator
|
||||
set ( YAP_STATIC ON )
|
||||
set ( YAP_DLL OFF )
|
||||
@ -527,20 +478,21 @@ set_target_properties (yap-bin PROPERTIES OUTPUT_NAME yap)
|
||||
target_link_libraries(yap-bin libYap )
|
||||
|
||||
|
||||
CMAKE_DEPENDENT_OPTION (USE_SYSTEM_MMAP "Use MMAP for shared memory allocation" ON
|
||||
"NOT USE_YAPOR_THOR" OFF)
|
||||
CMAKE_DEPENDENT_OPTION (WITH_SYSTEM_MMAP "Use MMAP for shared memory allocation" ON
|
||||
"NOT WITH_YAPOR_THOR" OFF)
|
||||
|
||||
CMAKE_DEPENDENT_OPTION (USE_SYSTEM_SHM "Use SHM for shared memory allocation" ON
|
||||
"NOT USE_YAPOR_THOR; NOT USE_SYSTEM_MMAP" OFF )
|
||||
CMAKE_DEPENDENT_OPTION (WITH_SYSTEM_SHM "Use SHM for shared memory allocation" ON
|
||||
"NOT WITH_YAPOR_THOR; NOT WITH_SYSTEM_MMAP" OFF )
|
||||
|
||||
if (USE_MPI)
|
||||
macro_optional_find_package (MPI OFF)
|
||||
|
||||
add_subDIRECTORY(library/lammpi)
|
||||
|
||||
if (MPI_C_FOUND)
|
||||
|
||||
CMAKE_DEPENDENT_OPTION( USE_MPI ON "Interface to OpenMPI/MPICH"
|
||||
CMAKE_DEPENDENT_OPTION( WITH_MPI ON "Interface to OpenMPI/MPICH"
|
||||
"MPI_C_FOUND" OFF)
|
||||
macro_optional_add_subDIRECTORY(library/mpi)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MPI_C_COMPILE_FLAGS} ")
|
||||
include_directories(${MPI_C_INCLUDE_PATH})
|
||||
target_link_libraries(yap-bin ${MPI_C_LIBRARIES} )
|
||||
@ -554,7 +506,6 @@ if (USE_MPI)
|
||||
LINK_FLAGS "${MPI_C_LINK_FLAGS}")
|
||||
endif()
|
||||
endif (MPI_C_FOUND)
|
||||
endif (USE_MPI)
|
||||
|
||||
|
||||
add_custom_target (main ALL DEPENDS ${YAP_STARTUP} ) # WORKING_DIRECTORY ${CMAKE_BINARY_DIR} )
|
||||
|
@ -28,8 +28,42 @@ set (OPTYap_SOURCES
|
||||
tab.completion.c
|
||||
)
|
||||
|
||||
include_directories (../H ../include . ${GMP_INCLUDE_DIR} ${PROJECT_BINARY_DIR})
|
||||
option (WITH_TABLING "Support tabling" ON)
|
||||
if (WITH_TABLING)
|
||||
#this depends on DEPTH_LIMIT define it after
|
||||
|
||||
#this macro should realy be in config.h or other like it
|
||||
#and it is used across several files outside OPTYap
|
||||
set_property(DIRECTORY .. APPEND PROPERTY COMPILE_DEFINITIONS TABLING=1)
|
||||
include_directories (OPTYap)
|
||||
endif(WITH_TABLING)
|
||||
|
||||
|
||||
option (WITH_YAPOR "Experimental Support for Or-parallelism" OFF)
|
||||
|
||||
CMAKE_DEPENDENT_OPTION (WITH_YAPOR_COPY "Copy-based Or-parallelism" ON
|
||||
"WITH_YAPOR" OFF)
|
||||
if (WITH_YAPOR_COPY)
|
||||
set_property(DIRECTORY .. APPEND PROPERTY COMPILE_DEFINITIONS YAPOR_COPY=1)
|
||||
endif (WITH_YAPOR_COPY)
|
||||
|
||||
CMAKE_DEPENDENT_OPTION (WITH_YAPOR_THOR "Thread-based Or-parallelism" OFF
|
||||
"WITH_OR_PARALLELISM;WITH_THREADS;NOT WITH_YAPOR" OFF)
|
||||
if (WITH_YAPOR_THOR)
|
||||
set_property(DIRECTORY .. APPEND PROPERTY COMPILE_DEFINITIONS YAPOR_THREADS=1)
|
||||
endif (WITH_YAPOR_THOR)
|
||||
|
||||
CMAKE_DEPENDENT_OPTION (WITH_YAPOR_ACOW "Process-based Copy-On-Write Or-parallelism" OFF
|
||||
"WITH_OR_PARALLELISM;NOT WITH_YAPOR;NOT WITH_THOR" OFF)
|
||||
if (WITH_YAPOR_ACOW)
|
||||
set_property(DIRECTORY .. APPEND PROPERTY COMPILE_DEFINITIONS YAPOR_COW=1)
|
||||
endif (WITH_YAPOR_ACOW)
|
||||
|
||||
CMAKE_DEPENDENT_OPTION (WITH_YAPOR_SBA "Sparse Bind Array-based Or-parallelism" OFF
|
||||
"WITH_OR_PARALLELISM;NOT WITH_YAPOR;NOT WITH_THOR;NOT WITH_ACOW" OFF)
|
||||
if (WITH_YAPOR_SBA)
|
||||
set_property(DIRECTORY .. APPEND PROPERTY COMPILE_DEFINITIONS YAPOR_SBA=1)
|
||||
endif (WITH_YAPOR_SBA)
|
||||
|
||||
set (POSITION_INDEPENDENT_CODE TRUE)
|
||||
|
||||
|
@ -1,9 +1,10 @@
|
||||
|
||||
|
||||
check_include_file( alloca.h HAVE_ALLOCA_H )
|
||||
check_include_file( apache2/util_md5.h HAVE_APACHE2_UTIL_MD5_H )
|
||||
check_include_file( apr-1/apr_md5.h HAVE_APR_1_APR_MD5_H )
|
||||
check_include_file( arpa/inet.h HAVE_ARPA_INET_H )
|
||||
check_include_files(ctype.h HAVE_CTYPE_H)
|
||||
check_include_files(crypt.h HAVE_CRYPT_H)
|
||||
check_include_file( direct.h HAVE_DIRECT_H )
|
||||
check_include_file( dirent.h HAVE_DIRENT_H )
|
||||
check_include_file( dlfcn.h HAVE_DLFCN_H )
|
||||
@ -15,6 +16,7 @@ check_include_files(fmemopen.h HAVE_FMEMOPEN_H)
|
||||
check_include_file( fpu_control.h HAVE_FPU_CONTROL_H )
|
||||
check_function_exists(gettid HAVE_GETTID) # gettid() actually doesn't exist by itself, one must call syscall(SYS_gettid); instead
|
||||
check_symbol_exists(SYS_gettid sys/syscall.h HAVE_SYS_GETTID) #this only works if we force include syscall.h on the files that want to call gettid
|
||||
check_include_file( glob.h HAVE_GLOB_H )
|
||||
check_include_file( ieeefp.h HAVE_IEEEFP_H )
|
||||
check_include_file( inttypes.h HAVE_INTTYPES_H )
|
||||
check_include_file( io.h HAVE_IO_H )
|
||||
@ -135,11 +137,6 @@ if (WIN32)
|
||||
endif (HAVE_LIBWS2_32)
|
||||
endif()
|
||||
|
||||
check_library_exists( crypt crypt "" HAVE_LIBCRYPT )
|
||||
if (HAVE_LIBCRYPT)
|
||||
target_link_libraries(libYap crypt)
|
||||
endif (HAVE_LIBCRYPT)
|
||||
|
||||
check_library_exists( judy Judy1Set "" HAVE_LIBJUDY )
|
||||
if (HAVE_LIBJUDY)
|
||||
endif (HAVE_LIBJUDY)
|
||||
@ -200,7 +197,6 @@ check_function_exists( chdir HAVE_CHDIR )
|
||||
check_function_exists(_chsize_s HAVE__CHSIZE_S)
|
||||
check_function_exists( clock HAVE_CLOCK )
|
||||
check_function_exists( clock_gettime HAVE_CLOCK_GETTIME )
|
||||
check_function_exists( crypt HAVE_CRYPT )
|
||||
check_function_exists( ctime HAVE_CTIME )
|
||||
check_function_exists(dlopen HAVE_DLOPEN)
|
||||
check_function_exists( dup2 HAVE_DUP2 )
|
||||
@ -241,6 +237,7 @@ check_function_exists( getrlimit HAVE_GETRLIMIT )
|
||||
check_function_exists( getrusage HAVE_GETRUSAGE )
|
||||
check_function_exists( gettimeofday HAVE_GETTIMEOFDAY )
|
||||
check_function_exists( getwd HAVE_GETWD )
|
||||
check_function_exists( glob HAVE_GLOB )
|
||||
check_function_exists( gmtime HAVE_GMTIME )
|
||||
check_function_exists( h_errno HAVE_H_ERRNO )
|
||||
check_function_exists( isatty HAVE_ISATTY )
|
||||
|
166
config.h.cmake
166
config.h.cmake
@ -270,16 +270,6 @@ function. */
|
||||
#cmakedefine HAVE_CRT_EXTERNS_H ${HAVE_CRT_EXTERNS_H}
|
||||
#endif
|
||||
|
||||
/* "Define if you have the crypt function." */
|
||||
#ifndef HAVE_CRYPT
|
||||
#cmakedefine HAVE_CRYPT ${HAVE_CRYPT}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <crypt.h> header file. */
|
||||
#ifndef HAVE_CRYPT_H
|
||||
#cmakedefine HAVE_CRYPT_H ${HAVE_CRYPT_H}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `ctime' function. */
|
||||
#ifndef HAVE_CTIME
|
||||
#cmakedefine HAVE_CTIME ${HAVE_CTIME}
|
||||
@ -530,7 +520,125 @@ function. */
|
||||
#cmakedefine HAVE_GMP_H ${HAVE_GMP_H}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `gmtime' function. */
|
||||
/* Define to 1 if you have the <winsock.h> header file. */
|
||||
#ifndef HAVE_GLOB_H
|
||||
#cmakedefine HAVE_GLOB_H ${HAVE_GLOB_H}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <winsock.h> header file. */
|
||||
#ifndef HAVE_GLOB
|
||||
#cmakedefine HAVE_GLOB ${HAVE_GLOB}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*q Define to 1 if you have the `gmtime' function. */
|
||||
#ifndef HAVE_GMTIME
|
||||
#cmakedefine HAVE_GMTIME ${HAVE_GMTIME}
|
||||
#endif
|
||||
@ -962,10 +1070,6 @@ function. */
|
||||
#cmakedefine HAVE_OPENDIR ${HAVE_OPENDIR}
|
||||
#endif
|
||||
|
||||
|
||||
/* Define to 1 if you have the <openssl/ripemd.h> header file. */
|
||||
#cmakedefine HAVE_OPENSSL_RIPEMD_H ${HAVE_OPENSSL_RIPEMD_H}
|
||||
|
||||
/* Define to 1 if you have the `pipe2' function. */
|
||||
#ifndef HAVE_PIPE2
|
||||
#cmakedefine HAVE_PIPE2 ${HAVE_PIPE2}
|
||||
@ -1566,6 +1670,11 @@ signal. */
|
||||
#cmakedefine HAVE_WINSOCK2_H ${HAVE_WINSOCK2_H}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <winsock.h> header file. */
|
||||
#ifndef HAVE_WORDEXP
|
||||
#cmakedefine HAVE_WORDEXP ${HAVE_WORDEXP}
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <winsock.h> header file. */
|
||||
#ifndef HAVE_WORDEXP_H
|
||||
#cmakedefine HAVE_WORDEXP_H ${HAVE_WORDEXP_H}
|
||||
@ -1618,12 +1727,12 @@ signal. */
|
||||
|
||||
/* max number of threads, default 1 or 1024 */
|
||||
#ifndef MAX_THREADS
|
||||
#define MAX_THREADS ${MAX_THREADS}
|
||||
#define MAX_THREADS ${WITH_MAX_Threads}
|
||||
#endif
|
||||
|
||||
/* maximum amount of or-parallelism */
|
||||
#ifndef MAX_WORKERS
|
||||
#define MAX_WORKERS ${MAX_WORKERS}
|
||||
#define MAX_WORKERS ${WITH_MAX_Workers}
|
||||
#endif
|
||||
|
||||
/* o not use realloc() from HP-UX 10.20 together with MPI */
|
||||
@ -1816,39 +1925,24 @@ signal. */
|
||||
#cmakedefine TM_IN_SYS_TIME "${TM_IN_SYS_TIME}"
|
||||
#endif
|
||||
|
||||
/* use Doug Lea's malloc for all allocation */
|
||||
#ifndef USE_DL_MALLOC
|
||||
#define USE_DL_MALLOC ${USE_DL_MALLOC}
|
||||
#endif
|
||||
|
||||
/* use bignums/rationals in YAP code. */
|
||||
#ifndef USE_GMP
|
||||
#define USE_GMP ${USE_GMP}
|
||||
#define USE_GMP ${GMP_FOUND}
|
||||
#endif
|
||||
|
||||
/* use Judy library for UDI indexing in YAP code. */
|
||||
#ifndef USE_JUDY
|
||||
#define USE_JUDY ${USE_JUDY}
|
||||
#endif
|
||||
|
||||
/* do not use our own locking routines */
|
||||
#ifndef USE_PTHREAD_LOCKING
|
||||
#define USE_PTHREAD_LOCKING ${YAP_USE_PTHREADS_LOCKS}
|
||||
#endif
|
||||
|
||||
/* use OS malloc for all allocation */
|
||||
#ifndef USE_SYSTEM_MALLOC
|
||||
#define USE_SYSTEM_MALLOC ${USE_SYSTEM_MALLOC}
|
||||
#define USE_JUDY ${WITH_JUDY}
|
||||
#endif
|
||||
|
||||
/* use mmap in or-parallel allocation */
|
||||
#ifndef USE_SYSTEM_MMAP
|
||||
#define USE_SYSTEM_MMAP ${USE_SYSTEM_MMAP}
|
||||
#define USE_SYSTEM_MMAP ${WITH_SYSTEM_MMAP}
|
||||
#endif
|
||||
|
||||
/* use shm in or-parallel allocation */
|
||||
#ifndef USE_SYSTEM_SHM
|
||||
#define USE_SYSTEM_SHM ${USE_SYSTEM_SHM}
|
||||
#define USE_SYSTEM_SHM ${WITH_SYSTEM_SHM}
|
||||
#endif
|
||||
|
||||
/* Whether daylight savings time offset is set via the altzone variable */
|
||||
|
@ -35,7 +35,7 @@ IF (CUDD_FOUND)
|
||||
${CUDD_INCLUDE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
|
||||
check_include_files( util.h HAVE_UTIL_H )
|
||||
check_include_files( cudd/util.h HAVE_CUDD_UTIL_H )
|
||||
check_include_files( cudd.h HAVE_CUDD_H )
|
||||
@ -77,3 +77,4 @@ ENDIF (CUDD_FOUND)
|
||||
|
||||
SET (CUDD_FOUND_EXPORT ${CUDD_FOUND} PARENT_SCOPE)
|
||||
SET (CUDD_LIBRARIES_EXPORT ${CUDD_LIBRARIES} PARENT_SCOPE)
|
||||
SET (CUDD_INCLUDE_DIR_EXPORT ${CUDD_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR} PARENT_SCOPE)
|
||||
|
@ -10,7 +10,7 @@ add_executable (Problogbdd
|
||||
${SRC})
|
||||
|
||||
set_target_properties (Problogbdd PROPERTIES
|
||||
OUTPUT_NAME simplecudd
|
||||
OUTPUT_NAME problogbdd
|
||||
)
|
||||
|
||||
target_link_libraries(Problogbdd
|
||||
|
179
packages/cplint/CMakeLists.txt
Normal file
179
packages/cplint/CMakeLists.txt
Normal file
@ -0,0 +1,179 @@
|
||||
SET( CMAKE_FIND_FRAMEWORK LAST)
|
||||
SET( CMAKE_FIND_APPBUNDLE LAST)
|
||||
|
||||
|
||||
# Be sure to also update these in Makefile!
|
||||
set(SO_MAJOR 1)
|
||||
set(SO_MINOR 0)
|
||||
set(SO_PATCH 0)
|
||||
|
||||
set( CPLINT_SOURCES
|
||||
cplint.h
|
||||
cplint_yap.c
|
||||
cplint_Prob.c )
|
||||
|
||||
set( BDDEM_SOURCES
|
||||
slipcase/bddem.c
|
||||
cplint.h
|
||||
)
|
||||
|
||||
set (CPLINT_PROGRAMS
|
||||
lpadvel.pl
|
||||
lpadclpbn.pl
|
||||
lpadsld.pl
|
||||
lpad.pl
|
||||
cpl.pl
|
||||
approx/bestfirst.pl
|
||||
approx/bestk.pl
|
||||
approx/deepdyn.pl
|
||||
approx/deepit.pl
|
||||
approx/exact.pl
|
||||
approx/exact_mem.pl
|
||||
approx/montecarlo.pl
|
||||
approx/params.pl
|
||||
approx/parsing.pl
|
||||
approx/utility.pl
|
||||
approx/tptree_lpad.pl
|
||||
)
|
||||
|
||||
set (CPLINT_SEMANTICS_PROGRAMS
|
||||
semlpadsld.pl
|
||||
semlpad.pl
|
||||
semcpl.pl
|
||||
slg.pl
|
||||
)
|
||||
|
||||
set (CPLINT_LEARNING_PROGRAMS
|
||||
em/em.pl
|
||||
em/inference.pl
|
||||
lemur/dv_lemur.pl
|
||||
lemur/inference_lemur.pl
|
||||
lemur/lemur.pl
|
||||
lemur/revise_lemur.pl
|
||||
lemur/slipcover_lemur.pl
|
||||
rib/inference_ib.pl
|
||||
rib/rib.pl
|
||||
slipcase/inference_sl.pl
|
||||
slipcase/revise.pl
|
||||
slipcase/slipcase.pl
|
||||
slipcover/revise_sl.pl
|
||||
slipcover/slipcover.pl
|
||||
)
|
||||
|
||||
set (CPLINT_TEST_PROGRAMS
|
||||
testcpl.pl
|
||||
testlpad.pl
|
||||
testlpadclpbn.pl
|
||||
testlpadsld_gbfalse.pl
|
||||
testlpadsld_gbtrue.pl
|
||||
testlpadsldit.pl
|
||||
testlpadslditc.pl
|
||||
testlpadslditr.pl
|
||||
testlpadvel.pl
|
||||
testsemcpl.pl
|
||||
testsemlpad.pl
|
||||
testsemlpadsld.pl
|
||||
)
|
||||
|
||||
set (CPLINT_EXAMPLE_PROGRAMS
|
||||
examples/alarm.cpl
|
||||
examples/coin.cpl
|
||||
examples/coin.uni
|
||||
examples/coin2.cpl
|
||||
examples/coin2.uni
|
||||
examples/dice.cpl
|
||||
examples/dice.uni
|
||||
examples/ex.cpl
|
||||
examples/ex.uni
|
||||
examples/exapprox.cpl
|
||||
examples/exapprox.uni
|
||||
examples/exist.cpl
|
||||
examples/exist.uni
|
||||
examples/exist1.cpl
|
||||
examples/exist1.uni
|
||||
examples/exrange.cpl
|
||||
examples/exrange.uni
|
||||
examples/female.cpl
|
||||
examples/hiv.cpl
|
||||
examples/hiv.uni
|
||||
examples/invalid.cpl
|
||||
examples/invalid.uni
|
||||
examples/light.cpl
|
||||
examples/light.uni
|
||||
examples/mendel.cpl
|
||||
examples/mendel.uni
|
||||
examples/mendels.cpl
|
||||
examples/mendels.uni
|
||||
examples/paper_ref.cpl
|
||||
examples/paper_ref_not.cpl
|
||||
examples/paper_ref_simple.cpl
|
||||
examples/school.cpl
|
||||
examples/school_simple.cpl
|
||||
examples/school_simple.uni
|
||||
examples/student.cpl
|
||||
examples/student.uni
|
||||
examples/threesideddice.cpl
|
||||
examples/threesideddice.uni
|
||||
examples/throws.cpl
|
||||
examples/throws.uni
|
||||
examples/trigger.cpl
|
||||
examples/trigger.uni
|
||||
examples/twosideddice.cpl
|
||||
examples/win.cpl
|
||||
examples/win.uni
|
||||
)
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
${CUDD_INCLUDE_DIR_EXPORTS}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../bdd
|
||||
)
|
||||
|
||||
IF (CUDD_FOUND_EXPORT)
|
||||
|
||||
add_library (bddem SHARED
|
||||
${BDDEM_SOURCES}
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES(bddem
|
||||
${CUDD_LIBRARIES_EXPORT}
|
||||
libYap
|
||||
)
|
||||
|
||||
set_target_properties (bddem PROPERTIES
|
||||
PREFIX ""
|
||||
POSITION_INDEPENDENT_CODE ON
|
||||
)
|
||||
|
||||
install(TARGETS bddem
|
||||
LIBRARY DESTINATION ${dlls}
|
||||
)
|
||||
|
||||
|
||||
add_library (cplint SHARED
|
||||
${CPLINT_SOURCES}
|
||||
)
|
||||
|
||||
set_target_properties (cplint PROPERTIES
|
||||
PREFIX ""
|
||||
POSITION_INDEPENDENT_CODE ON
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES(cplint
|
||||
${CUDD_LIBRARIES}
|
||||
libYap
|
||||
bddem
|
||||
)
|
||||
|
||||
add_subDIRECTORY ( approx/simplecuddLPADs )
|
||||
|
||||
install(TARGETS cplint
|
||||
LIBRARY DESTINATION ${dlls}
|
||||
)
|
||||
|
||||
INSTALL(FILES ${CPLINT_PROGRAMS} DESTINATION ${libpl})
|
||||
INSTALL(FILES ${CPLINT_LEARNING_PROGRAMS} DESTINATION ${libpl}/cplint)
|
||||
INSTALL(FILES ${CPLINT_EXAMPLE_PROGRAMS} DESTINATION ${libpl}/cplint/examples)
|
||||
INSTALL(FILES ${CPLINT_TEST_PROGRAMS} DESTINATION ${libpl}/cplint/examples)
|
||||
INSTALL(FILES ${CPLINT_SEMANTICS_PROGRAMS} DESTINATION ${libpl})
|
||||
|
||||
ENDIF()
|
@ -8,6 +8,7 @@ for the relative license.
|
||||
|
||||
*/
|
||||
#include "config.h"
|
||||
#include "cudd_config.h"
|
||||
#if HAVE_CUDD_UTIL_H
|
||||
#include "cudd/util.h"
|
||||
#include "cudd/cuddInt.h"
|
||||
|
@ -51,6 +51,7 @@ set(PL_SOURCES
|
||||
yapor.yap
|
||||
yio.yap
|
||||
../os/chartypes.yap
|
||||
../os/edio.yap
|
||||
)
|
||||
|
||||
add_custom_target (${YAP_STARTUP} ALL SOURCES ${PL_SOURCES} ) # WORKING_DIRECTORY ${CMAKE_BINARY_DIR} )
|
||||
|
Reference in New Issue
Block a user