bdd
This commit is contained in:
parent
4db2a1fe7f
commit
c6a02d3fe4
@ -53,6 +53,8 @@ if(NOT COMMAND find_host_program)
|
||||
endif()
|
||||
|
||||
option(BUILD_SHARED_LIBS "Build shared library" ON)
|
||||
set (CMAKE_POSITION_INDEPENDENT_CODE TRUE)
|
||||
|
||||
|
||||
include(Prelims NO_POLICY_SCOPE)
|
||||
|
||||
@ -106,12 +108,13 @@ else ()
|
||||
)
|
||||
|
||||
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (WIN32)
|
||||
list (APPEND YLIBS $<TARGET_OBJECTS:YapC++>)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
add_component (core
|
||||
${ENGINE_SOURCES}
|
||||
|
@ -55,6 +55,8 @@ extern void *protected_pop_text_stack(int lvl, void *safe, bool tmp,
|
||||
#define NUMBER_OF_CHARS 256
|
||||
extern char *Yap_chtype;
|
||||
|
||||
#define Yap_strlen(s) strlen((void *)(s))
|
||||
|
||||
typedef enum {
|
||||
BG = 0, /* initial state */
|
||||
UC = 1, /* Upper case */
|
||||
|
@ -67,7 +67,10 @@ endif()
|
||||
|
||||
add_subDIRECTORY (packages/real)
|
||||
|
||||
if (WiTHPYTHON)
|
||||
add_subDIRECTORY (packages/python)
|
||||
include_directories(${PYTHON_INCLUDE_PATH})
|
||||
endif()
|
||||
|
||||
add_subDIRECTORY (packages/jpl)
|
||||
|
||||
|
@ -406,11 +406,3 @@ configure_file(${CMAKE_CURRENT_LIST_DIR}/../config.h.cmake
|
||||
configure_file(${CMAKE_CURRENT_LIST_DIR}/../GitSHA1.c.in GitSHA1.c @ONLY)
|
||||
configure_file(${CMAKE_CURRENT_LIST_DIR}/../os/YapIOConfig.h.cmake ${CMAKE_BINARY_DIR}/os/YapIOConfig.h)
|
||||
|
||||
check_include_files( "stdio.h;cudd.h" HAVE_CTYPE_HUDD_H )
|
||||
|
||||
check_include_files( "stdio.h;cuddI.h" HAVE_CUDD_H )
|
||||
check_include_files( "cudd.h;cuddInt.h" HAVE_CUDDINT_H )
|
||||
check_include_files( "stdio.h;cudd/cudd.h" HAVE_CUDD_CUDD_H )
|
||||
check_include_files( "stdio.h;cudd/cuddInt.h" HAVE_CUDD_CUDDINT_H )
|
||||
configure_file (cmake/cudd_config.h.cmake
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/cudd_config.h" )
|
||||
|
@ -1,152 +1,47 @@
|
||||
# - Try to find the CUDD BDD package
|
||||
# Once done this will define
|
||||
# Try to find CUDD headers and libraries.
|
||||
#
|
||||
# CUDD_FOUND - system has CUDD
|
||||
# CUDD_LIBRARIES - Link these to use CUDD
|
||||
# CUDD_INCLUDE_DIR - Include directory for using CUDD
|
||||
# Usage of this module as follows:
|
||||
#
|
||||
# Based on FindFontconfig Copyright (c) 2006,2007 Laurent Montel, <montel@kde.org>
|
||||
# find_package(CUDD)
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
# Variables used by this module, they can change the default behaviour and need
|
||||
# to be set before calling find_package:
|
||||
#
|
||||
# CUDD_ROOT Set this variable to the root installation of
|
||||
# libcudd if the module has problems finding the
|
||||
# proper installation path.
|
||||
#
|
||||
# Variables defined by this module:
|
||||
#
|
||||
# CUDD_FOUND System has CUDD libraries and headers
|
||||
# CUDD_LIBRARIES The CUDD library
|
||||
# CUDD_INCLUDE_DIR The location of CUDD headers
|
||||
|
||||
SET( CUDD_FOUND "NO" )
|
||||
|
||||
set (CUDD_INCLUDE_SEARCH_PATH
|
||||
${CUDD_ROOT_DIR}/include
|
||||
${CMAKE_INSTALL_PREFIX}/include
|
||||
/usr/local/yap/include
|
||||
/usr/local/Yap/include
|
||||
/usr/local/cudd/include
|
||||
/usr/lib/cudd/include
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local/include
|
||||
/usr/include/
|
||||
/sw/include # Fink
|
||||
/opt/local/include # MacPorts
|
||||
/opt/csw/include # Blastwave
|
||||
/opt/include
|
||||
/usr/freeware/include
|
||||
)
|
||||
|
||||
|
||||
|
||||
set (CUDD_LIB_SEARCH_PATH
|
||||
${CUDD_ROOT_DIR}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
/usr/lib
|
||||
/usr/local/lib/cudd
|
||||
/usr/local/cudd/lib
|
||||
/usr/lib/cudd
|
||||
/usr/lib/cudd/lib
|
||||
/usr/freeware/lib )
|
||||
|
||||
if ($ENV{CUDD_ROOT})
|
||||
list (APPEND CUDD_LIB_SEARCH_PATH
|
||||
$ENV{CUDD_ROOT}/lib
|
||||
$ENV{CUDD_ROOT}/lib-dbg
|
||||
$ENV{CUDD_ROOT} )
|
||||
|
||||
list (APPEND CUDD_INCLUDE_SEARCH_PATH
|
||||
$ENV{CUDD_ROOT}/include )
|
||||
# Get hint from environment variable (if any)
|
||||
if(NOT CUDD_ROOT AND DEFINED ENV{CUDD_ROOT})
|
||||
set(CUDD_ROOT "$ENV{CUDD_ROOT}" CACHE PATH "CUDD base directory location (optional, used for nonstandard installation paths)")
|
||||
mark_as_advanced(CUDD_ROOT)
|
||||
endif()
|
||||
|
||||
if (${CUDD_ROOT})
|
||||
list (APPEND CUDD_LIB_SEARCH_PATH
|
||||
${CUDD_ROOT}/lib
|
||||
${CUDD_ROOT}/lib-dbg
|
||||
${CUDD_ROOT} )
|
||||
list (APPEND CUDD_INCLUDE_SEARCH_PATH
|
||||
${CUDD_ROOT}/include )
|
||||
# Search path for nonstandard locations
|
||||
if(CUDD_ROOT)
|
||||
set(CUDD_INCLUDE_PATH PATHS "${CUDD_ROOT}/include" NO_DEFAULT_PATH)
|
||||
set(CUDD_LIBRARY_PATH PATHS "${CUDD_ROOT}/lib" NO_DEFAULT_PATH)
|
||||
endif()
|
||||
|
||||
# Check if we have cached results in case the last round was successful.
|
||||
|
||||
find_package(PkgConfig)
|
||||
|
||||
find_path(CUDD_INCLUDE_DIR
|
||||
NAMES cudd.h cudd/cudd.h
|
||||
${CUDD_INCLUDE_SEARCH_PATH}
|
||||
)
|
||||
|
||||
mark_as_advanced(CUDD_INCLUDE_DIR)
|
||||
|
||||
if (CUDD_INCLUDE_DIR)
|
||||
|
||||
find_library(CUDD_LIBRARIES
|
||||
NAMES cudd
|
||||
PATHS
|
||||
${CUDD_LIB_SEARCH_PATH}
|
||||
)
|
||||
|
||||
if (CUDD_LIBRARIES)
|
||||
|
||||
SET( CUDD_FOUND "YES" )
|
||||
|
||||
find_library(CUDD_DDDMP_LIBRARY
|
||||
NAMES dddmp
|
||||
PATHS
|
||||
${CUDD_LIB_SEARCH_PATH}
|
||||
)
|
||||
|
||||
if (CUDD_DDMP_LIBRARY)
|
||||
list( APPEND CUDD_LIBRARIES ${CUDD_DDMP_LIBRARY} )
|
||||
# Search path for nonstandard locations
|
||||
if(CUDD_ROOT_DIR)
|
||||
set(CUDD_INCLUDE_PATH PATHS "${CUDD_ROOT_DIR}/include" NO_DEFAULT_PATH)
|
||||
set(CUDD_LIBRARY_PATH PATHS "${CUDD_ROOT_DIR}/lib" NO_DEFAULT_PATH)
|
||||
endif()
|
||||
|
||||
find_library(CUDD_EPD_LIBRARY
|
||||
NAMES epd
|
||||
PATHS
|
||||
${CUDD_LIB_SEARCH_PATH}
|
||||
)
|
||||
|
||||
if (CUDD_EPD_LIBRARY)
|
||||
list( APPEND CUDD_LIBRARIES ${CUDD_EPD_LIBRARY} )
|
||||
endif()
|
||||
|
||||
find_library(CUDD_ST_LIBRARY
|
||||
NAMES cuddst
|
||||
PATHS
|
||||
${CUDD_LIB_SEARCH_PATH}
|
||||
)
|
||||
|
||||
if (CUDD_ST_LIBRARY)
|
||||
list( APPEND CUDD_LIBRARIES ${CUDD_ST_LIBRARY} )
|
||||
endif()
|
||||
find_path(CUDD_INCLUDE_DIR NAMES cudd.h cudd/cudd.h HINTS ${CUDD_INCLUDE_PATH})
|
||||
find_library(CUDD_LIBRARIES NAMES cudd CUDDVC-2.5.0 HINTS ${CUDD_LIBRARY_PATH})
|
||||
|
||||
|
||||
|
||||
find_library(CUDD_UTIL_LIBRARY
|
||||
NAMES cuddutil
|
||||
|
||||
PATHS
|
||||
${CUDD_LIB_SEARCH_PATH}
|
||||
)
|
||||
|
||||
if (CUDD_UTIL_LIBRARY)
|
||||
list( APPEND CUDD_LIBRARIES ${CUDD_ST_LIBRARY} )
|
||||
endif()
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_library(CUDD_MTR_LIBRARY
|
||||
NAMES mtr
|
||||
PATHS
|
||||
${CUDD_LIB_SEARCH_PATH}
|
||||
)
|
||||
find_package_handle_standard_args(CUDD DEFAULT_MSG CUDD_LIBRARIES CUDD_INCLUDE_DIR)
|
||||
|
||||
if (CUDD_MTR_LIBRARY)
|
||||
list( APPEND CUDD_LIBRARIES ${CUDD_MTR_LIBRARY} )
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
mark_as_advanced(CUDD_LIBRARIES)
|
||||
|
||||
|
||||
|
||||
mark_as_advanced (CUDD_FOUND)
|
||||
|
||||
|
||||
find_package_handle_standard_args(CUDD DEFAULT_MSG CUDD_LIBRARIES CUDD_INCLUDE_DIR )
|
||||
mark_as_advanced(CUDD_ROOT CUDD_LIBRARIES CUDD_INCLUDE_DIR)
|
||||
|
||||
|
@ -17,6 +17,14 @@ macro_log_feature (CUDD_FOUND "CUDD"
|
||||
if (CUDD_FOUND)
|
||||
|
||||
set( CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${CUDD_INCLUDE_DIR} )
|
||||
check_include_files( "stdio.h;cudd.h" HAVE_CTYPE_HUDD_H )
|
||||
|
||||
check_include_files( "stdio.h;cuddI.h" HAVE_CUDD_H )
|
||||
check_include_files( "cudd.h;cuddInt.h" HAVE_CUDDINT_H )
|
||||
check_include_files( "stdio.h;cudd/cudd.h" HAVE_CUDD_CUDD_H )
|
||||
check_include_files( "stdio.h;cudd/cuddInt.h" HAVE_CUDD_CUDDINT_H )
|
||||
configure_file (cmake/cudd_config.h.cmake
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/cudd_config.h" )
|
||||
|
||||
endif (CUDD_FOUND)
|
||||
|
||||
|
@ -8,18 +8,32 @@ IF (WITH_PYTHON)
|
||||
|
||||
|
||||
if (APPLE)
|
||||
foreach (i 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
|
||||
set (PYTHON_INCLUDE_DIRS /usr/local/Frameworks/Python.framework/Versions/${i}/Headers)
|
||||
message("Trying Python ${i}")
|
||||
if (EXISTS ${PYTHON_INCLUDE_DIRS})
|
||||
set (PYTHON_EXECUTABLE /usr/local/bin/python${i} CACHE FILEPATH "Path to a program" FORCE )
|
||||
set (PYTHON_INCLUDE_DIR /usr/local/Frameworks/Python.framework/Versions/${i}/include/python${i}m
|
||||
CACHE PATH "Path to a file." FORCE )
|
||||
set (PYTHON_LIBRARY /usr/local/Frameworks/Python.framework/Versions/${i}/lib/libpython${i}.dylib
|
||||
CACHE FILEPATH "Path to a library" FORCE )
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
message( " try brew setup ")
|
||||
foreach (i 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
|
||||
set (PYTHON_INCLUDE_DIRS /usr/local/Frameworks/Python.framework/Versions/${i}/Headers)
|
||||
message("Trying Python ${i}")
|
||||
if (EXISTS ${PYTHON_INCLUDE_DIRS})
|
||||
set (PYTHON_EXECUTABLE /usr/local/bin/python${i} CACHE FILEPATH "Path to a program" FORCE )
|
||||
set (PYTHON_INCLUDE_DIR /usr/local/Frameworks/Python.framework/Versions/${i}/include/python${i}m
|
||||
CACHE PATH "Path to a file." FORCE )
|
||||
set (PYTHON_LIBRARY /usr/local/Frameworks/Python.framework/Versions/${i}/lib/libpython${i}.dylib
|
||||
CACHE FILEPATH "Path to a library" FORCE )
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
message( " try ports setup ")
|
||||
foreach (i 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
|
||||
set (PYTHON_INCLUDE_DIRS /opt/local/Library/Frameworks/Python.framework/Versions/${i}/Headers)
|
||||
message("Trying Python ${i}")
|
||||
if (EXISTS ${PYTHON_INCLUDE_DIRS})
|
||||
set (PYTHON_EXECUTABLE /opt/local/bin/python${i} CACHE FILEPATH "Path to a program" FORCE )
|
||||
set (PYTHON_INCLUDE_DIR /opt/local/Library/Frameworks/Python.framework/Versions/${i}/Headers
|
||||
CACHE PATH "Path to a file." FORCE )
|
||||
set (PYTHON_LIBRARY /opt/local/Library/Frameworks/Python.framework/Versions/${i}/lib/libpython${i}.dylib
|
||||
CACHE FILEPATH "Path to a library" FORCE )
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
else()
|
||||
set (Python_ADDITIONAL_VERSIONS 3.6 3.5 3.4 3.3 3.2 3.1 3.0 2.8 2.6 2.5)
|
||||
endif()
|
||||
@ -37,4 +51,3 @@ set( CMAKE_REQUIRED_INCLUDES ${PYTHON_INCLUDE_DIRS} ${CMAKE_REQUIRED_INCLUDES}
|
||||
check_include_file(Python.h HAVE_PYTHON_H)
|
||||
|
||||
endif(WITH_PYTHON)
|
||||
|
||||
|
16
configure
vendored
16
configure
vendored
@ -67,11 +67,11 @@ set_config_var() {
|
||||
cfg="${ENABLE_VARS}"
|
||||
case "x$arg" in
|
||||
"xy"|"xyes"|"xtrue")
|
||||
VAR_VALUE=yes
|
||||
VAR_VALUE=YES
|
||||
;;
|
||||
"xn"|"xno"|"xfalse")
|
||||
found=y
|
||||
VAR_VALUE=no
|
||||
VAR_VALUE=NO
|
||||
;;
|
||||
**)
|
||||
VAR_VALUE=""
|
||||
@ -83,10 +83,10 @@ set_config_var() {
|
||||
cfg="${ENABLE_VARS}"
|
||||
case "x$arg" in
|
||||
"xy"|"xyes"|"xtrue")
|
||||
VAR_VALUE=no
|
||||
VAR_VALUE=NO
|
||||
;;
|
||||
"xn"|"xno"|"xfalse")
|
||||
VAR_VALUE=yes
|
||||
VAR_VALUE=YES
|
||||
;;
|
||||
**)
|
||||
VAR_VALUE=""
|
||||
@ -98,13 +98,13 @@ set_config_var() {
|
||||
name="${1#--with-}"
|
||||
cfg="${WITH_VARS}"
|
||||
case "x$arg" in
|
||||
"x"|"xy"|"xyes"|"xtrue")
|
||||
"x"|"xy"|"xyes"|"xtrue"|"xon")
|
||||
is_with=n
|
||||
VAR_VALUE=yes
|
||||
VAR_VALUE=YES
|
||||
``;;
|
||||
"xn"|"xno"|"xfalse")
|
||||
"xn"|"xno"|"xfalse"|"xoff")
|
||||
is_with=n
|
||||
VAR_VALUE=no
|
||||
VAR_VALUE=NO
|
||||
;;
|
||||
**)
|
||||
is_with=y
|
||||
|
@ -61,6 +61,7 @@ yio.yap
|
||||
|
||||
add_custom_target (${YAP_STARTUP} ALL SOURCES ${PL_SOURCES} ${YAPOS_PL_SOURCES} WORKING_DIRECTORY ${CMAKE_BINARY_DIR} )
|
||||
|
||||
if ( NOT CMAKE_CROSSCOMPILING )
|
||||
# Create a startup.yss on the top directory.
|
||||
add_custom_command (TARGET ${YAP_STARTUP}
|
||||
COMMAND yap-bin -B
|
||||
@ -68,6 +69,7 @@ add_custom_command (TARGET ${YAP_STARTUP}
|
||||
WORKING_DIRECTORY ${CMAKE_TOP_BINARY_DIR}
|
||||
DEPENDS yap-bin ${PL_SOURCES}
|
||||
)
|
||||
endif ( NOT CMAKE_CROSSCOMPILING )
|
||||
|
||||
|
||||
install (FILES ${CMAKE_TOP_BINARY_DIR}/${YAP_STARTUP}
|
||||
|
Reference in New Issue
Block a user