Clement Deschamps
Builds for 1 pipeline passed in 6 minutes 29 seconds

qbox: Added a CMakeLists.txt to import project from a parent project

include(ExternalProject)
set(QBOX_CONFIGURE_COMMAND
${CMAKE_SOURCE_DIR}/libs/qbox/configure
--target-list=aarch64-softmmu
--library
--qbox
--tlm2c-includedir="$<JOIN:$<TARGET_PROPERTY:Tlm2c::tlm2c,INTERFACE_INCLUDE_DIRECTORIES>, >"
--tlm2c-libdir="$<TARGET_FILE_DIR:Tlm2c::tlm2c>"
--prefix=${CMAKE_CURRENT_BINARY_DIR}/libs/qbox/install
--disable-pie
--extra-cflags=-fPIC\ -fpic\ -ftls-model=global-dynamic
--enable-debug
)
ExternalProject_Add(qbox
SOURCE_DIR ${CMAKE_SOURCE_DIR}/libs/qbox
INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/install
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}
TMP_DIR ${CMAKE_CURRENT_BINARY_DIR}/tmp
STAMP_DIR ${CMAKE_CURRENT_BINARY_DIR}/stampdir
CONFIGURE_COMMAND ${QBOX_CONFIGURE_COMMAND}
PREFIX ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS Tlm2c::tlm2c
BUILD_COMMAND $(MAKE)
)
ExternalProject_Add_Step(qbox force-build
DEPENDEES update
DEPENDERS build
ALWAYS 1
)
... ...
... ... @@ -401,7 +401,8 @@ libexecdir="\${prefix}/libexec"
includedir="\${prefix}/include"
sysconfdir="\${prefix}/etc"
local_statedir="\${prefix}/var"
tlm2cdir="\${prefix}"
tlm2c_includedir="\${prefix}/include"
tlm2c_libdir="\${prefix}/lib"
confsuffix="/qemu"
slirp="yes"
oss_lib=""
... ... @@ -930,7 +931,13 @@ for opt do
;;
--qbox) qbox="yes"
;;
--with-tlm2c=*) tlm2cdir="$optarg"
--with-tlm2c=*) # legacy option
tlm2c_includedir="$optarg/include"
tlm2c_libdir="$optarg/lib"
;;
--tlm2c-includedir=*) tlm2c_includedir="$optarg"
;;
--tlm2c-libdir=*) tlm2c_libdir="$optarg"
;;
--version|-V) exec cat $source_path/VERSION
;;
... ... @@ -1526,24 +1533,25 @@ if [ "$library" != "no" ] && [ "$mingw32" != "yes" ] ; then
fi
if test "$qbox" = "yes" ; then
tlm2cdir=`eval echo $tlm2cdir`
if [ ! -e "$tlm2cdir/include/tlm2c" ]; then
tlm2c_includedir=`eval echo $tlm2c_includedir`
tlm2c_libdir=`eval echo $tlm2c_libdir`
if [ ! -e "$tlm2c_includedir/tlm2c" ]; then
error_exit "unable to find GreenSocs tlm2c library." \
"try to specify the path with: '--with-tlm2c=*'."
fi
QEMU_CFLAGS="$QEMU_CFLAGS -I$tlm2cdir/include"
libs_softmmu="-L$tlm2cdir/lib -ltlm2c $libs_softmmu"
fi
if test "$qbox" = "yes" ; then
tlm2cdir=`eval echo $tlm2cdir`
if [ ! -e "$tlm2cdir/include/tlm2c" ]; then
error_exit "unable to find GreenSocs tlm2c library." \
"try to specify the path with: '--with-tlm2c=*'."
fi
QEMU_CFLAGS="$QEMU_CFLAGS -I$tlm2cdir/include"
libs_softmmu="-L$tlm2cdir/lib -ltlm2c $libs_softmmu"
fi
QEMU_CFLAGS="$QEMU_CFLAGS -I$tlm2c_includedir"
libs_softmmu="-L$tlm2c_libdir -ltlm2c $libs_softmmu"
fi
#if test "$qbox" = "yes" ; then
# tlm2cdir=`eval echo $tlm2cdir`
# if [ ! -e "$tlm2cdir/include/tlm2c" ]; then
# error_exit "unable to find GreenSocs tlm2c library." \
# "try to specify the path with: '--with-tlm2c=*'."
# fi
# QEMU_CFLAGS="$QEMU_CFLAGS -I$tlm2cdir/include"
# libs_softmmu="-L$tlm2cdir/lib -ltlm2c $libs_softmmu"
#fi
QEMU_CFLAGS="$CPU_CFLAGS $QEMU_CFLAGS"
... ...