Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit dc1af59f authored by Valentin Touzeau's avatar Valentin Touzeau Committed by Valentin Touzeau
Browse files

Adds support for Cudd and Extra libraries

parent 9a24ed1c
......@@ -14,6 +14,7 @@ set(SOURCES "src/exactlru.cpp"
"src/ClassificationBuilder.cpp"
)
add_subdirectory(ddlib)
# script
project(${PLUGIN})
......
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
set(HEADERS_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/cudd-2.3.1/include)
# Note: This folder is created when Cudd Makefile is executed.
# Because set_target_properties would fail if the file is not present, Cudd is compiled on cmake invocation, and not at build time.
# It is however not possible to build an empty include directory to delay Cudd compilation because Cudd needs this folder not to exist when running make.
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar xzf ${CMAKE_CURRENT_SOURCE_DIR}/cudd-2.3.1.tar.gz
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
execute_process(
COMMAND patch -p0 -i ${CMAKE_CURRENT_SOURCE_DIR}/cudd-2.3.1.patch
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar xzf ${CMAKE_CURRENT_SOURCE_DIR}/extra20a.tar.gz
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
execute_process(
COMMAND make
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cudd-2.3.1/
)
# CUDD
set(CUDD_LIB_FILE ${CMAKE_CURRENT_SOURCE_DIR}/cudd-2.3.1/cudd/libcudd.a)
set(EPD_LIB_FILE ${CMAKE_CURRENT_SOURCE_DIR}/cudd-2.3.1/epd/libepd.a)
add_library(cudd STATIC IMPORTED GLOBAL)
add_library(epd STATIC IMPORTED GLOBAL)
set_target_properties(cudd
PROPERTIES
IMPORTED_LOCATION ${CUDD_LIB_FILE}
INTERFACE_INCLUDE_DIRECTORIES ${HEADERS_FOLDER}
)
set_target_properties(epd
PROPERTIES
IMPORTED_LOCATION ${EPD_LIB_FILE}
INTERFACE_INCLUDE_DIRECTORIES ${HEADERS_FOLDER}
)
# EXTRA
set(EXTRA_LIB_FILE ${CMAKE_CURRENT_SOURCE_DIR}/cudd-2.3.1/cudd/libextra.a)
add_custom_command(
OUTPUT ${EXTRA_LIB_FILE}
COMMAND make
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/extra20/
)
add_custom_target(extra_target DEPENDS ${EXTRA_LIB_FILE})
add_library(extra STATIC IMPORTED GLOBAL)
add_dependencies(extra extra_target cudd)
set_target_properties(extra
PROPERTIES
IMPORTED_LOCATION ${EXTRA_LIB_FILE}
INTERFACE_INCLUDE_DIRECTORIES ${HEADERS_FOLDER}
)
# EXTRA
#
#set(EXTRA_LIB_FILE ${CMAKE_CURRENT_SOURCE_DIR}/extra20/libextra.a)
#set(EXTRA_HEADER_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/extra20/)
#
#add_custom_command(
# OUTPUT ${EXTRA_LIB_FILE}
# COMMAND make
# WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/extra20/
#)
#
#add_custom_target(extra_target DEPENDS ${EXTRA_LIB_FILE})
#
#add_library(extra STATIC IMPORTED GLOBAL)
#add_dependencies(extra extra_target)
#
#set_target_properties(extra
# PROPERTIES
# IMPORTED_LOCATION ${EXTRA_LIB_FILE}
# INTERFACE_INCLUDE_DIRECTORIES ${EXTRA_HEADER_FOLDER}
#)
diff -r -c cudd-2.3.1/Makefile cudd-2.3.1/Makefile
*** cudd-2.3.1/Makefile 2001-05-18 02:54:26.000000000 +0200
--- cudd-2.3.1/Makefile 2018-05-04 10:43:28.432815172 +0200
***************
*** 42,48 ****
#ICFLAGS =
# These two are typical settings for optimized code with gcc.
#ICFLAGS = -g -O6 -Wall
! ICFLAGS = -g -O6
# Use XCFLAGS to specify machine-dependent compilation flags.
# For some platforms no special flags are needed.
--- 42,49 ----
#ICFLAGS =
# These two are typical settings for optimized code with gcc.
#ICFLAGS = -g -O6 -Wall
! #ICFLAGS = -g -O6
! ICFLAGS = -g -O6 -fPIC
# Use XCFLAGS to specify machine-dependent compilation flags.
# For some platforms no special flags are needed.
***************
*** 52,58 ****
# Linux
#
# Gcc 2.8.1 or higher on i686.
! XCFLAGS = -mcpu=pentiumpro -malign-double -DHAVE_IEEE_754 -DBSD
#
#==========================
# Solaris
--- 53,60 ----
# Linux
#
# Gcc 2.8.1 or higher on i686.
! #XCFLAGS = -mcpu=pentiumpro -malign-double -DHAVE_IEEE_754 -DBSD
! XCFLAGS = -malign-double -DHAVE_IEEE_754 -DBSD
#
#==========================
# Solaris
diff -r -c cudd-2.3.1/util/util.h cudd-2.3.1/util/util.h
*** cudd-2.3.1/util/util.h 2001-02-14 19:08:51.000000000 +0100
--- cudd-2.3.1/util/util.h 2018-05-04 10:44:06.636813263 +0200
***************
*** 138,144 ****
/* most machines don't give us a header file for these */
#if (defined(__STDC__) || defined(__cplusplus) || defined(ultrix)) && !defined(MNEMOSYNE) || defined(__SVR4)
# include <stdlib.h>
! EXTERN void free ARGS((void *));
#else
# ifndef _IBMR2
extern VOID_OR_INT abort(), exit();
--- 138,144 ----
/* most machines don't give us a header file for these */
#if (defined(__STDC__) || defined(__cplusplus) || defined(ultrix)) && !defined(MNEMOSYNE) || defined(__SVR4)
# include <stdlib.h>
! /* EXTERN void free ARGS((void *)); */
#else
# ifndef _IBMR2
extern VOID_OR_INT abort(), exit();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment