fix cmake for CUDD
This commit is contained in:
parent
05a76a2b3f
commit
a761bd752c
@ -121,7 +121,17 @@ else()
|
|||||||
set(YAP_STARTUP startup.yss)
|
set(YAP_STARTUP startup.yss)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(WITH_CUDD YES CACHE FILEPATH "Try to use Cudd (currently Cudd 3)")
|
||||||
|
|
||||||
|
if (WITH_CUDD)
|
||||||
|
include(cudd)
|
||||||
|
endif(WITH_CUDD)
|
||||||
|
|
||||||
|
set(WITH_JAVA YES CACHE FILEPATH "Try to use Java (currently Java 6,7,8)")
|
||||||
|
|
||||||
|
if (WITH_JAVA)
|
||||||
include(java)
|
include(java)
|
||||||
|
endif(WITH_JAVA)
|
||||||
|
|
||||||
set(WITH_PYTHON YES CACHE FILEPATH "Try to use Python (currently Python 3)")
|
set(WITH_PYTHON YES CACHE FILEPATH "Try to use Python (currently Python 3)")
|
||||||
|
|
||||||
|
@ -16,16 +16,12 @@ IF (NOT YAP_FOUND)
|
|||||||
MESSAGE (SEND_ERROR "YAP was not found!")
|
MESSAGE (SEND_ERROR "YAP was not found!")
|
||||||
ENDIF (NOT YAP_FOUND)
|
ENDIF (NOT YAP_FOUND)
|
||||||
|
|
||||||
macro_optional_find_package (CUDD ON)
|
|
||||||
macro_log_feature (CUDD_FOUND "CUDD"
|
|
||||||
"Use CUDD Library"
|
|
||||||
"http://vlsi.colorado.edu/~fabio/CUDD/" FALSE)
|
|
||||||
IF (CUDD_FOUND)
|
IF (CUDD_FOUND)
|
||||||
# CUDD_FOUND - system has Cudd
|
# CUDD_FOUND - system has Cudd
|
||||||
# CUDD_LIBRARIES - Link these to use Cudd
|
# CUDD_LIBRARIES - Link these to use Cudd
|
||||||
# CUDD_INCLUDE_DIR - Include directory for using Cudd
|
# CUDD_INCLUDE_DIR - Include directory for using Cudd
|
||||||
|
|
||||||
SET ( BDD_SOURCES
|
SET ( BDD_SOURCES
|
||||||
cudd.c
|
cudd.c
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -36,18 +32,11 @@ IF (CUDD_FOUND)
|
|||||||
${CMAKE_CURRENT_BINARY_DIR}
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
check_include_files( "stdio.h;cuddInt.h" HAVE_CUDDINT_H )
|
|
||||||
check_include_files( "stdio.h;cudd/cuddInt.h" HAVE_CUDD_CUDDINT_H )
|
|
||||||
check_include_files( "stdio.h;dddmpInt.h" HAVE_DDDMPINT_H )
|
|
||||||
check_include_files( "stdio.h;dddmp/dddmpInt.h" HAVE_DDDMP_DDDMPINT_H )
|
|
||||||
check_include_files( "stdio.h;cuddObj.hh" HAVE_CUDDOBJ_HH )
|
|
||||||
check_include_files( "stdio.h;cudd/cuddObj.hh" HAVE_CUDD_CUDDOBJ_HH )
|
|
||||||
|
|
||||||
configure_file ("${PROJECT_SOURCE_DIR}/cudd_config.h.cmake"
|
configure_file ("${PROJECT_SOURCE_DIR}/cudd_config.h.cmake"
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/cudd_config.h" )
|
"${CMAKE_CURRENT_BINARY_DIR}/cudd_config.h" )
|
||||||
|
|
||||||
|
|
||||||
if(DEFINED YAP_MAJOR_VERSION)
|
if(DEFINED YAP_MAJOR_VERSION)
|
||||||
TARGET_LINK_LIBRARIES(cudd
|
TARGET_LINK_LIBRARIES(cudd
|
||||||
${CUDD_LIBRARIES}
|
${CUDD_LIBRARIES}
|
||||||
libYap
|
libYap
|
||||||
@ -78,6 +67,3 @@ IF (CUDD_FOUND)
|
|||||||
|
|
||||||
ENDIF (CUDD_FOUND)
|
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)
|
|
||||||
|
@ -1,149 +1,131 @@
|
|||||||
SET( CMAKE_FIND_FRAMEWORK LAST)
|
|
||||||
SET( CMAKE_FIND_APPBUNDLE LAST)
|
|
||||||
|
|
||||||
|
|
||||||
# Be sure to also update these in Makefile!
|
# Be sure to also update these in Makefile!
|
||||||
set(SO_MAJOR 1)
|
set(SO_MAJOR 1)
|
||||||
set(SO_MINOR 0)
|
set(SO_MINOR 0)
|
||||||
set(SO_PATCH 0)
|
set(SO_PATCH 0)
|
||||||
|
|
||||||
find_package (CUDD)
|
|
||||||
macro_log_feature (CUDD_FOUND "CUDD"
|
|
||||||
"Use CUDD Library"
|
|
||||||
"http://vlsi.colorado.edu/~fabio/CUDD/" FALSE)
|
|
||||||
IF (CUDD_FOUND)
|
IF (CUDD_FOUND)
|
||||||
# CUDD_FOUND - system has Cudd
|
|
||||||
# CUDD_LIBRARIES - Link these to use Cudd
|
|
||||||
# CUDD_INCLUDE_DIR - Include directory for using Cudd
|
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(
|
INCLUDE_DIRECTORIES(
|
||||||
${CUDD_INCLUDE_DIR}
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
${CUDD_INCLUDE_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
check_include_files( util.h HAVE_UTIL_H )
|
set( CPLINT_SOURCES
|
||||||
check_include_files( cudd/util.h HAVE_CUDD_UTIL_H )
|
|
||||||
check_include_files( cudd.h HAVE_CUDD_H )
|
|
||||||
check_include_files( "stdio.h;cudd/cudd.h" HAVE_CUDD_CUDD_H )
|
|
||||||
check_include_files( cuddInt.h HAVE_CUDDINT_H )
|
|
||||||
check_include_files( "stdio.h;cudd/cudd.h;cudd/cuddInt.h" HAVE_CUDD_CUDDINT_H )
|
|
||||||
|
|
||||||
|
|
||||||
set( CPLINT_SOURCES
|
|
||||||
cplint.h
|
|
||||||
cplint_yap.c
|
|
||||||
cplint_Prob.c )
|
|
||||||
|
|
||||||
set( BDDEM_SOURCES
|
|
||||||
slipcase/bddem.c
|
|
||||||
cplint.h
|
cplint.h
|
||||||
)
|
cplint_yap.c
|
||||||
|
cplint_Prob.c )
|
||||||
|
|
||||||
set (CPLINT_PROGRAMS
|
set( BDDEM_SOURCES
|
||||||
lpadvel.pl
|
slipcase/bddem.c
|
||||||
lpadclpbn.pl
|
cplint.h
|
||||||
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
|
set (CPLINT_PROGRAMS
|
||||||
semlpadsld.pl
|
lpadvel.pl
|
||||||
semlpad.pl
|
lpadclpbn.pl
|
||||||
semcpl.pl
|
lpadsld.pl
|
||||||
slg.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_LEARNING_PROGRAMS
|
set (CPLINT_SEMANTICS_PROGRAMS
|
||||||
em/em.pl
|
semlpadsld.pl
|
||||||
em/inference.pl
|
semlpad.pl
|
||||||
lemur/dv_lemur.pl
|
semcpl.pl
|
||||||
lemur/inference_lemur.pl
|
slg.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
|
set (CPLINT_LEARNING_PROGRAMS
|
||||||
testcpl.pl
|
em/em.pl
|
||||||
testlpad.pl
|
em/inference.pl
|
||||||
testlpadclpbn.pl
|
lemur/dv_lemur.pl
|
||||||
testlpadsld_gbfalse.pl
|
lemur/inference_lemur.pl
|
||||||
testlpadsld_gbtrue.pl
|
lemur/lemur.pl
|
||||||
testlpadsldit.pl
|
lemur/revise_lemur.pl
|
||||||
testlpadslditc.pl
|
lemur/slipcover_lemur.pl
|
||||||
testlpadslditr.pl
|
rib/inference_ib.pl
|
||||||
testlpadvel.pl
|
rib/rib.pl
|
||||||
testsemcpl.pl
|
slipcase/inference_sl.pl
|
||||||
testsemlpad.pl
|
slipcase/revise.pl
|
||||||
testsemlpadsld.pl
|
slipcase/slipcase.pl
|
||||||
)
|
slipcover/revise_sl.pl
|
||||||
|
slipcover/slipcover.pl
|
||||||
|
)
|
||||||
|
|
||||||
set (CPLINT_EXAMPLE_PROGRAMS
|
set (CPLINT_TEST_PROGRAMS
|
||||||
examples/alarm.cpl
|
testcpl.pl
|
||||||
examples/coin.cpl
|
testlpad.pl
|
||||||
examples/coin.uni
|
testlpadclpbn.pl
|
||||||
examples/coin2.cpl
|
testlpadsld_gbfalse.pl
|
||||||
examples/coin2.uni
|
testlpadsld_gbtrue.pl
|
||||||
examples/dice.cpl
|
testlpadsldit.pl
|
||||||
examples/dice.uni
|
testlpadslditc.pl
|
||||||
examples/ex.cpl
|
testlpadslditr.pl
|
||||||
examples/ex.uni
|
testlpadvel.pl
|
||||||
examples/exapprox.cpl
|
testsemcpl.pl
|
||||||
examples/exapprox.uni
|
testsemlpad.pl
|
||||||
examples/exist.cpl
|
testsemlpadsld.pl
|
||||||
examples/exist.uni
|
)
|
||||||
examples/exist1.cpl
|
|
||||||
examples/exist1.uni
|
set (CPLINT_EXAMPLE_PROGRAMS
|
||||||
examples/exrange.cpl
|
examples/alarm.cpl
|
||||||
examples/exrange.uni
|
examples/coin.cpl
|
||||||
examples/female.cpl
|
examples/coin.uni
|
||||||
examples/hiv.cpl
|
examples/coin2.cpl
|
||||||
examples/hiv.uni
|
examples/coin2.uni
|
||||||
examples/invalid.cpl
|
examples/dice.cpl
|
||||||
examples/invalid.uni
|
examples/dice.uni
|
||||||
examples/light.cpl
|
examples/ex.cpl
|
||||||
examples/light.uni
|
examples/ex.uni
|
||||||
examples/mendel.cpl
|
examples/exapprox.cpl
|
||||||
examples/mendel.uni
|
examples/exapprox.uni
|
||||||
examples/mendels.cpl
|
examples/exist.cpl
|
||||||
examples/mendels.uni
|
examples/exist.uni
|
||||||
examples/paper_ref.cpl
|
examples/exist1.cpl
|
||||||
examples/paper_ref_not.cpl
|
examples/exist1.uni
|
||||||
examples/paper_ref_simple.cpl
|
examples/exrange.cpl
|
||||||
examples/school.cpl
|
examples/exrange.uni
|
||||||
examples/school_simple.cpl
|
examples/female.cpl
|
||||||
examples/school_simple.uni
|
examples/hiv.cpl
|
||||||
examples/student.cpl
|
examples/hiv.uni
|
||||||
examples/student.uni
|
examples/invalid.cpl
|
||||||
examples/threesideddice.cpl
|
examples/invalid.uni
|
||||||
examples/threesideddice.uni
|
examples/light.cpl
|
||||||
examples/throws.cpl
|
examples/light.uni
|
||||||
examples/throws.uni
|
examples/mendel.cpl
|
||||||
examples/trigger.cpl
|
examples/mendel.uni
|
||||||
examples/trigger.uni
|
examples/mendels.cpl
|
||||||
examples/twosideddice.cpl
|
examples/mendels.uni
|
||||||
examples/win.cpl
|
examples/paper_ref.cpl
|
||||||
examples/win.uni
|
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(
|
INCLUDE_DIRECTORIES(
|
||||||
${CUDD_INCLUDE_DIR_EXPORTS}
|
${CUDD_INCLUDE_DIR_EXPORTS}
|
||||||
@ -155,7 +137,7 @@ examples/win.uni
|
|||||||
)
|
)
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(bddem
|
TARGET_LINK_LIBRARIES(bddem
|
||||||
${CUDD_LIBRARIES_EXPORT}
|
${CUDD_LIBRARIES}
|
||||||
libYap
|
libYap
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -181,7 +163,6 @@ examples/win.uni
|
|||||||
TARGET_LINK_LIBRARIES(cplint
|
TARGET_LINK_LIBRARIES(cplint
|
||||||
${CUDD_LIBRARIES}
|
${CUDD_LIBRARIES}
|
||||||
libYap
|
libYap
|
||||||
bddem
|
|
||||||
)
|
)
|
||||||
|
|
||||||
add_subDIRECTORY ( approx/simplecuddLPADs )
|
add_subDIRECTORY ( approx/simplecuddLPADs )
|
||||||
|
@ -15,12 +15,12 @@ set_target_properties (LPADbdd PROPERTIES
|
|||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(LPADbdd
|
target_link_libraries(LPADbdd
|
||||||
${CUDD_LIBRARIES_EXPORT}
|
${CUDD_LIBRARIES}
|
||||||
libYap
|
libYap
|
||||||
)
|
)
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(
|
INCLUDE_DIRECTORIES(
|
||||||
${CUDD_INCLUDE_DIR_EXPORT}
|
${CUDD_INCLUDE_DIR}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user