cmake
This commit is contained in:
parent
cbafd93b03
commit
1bea4230e4
@ -10,19 +10,10 @@
|
|||||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||||
|
|
||||||
if (NOT DEFINED CUDD_ROOT)
|
SET( CUDD_FOUND "NO" )
|
||||||
set(CUDD_ROOT $ENV{CUDD_ROOT})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Check if we have cached results in case the last round was successful.
|
set (CUDD_INCLUDE_SEARCH_PATH
|
||||||
|
${CMAKE_INSTALL_PREFIX}/include
|
||||||
find_package(PkgConfig)
|
|
||||||
|
|
||||||
|
|
||||||
find_path(CUDD_INCLUDE_DIR
|
|
||||||
NAMES cudd.h cudd/cudd.h
|
|
||||||
$ENV{CUDD_ROOT}/include
|
|
||||||
$ENV{CUDD_ROOT}
|
|
||||||
/usr/local/yap/include
|
/usr/local/yap/include
|
||||||
/usr/local/Yap/include
|
/usr/local/Yap/include
|
||||||
/usr/local/cudd/include
|
/usr/local/cudd/include
|
||||||
@ -36,100 +27,124 @@ endif()
|
|||||||
/opt/csw/include # Blastwave
|
/opt/csw/include # Blastwave
|
||||||
/opt/include
|
/opt/include
|
||||||
/usr/freeware/include
|
/usr/freeware/include
|
||||||
NO_DEFAULT_PATHS
|
|
||||||
|
|
||||||
)
|
|
||||||
|
|
||||||
mark_as_advanced(CUDD_INCLUDE_DIR)
|
|
||||||
|
|
||||||
if (${CUDD_ROOT})
|
|
||||||
set (CUDD_LIB_SEARCH_PATH
|
|
||||||
$ENV{CUDD_ROOT}/lib
|
|
||||||
$ENV{CUDD_ROOT}/lib64
|
|
||||||
$ENV{CUDD_ROOT}/lib-dbg
|
|
||||||
$ENV{CUDD_ROOT}
|
|
||||||
${CUDD_ROOT}/cudd
|
|
||||||
/usr/lib
|
|
||||||
${CUDD_ROOT}/lib
|
|
||||||
${CUDD_ROOT}/lib64
|
|
||||||
${CUDD_ROOT}/lib-dbg
|
|
||||||
${CUDD_ROOT}
|
|
||||||
${CUDD_ROOT}/cudd
|
|
||||||
)
|
)
|
||||||
endif()
|
|
||||||
|
|
||||||
mark_as_advanced(CUDD_LIB_SEARCH_PATH on)
|
|
||||||
|
|
||||||
|
|
||||||
set (CUDD_LIB_SEARCH_PATH
|
set (CUDD_LIB_SEARCH_PATH
|
||||||
${CUDD_LIB_SEARCH_PATH}
|
${CMAKE_INSTALL_PREFIX}/lib
|
||||||
/usr/lib64
|
|
||||||
/usr/lib
|
/usr/lib
|
||||||
/usr/local/lib/cudd
|
/usr/local/lib/cudd
|
||||||
/usr/local/cudd/lib
|
/usr/local/cudd/lib
|
||||||
/usr/lib/cudd
|
/usr/lib/cudd
|
||||||
/usr/lib/cudd/lib
|
/usr/lib/cudd/lib
|
||||||
/usr/lib64/cudds
|
/usr/freeware/lib )
|
||||||
/usr/freeware/lib64 )
|
|
||||||
|
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 )
|
||||||
|
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 )
|
||||||
|
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
|
find_library(CUDD_LIBRARIES
|
||||||
NAMES cudd
|
NAMES cudd
|
||||||
PATHS
|
PATHS
|
||||||
${CUDD_LIB_SEARCH_PATH}
|
${CUDD_LIB_SEARCH_PATH}
|
||||||
)
|
)
|
||||||
|
|
||||||
IF (NOT EXISTS ${CUDD_INCLUDE_DIR}/epdInt.h )
|
|
||||||
|
|
||||||
|
if (CUDD_LIBRARIES)
|
||||||
|
|
||||||
|
SET( CUDD_FOUND "YES" )
|
||||||
|
|
||||||
find_library(CUDD_DDDMP_LIBRARY
|
find_library(CUDD_DDDMP_LIBRARY
|
||||||
NAMES dddmp
|
NAMES dddmp
|
||||||
PATHS
|
PATHS
|
||||||
${CUDD_LIB_SEARCH_PATH}
|
${CUDD_LIB_SEARCH_PATH}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (CUDD_DDMP_LIBRARY)
|
||||||
|
list( APPEND CUDD_LIBRARIES ${CUDD_DDMP_LIBRARY} )
|
||||||
|
endif()
|
||||||
|
|
||||||
find_library(CUDD_EPD_LIBRARY
|
find_library(CUDD_EPD_LIBRARY
|
||||||
NAMES epd
|
NAMES epd
|
||||||
PATHS
|
PATHS
|
||||||
${CUDD_LIB_SEARCH_PATH}
|
${CUDD_LIB_SEARCH_PATH}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (CUDD_EPD_LIBRARY)
|
||||||
|
list( APPEND CUDD_LIBRARIES ${CUDD_EPD_LIBRARY} )
|
||||||
|
endif()
|
||||||
|
|
||||||
find_library(CUDD_ST_LIBRARY
|
find_library(CUDD_ST_LIBRARY
|
||||||
NAMES cuddst st
|
NAMES cuddst
|
||||||
PATHS
|
PATHS
|
||||||
${CUDD_LIB_SEARCH_PATH}
|
${CUDD_LIB_SEARCH_PATH}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (CUDD_ST_LIBRARY)
|
||||||
|
list( APPEND CUDD_LIBRARIES ${CUDD_ST_LIBRARY} )
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
find_library(CUDD_UTIL_LIBRARY
|
find_library(CUDD_UTIL_LIBRARY
|
||||||
NAMES cuddutil util
|
NAMES cuddutil
|
||||||
|
|
||||||
PATHS
|
PATHS
|
||||||
${CUDD_LIB_SEARCH_PATH}
|
${CUDD_LIB_SEARCH_PATH}
|
||||||
NO_DEFAULT_PATHS
|
|
||||||
NO_SYSTEM_ENVIRONMENT_PATH
|
|
||||||
NO_CMAKE_SYSTEM_PATH
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (CUDD_UTIL_LIBRARY)
|
||||||
|
list( APPEND CUDD_LIBRARIES ${CUDD_ST_LIBRARY} )
|
||||||
|
endif()
|
||||||
|
|
||||||
find_library(CUDD_MTR_LIBRARY
|
find_library(CUDD_MTR_LIBRARY
|
||||||
NAMES mtr
|
NAMES mtr
|
||||||
PATHS
|
PATHS
|
||||||
${CUDD_LIB_SEARCH_PATH}
|
${CUDD_LIB_SEARCH_PATH}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (CUDD_MTR_LIBRARY)
|
||||||
|
list( APPEND CUDD_LIBRARIES ${CUDD_MTR_LIBRARY} )
|
||||||
|
endif()
|
||||||
|
|
||||||
set(CUDD_LIBRARIES
|
endif()
|
||||||
${CUDD_LIBRARIES} ${CUDD_ST_LIBRARY} ${CUDD_UTIL_LIBRARY}
|
|
||||||
${CUDD_MTR_LIBRARY} ${CUDD_EPD_LIBRARY} ${CUDD_DDDMP_LIBRARY} )
|
|
||||||
|
|
||||||
endif () # Check for cudd 2.
|
endif()
|
||||||
|
|
||||||
|
mark_as_advanced(CUDD_LIBRARIES)
|
||||||
|
|
||||||
|
|
||||||
SET( CUDD_FOUND "NO" )
|
|
||||||
IF(CUDD_INCLUDE_DIR AND CUDD_LIBRARIES)
|
|
||||||
SET( CUDD_FOUND "YES" )
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
mark_as_advanced (CUDD_FOUND)
|
mark_as_advanced (CUDD_FOUND)
|
||||||
|
|
||||||
|
|
||||||
find_package_handle_standard_args(R DEFAULT_MSG CUDD_LIBRARIES CUDD_INCLUDE_DIR )
|
find_package_handle_standard_args(CUDD DEFAULT_MSG CUDD_LIBRARIES CUDD_INCLUDE_DIR )
|
||||||
|
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
#Works under the assumption than when gecode is installed at least the kernel component exists
|
#Works under the assumption than when gecode is installed at least the kernel component exists
|
||||||
# Look for the header file
|
# Look for the header file
|
||||||
find_path(GECODE_INCLUDE_DIR NAMES gecode/kernel.hh )
|
find_path(GECODE_INCLUDE_DIR NAMES gecode/kernel.hh PATHS ${CMAKE_INSTALL_PREFIX}/include)
|
||||||
find_file(GECODE_CONFIG gecode/support/config.hpp)
|
find_file(GECODE_CONFIG gecode/support/config.hpp PATHS ${CMAKE_INSTALL_PREFIX}/include)
|
||||||
# Look for the library
|
# Look for the library
|
||||||
find_library(GECODE_LIBRARY NAMES gecodekernel)
|
find_library(GECODE_LIBRARY NAMES gecodekernel PATHS ${CMAKE_INSTALL_PREFIX}/lib)
|
||||||
find_library(GECODE_SUPPORT_LIBRARY NAMES gecodesupport)
|
find_library(GECODE_SUPPORT_LIBRARY NAMES gecodesupportl PATHS ${CMAKE_INSTALL_PREFIX}/lib)
|
||||||
|
|
||||||
if(GECODE_CONFIG)
|
if(GECODE_CONFIG)
|
||||||
file(STRINGS ${GECODE_CONFIG} GECODE_LINE_VERSION REGEX "^#define GECODE_VERSION .*")
|
file(STRINGS ${GECODE_CONFIG} GECODE_LINE_VERSION REGEX "^#define GECODE_VERSION .*")
|
||||||
@ -20,39 +20,39 @@ endif()
|
|||||||
if(GECODE_FOUND)
|
if(GECODE_FOUND)
|
||||||
set(GECODE_LIBRARIES ${GECODE_LIBRARY} ${GECODE_SUPPORT_LIBRARY})
|
set(GECODE_LIBRARIES ${GECODE_LIBRARY} ${GECODE_SUPPORT_LIBRARY})
|
||||||
set(GECODE_INCLUDE_DIRS ${GECODE_INCLUDE_DIR})
|
set(GECODE_INCLUDE_DIRS ${GECODE_INCLUDE_DIR})
|
||||||
find_library(GECODE_DRIVER_LIBRARY gecodedriver)
|
find_library(GECODE_DRIVER_LIBRARY gecodedriverl PATHS ${CMAKE_INSTALL_PREFIX}/lib)
|
||||||
if(GECODE_FZ_LIBRARY)
|
if(GECODE_FZ_LIBRARY)
|
||||||
list(APPEND GECODE_LIBRARIES ${GECODE_FZ_LIBRARY})
|
list(APPEND GECODE_LIBRARIES ${GECODE_FZ_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
find_library(GECODE_GIST_LIBRARY gecodegist)
|
find_library(GECODE_GIST_LIBRARY gecodegistl PATHS ${CMAKE_INSTALL_PREFIX}/lib)
|
||||||
if(GECODE_GIST_LIBRARY)
|
if(GECODE_GIST_LIBRARY)
|
||||||
list(APPEND GECODE_LIBRARIES ${GECODE_GIST_LIBRARY})
|
list(APPEND GECODE_LIBRARIES ${GECODE_GIST_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
find_library(GECODE_GRAPH_LIBRARY gecodegraph)
|
find_library(GECODE_GRAPH_LIBRARY gecodegraphl PATHS ${CMAKE_INSTALL_PREFIX}/lib)
|
||||||
if(GECODE_GRAPH_LIBRARY)
|
if(GECODE_GRAPH_LIBRARY)
|
||||||
list(APPEND GECODE_LIBRARIES ${GECODE_GRAPH_LIBRARY})
|
list(APPEND GECODE_LIBRARIES ${GECODE_GRAPH_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
find_library(GECODE_INT_LIBRARY gecodeint)
|
find_library(GECODE_INT_LIBRARY gecodeintl PATHS ${CMAKE_INSTALL_PREFIX}/lib)
|
||||||
if(GECODE_INT_LIBRARY)
|
if(GECODE_INT_LIBRARY)
|
||||||
list(APPEND GECODE_LIBRARIES ${GECODE_INT_LIBRARY})
|
list(APPEND GECODE_LIBRARIES ${GECODE_INT_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
find_library(GECODE_FLOAT_LIBRARY gecodefloat)
|
find_library(GECODE_FLOAT_LIBRARY gecodefloatl PATHS ${CMAKE_INSTALL_PREFIX}/lib)
|
||||||
if(GECODE_FLOAT_LIBRARY)
|
if(GECODE_FLOAT_LIBRARY)
|
||||||
list(APPEND GECODE_LIBRARIES ${GECODE_FLOAT_LIBRARY})
|
list(APPEND GECODE_LIBRARIES ${GECODE_FLOAT_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
find_library(GECODE_MM_LIBRARY gecodeminimodel)
|
find_library(GECODE_MM_LIBRARY gecodeminimodell PATHS ${CMAKE_INSTALL_PREFIX}/lib)
|
||||||
if(GECODE_MM_LIBRARY)
|
if(GECODE_MM_LIBRARY)
|
||||||
list(APPEND GECODE_LIBRARIES ${GECODE_MM_LIBRARY})
|
list(APPEND GECODE_LIBRARIES ${GECODE_MM_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
find_library(GECODE_SCHEDULING_LIBRARY gecodescheduling)
|
find_library(GECODE_SCHEDULING_LIBRARY gecodeschedulingl PATHS ${CMAKE_INSTALL_PREFIX}/lib)
|
||||||
if(GECODE_SCHEDULING_LIBRARY)
|
if(GECODE_SCHEDULING_LIBRARY)
|
||||||
list(APPEND GECODE_LIBRARIES ${GECODE_SCHEDULING_LIBRARY})
|
list(APPEND GECODE_LIBRARIES ${GECODE_SCHEDULING_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
find_library(GECODE_SEARCH_LIBRARY gecodesearch)
|
find_library(GECODE_SEARCH_LIBRARY gecodesearchl PATHS ${CMAKE_INSTALL_PREFIX}/lib)
|
||||||
if(GECODE_SEARCH_LIBRARY)
|
if(GECODE_SEARCH_LIBRARY)
|
||||||
list(APPEND GECODE_LIBRARIES ${GECODE_SEARCH_LIBRARY})
|
list(APPEND GECODE_LIBRARIES ${GECODE_SEARCH_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
find_library(GECODE_SET_LIBRARY gecodeset)
|
find_library(GECODE_SET_LIBRARY gecodesetl PATHS ${CMAKE_INSTALL_PREFIX}/lib)
|
||||||
if(GECODE_SET_LIBRARY)
|
if(GECODE_SET_LIBRARY)
|
||||||
list(APPEND GECODE_LIBRARIES ${GECODE_SET_LIBRARY})
|
list(APPEND GECODE_LIBRARIES ${GECODE_SET_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
|
|
||||||
option (WITH_CUDD "BDD CUDD package" ON)
|
option (WITH_CUDD "BDD CUDD package" ON)
|
||||||
|
|
||||||
if (WITH_CUDD)
|
if (WITH_CUDD)
|
||||||
#detect cudd setup, as it is shared between different installations.
|
#detect cudd setup, as it is shared between different installations.
|
||||||
|
|
||||||
@ -9,7 +10,12 @@ find_package(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
|
||||||
#
|
#
|
||||||
|
macro_log_feature (CUDD_FOUND "CUDD"
|
||||||
|
"Use CUDD BDD library"
|
||||||
|
"http://vlsi.colorado.edu/~fabio/CUDD/" FALSE)
|
||||||
|
|
||||||
if (CUDD_FOUND)
|
if (CUDD_FOUND)
|
||||||
|
|
||||||
set( CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${CUDD_INCLUDE_DIR} )
|
set( CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${CUDD_INCLUDE_DIR} )
|
||||||
|
|
||||||
check_include_files( cudd.h HAVE_CUDD_H )
|
check_include_files( cudd.h HAVE_CUDD_H )
|
||||||
|
@ -15,10 +15,10 @@ for the relative license.
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#if HAVE_CUDD_CUDDINT_H
|
#if HAVE_CUDD_CUDD_H
|
||||||
#include <cudd/cuddInt.h>
|
#include <cudd/cudd.h>
|
||||||
#elif HAVE_CUDDINT_H
|
#elif HAVE_CUDD_H
|
||||||
#include "cuddInt.h"
|
#include "cudd.h"
|
||||||
#endif
|
#endif
|
||||||
#include "YapInterface.h"
|
#include "YapInterface.h"
|
||||||
#define LOGZERO log(0.000001)
|
#define LOGZERO log(0.000001)
|
||||||
|
@ -15,9 +15,9 @@ IF (NOT YAP_FOUND)
|
|||||||
ENDIF (NOT YAP_FOUND)
|
ENDIF (NOT YAP_FOUND)
|
||||||
|
|
||||||
macro_optional_find_package (LibXml2 ON)
|
macro_optional_find_package (LibXml2 ON)
|
||||||
macro_log_feature (LIBXML2_FOUND "RAPTOR"
|
macro_log_feature (LIBXML2_FOUND "LIBXML2"
|
||||||
"Use XML2 Library"
|
"Use XML2 Library"
|
||||||
"http://www.r.org" FALSE)
|
"http://www.xmlsoft.org" FALSE)
|
||||||
IF (LIBXML2_FOUND)
|
IF (LIBXML2_FOUND)
|
||||||
# LIBXML2_FOUND - System has LibXml2
|
# LIBXML2_FOUND - System has LibXml2
|
||||||
# LIBXML2_INCLUDE_DIR - The LibXml2 include directory
|
# LIBXML2_INCLUDE_DIR - The LibXml2 include directory
|
||||||
@ -76,7 +76,7 @@ ENDIF (LIBXML2_FOUND)
|
|||||||
macro_optional_find_package (RAPTOR ON)
|
macro_optional_find_package (RAPTOR ON)
|
||||||
macro_log_feature (RAPTOR_FOUND "RAPTOR"
|
macro_log_feature (RAPTOR_FOUND "RAPTOR"
|
||||||
"Use RAPTOR Library"
|
"Use RAPTOR Library"
|
||||||
"http://www.r.org" FALSE)
|
"http://www.librdf.org" FALSE)
|
||||||
IF (RAPTOR_FOUND)
|
IF (RAPTOR_FOUND)
|
||||||
# RAPTOR_FOUND - system has Raptor
|
# RAPTOR_FOUND - system has Raptor
|
||||||
# RAPTOR_LIBRARIES - Link these to use Raptor
|
# RAPTOR_LIBRARIES - Link these to use Raptor
|
||||||
|
@ -45,6 +45,7 @@ if ( NOT( RAPTOR_INCLUDE_DIR AND RAPTOR_LIBRARIES ) OR NOT RAPTOR_FOUND )
|
|||||||
NAMES raptor2.h raptor2/raptor2.h raptor.h raptor/raptor.h
|
NAMES raptor2.h raptor2/raptor2.h raptor.h raptor/raptor.h
|
||||||
PATHS $ENV{RAPTOR_DIR}/include
|
PATHS $ENV{RAPTOR_DIR}/include
|
||||||
$ENV{RAPTOR_DIR}
|
$ENV{RAPTOR_DIR}
|
||||||
|
${CMAKE_INSTALL_PREFIX}/include
|
||||||
~/Library/Frameworks
|
~/Library/Frameworks
|
||||||
/Library/Frameworks
|
/Library/Frameworks
|
||||||
/usr/local/include
|
/usr/local/include
|
||||||
@ -64,6 +65,7 @@ if ( NOT( RAPTOR_INCLUDE_DIR AND RAPTOR_LIBRARIES ) OR NOT RAPTOR_FOUND )
|
|||||||
PATHS $ENV{RAPTOR_DIR}/lib
|
PATHS $ENV{RAPTOR_DIR}/lib
|
||||||
$ENV{RAPTOR_DIR}/lib-dbg
|
$ENV{RAPTOR_DIR}/lib-dbg
|
||||||
$ENV{RAPTOR_DIR}
|
$ENV{RAPTOR_DIR}
|
||||||
|
${CMAKE_INSTALL_PREFIX}/lib
|
||||||
~/Library/Frameworks
|
~/Library/Frameworks
|
||||||
/Library/Frameworks
|
/Library/Frameworks
|
||||||
/usr/local/lib
|
/usr/local/lib
|
||||||
|
Reference in New Issue
Block a user