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 9da114e4 authored by Valentin Touzeau's avatar Valentin Touzeau Committed by EXT Valentin Touzeau
Browse files

Fix CMakeLists.txt

parent cd90f842
...@@ -37,9 +37,18 @@ endif() ...@@ -37,9 +37,18 @@ endif()
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/${PLUGIN}.eld DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/${PLUGIN}.eld DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
message(STATUS "otawa-config found at ${OTAWA_CONFIG}") message(STATUS "otawa-config found at ${OTAWA_CONFIG}")
execute_process(COMMAND "${OTAWA_CONFIG}" --cflags OUTPUT_VARIABLE OTAWA_CFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) execute_process(COMMAND "${OTAWA_CONFIG}" --cflags
execute_process(COMMAND "${OTAWA_CONFIG}" --libs --make-plug ${PLUGIN} -r OUTPUT_VARIABLE OTAWA_LDFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) OUTPUT_VARIABLE OTAWA_CFLAGS
execute_process(COMMAND "${OTAWA_CONFIG}" --prefix OUTPUT_VARIABLE OTAWA_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE) WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND "${OTAWA_CONFIG}" --libs --make-plug ${PLUGIN} -r
OUTPUT_VARIABLE OTAWA_LDFLAGS
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND "${OTAWA_CONFIG}" --prefix
OUTPUT_VARIABLE OTAWA_PREFIX
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
OUTPUT_STRIP_TRAILING_WHITESPACE)
# plugin definition # plugin definition
set(ORIGIN $ORIGIN) set(ORIGIN $ORIGIN)
...@@ -48,8 +57,8 @@ add_library(${PLUGIN} SHARED ${SOURCES}) ...@@ -48,8 +57,8 @@ add_library(${PLUGIN} SHARED ${SOURCES})
set_property(TARGET ${PLUGIN} PROPERTY PREFIX "") set_property(TARGET ${PLUGIN} PROPERTY PREFIX "")
set_property(TARGET ${PLUGIN} PROPERTY COMPILE_FLAGS "${OTAWA_CFLAGS} --std=c++11 -g -Wall -Wextra -pedantic") set_property(TARGET ${PLUGIN} PROPERTY COMPILE_FLAGS "${OTAWA_CFLAGS} --std=c++11 -g -Wall -Wextra -pedantic")
add_dependencies(${PLUGIN} compile_cudd) add_dependencies(${PLUGIN} cudd)
add_dependencies(${PLUGIN} compile_extra) add_dependencies(${PLUGIN} extra)
target_link_libraries(${PLUGIN} PUBLIC "${OTAWA_LDFLAGS}" cudd_core cudd_epd cudd_st cudd_util extra) target_link_libraries(${PLUGIN} PUBLIC "${OTAWA_LDFLAGS}" cudd_core cudd_epd cudd_st cudd_util extra)
......
add_custom_target( set(CUDD_LIB_FILE ${CMAKE_CURRENT_BINARY_DIR}/cudd-2.3.1/cudd/libcudd.a)
compile_cudd set(EPD_LIB_FILE ${CMAKE_CURRENT_BINARY_DIR}/cudd-2.3.1/epd/libepd.a)
set(ST_LIB_FILE ${CMAKE_CURRENT_BINARY_DIR}/cudd-2.3.1/st/libst.a)
set(UTIL_LIB_FILE ${CMAKE_CURRENT_BINARY_DIR}/cudd-2.3.1/util/libutil.a)
add_custom_command(
OUTPUT ${CUDD_LIB_FILE}
COMMAND ${CMAKE_COMMAND} -E tar xzf ${CMAKE_CURRENT_SOURCE_DIR}/cudd-2.3.1.tar.gz COMMAND ${CMAKE_COMMAND} -E tar xzf ${CMAKE_CURRENT_SOURCE_DIR}/cudd-2.3.1.tar.gz
COMMAND patch -p0 -i ${CMAKE_CURRENT_SOURCE_DIR}/cudd-2.3.1.patch COMMAND patch -p0 -i ${CMAKE_CURRENT_SOURCE_DIR}/cudd-2.3.1.patch
COMMAND cd cudd-2.3.1 && rm -r include COMMAND cd cudd-2.3.1 && rm -r include
...@@ -8,14 +13,24 @@ add_custom_target( ...@@ -8,14 +13,24 @@ add_custom_target(
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/
) )
add_custom_target(
cudd
DEPENDS ${CUDD_LIB_FILE}
)
#add_custom_target(
# compile_cudd
# COMMAND ${CMAKE_COMMAND} -E tar xzf ${CMAKE_CURRENT_SOURCE_DIR}/cudd-2.3.1.tar.gz
# COMMAND patch -p0 -i ${CMAKE_CURRENT_SOURCE_DIR}/cudd-2.3.1.patch
# COMMAND cd cudd-2.3.1 && rm -r include
# COMMAND cd cudd-2.3.1 && ./setup.sh
# COMMAND make -C cudd-2.3.1
# WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/
#)
set(HEADERS_FOLDER ${CMAKE_CURRENT_BINARY_DIR}/cudd-2.3.1/include) set(HEADERS_FOLDER ${CMAKE_CURRENT_BINARY_DIR}/cudd-2.3.1/include)
file(MAKE_DIRECTORY ${HEADERS_FOLDER}) file(MAKE_DIRECTORY ${HEADERS_FOLDER})
set(CUDD_LIB_FILE ${CMAKE_CURRENT_BINARY_DIR}/cudd-2.3.1/cudd/libcudd.a)
set(EPD_LIB_FILE ${CMAKE_CURRENT_BINARY_DIR}/cudd-2.3.1/epd/libepd.a)
set(ST_LIB_FILE ${CMAKE_CURRENT_BINARY_DIR}/cudd-2.3.1/st/libst.a)
set(UTIL_LIB_FILE ${CMAKE_CURRENT_BINARY_DIR}/cudd-2.3.1/util/libutil.a)
add_library(cudd_core STATIC IMPORTED GLOBAL) add_library(cudd_core STATIC IMPORTED GLOBAL)
add_library(cudd_epd STATIC IMPORTED GLOBAL) add_library(cudd_epd STATIC IMPORTED GLOBAL)
add_library(cudd_st STATIC IMPORTED GLOBAL) add_library(cudd_st STATIC IMPORTED GLOBAL)
......
add_custom_target( set(EXTRA_LIB_FILE ${CMAKE_CURRENT_BINARY_DIR}/extra20/libextra.a)
compile_extra
add_custom_command(
OUTPUT ${EXTRA_LIB_FILE}
COMMAND ${CMAKE_COMMAND} -E tar xzf ${CMAKE_CURRENT_SOURCE_DIR}/extra20a.tar.gz COMMAND ${CMAKE_COMMAND} -E tar xzf ${CMAKE_CURRENT_SOURCE_DIR}/extra20a.tar.gz
COMMAND patch -p0 -i ${CMAKE_CURRENT_SOURCE_DIR}/extra20.patch COMMAND patch -p0 -i ${CMAKE_CURRENT_SOURCE_DIR}/extra20.patch
COMMAND make -C extra20 COMMAND make -C extra20
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/
) )
add_custom_target(
extra
DEPENDS ${EXTRA_LIB_FILE}
)
add_dependencies(compile_extra compile_cudd) add_dependencies(compile_extra compile_cudd)
set(HEADERS_FOLDER ${CMAKE_CURRENT_BINARY_DIR}/extra20/) set(HEADERS_FOLDER ${CMAKE_CURRENT_BINARY_DIR}/extra20/)
......
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