Merge branch 'parallaxsw:master' into master

This commit is contained in:
Akash Levy 2024-08-12 19:34:47 -07:00 committed by GitHub
commit 0d43ef1ce1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 27 additions and 20 deletions

View File

@ -336,6 +336,7 @@ add_custom_command(OUTPUT ${STA_TCL_INIT}
# Do not use REQUIRED because it also requires TK, which is not used by OpenSTA.
find_package(TCL)
# Referenced by util/StaConfig.hh.cmake
set(TCL_READLINE 0)
# check for tclReadline
if (USE_TCL_READLINE)
@ -352,13 +353,19 @@ if (USE_TCL_READLINE)
)
if (TCL_READLINE_LIBRARY)
message(STATUS "TCL readline library: ${TCL_READLINE_LIBRARY}")
# Referenced by StaConfig.hh.cmake
set(TCL_READLINE 1)
else()
message(STATUS "TCL readline library: NOT FOUND")
endif()
find_path(TCL_READLINE_INCLUDE tclreadline.h)
if (TCL_READLINE_INCLUDE)
message(STATUS "TCL readline header: ${TCL_READLINE_INCLUDE}/tclreadline.h")
else()
message(STATUS "TCL readline header: NOT FOUND")
endif()
if (TCL_READLINE_LIBRARY AND TCL_READLINE_INCLUDE)
set(TCL_READLINE 1)
endif()
endif()
@ -515,21 +522,14 @@ target_link_libraries(OpenSTA
${CUDD_LIB}
)
if (TCL_READLINE_LIBRARY)
target_link_libraries(OpenSTA ${TCL_READLINE_LIBRARY})
endif()
if (ZLIB_LIBRARIES)
target_link_libraries(OpenSTA ${ZLIB_LIBRARIES})
endif()
target_link_libraries(OpenSTA )
target_include_directories(OpenSTA
PUBLIC
include
${TCL_INCLUDE_PATH}
${TCL_READLINE_INCLUDE}
PRIVATE
include/sta
@ -537,6 +537,13 @@ target_include_directories(OpenSTA
${CUDD_INCLUDE}
)
if (TCL_READLINE)
target_link_libraries(OpenSTA ${TCL_READLINE_LIBRARY})
target_include_directories(OpenSTA
PUBLIC
${TCL_READLINE_INCLUDE})
endif()
# common to gcc/clang
set(CXX_FLAGS -Wall -Wextra -pedantic -Wcast-qual -Wredundant-decls -Wformat-security)

View File

@ -2,31 +2,32 @@ FROM ubuntu:18.04
LABEL author="James Cherry"
LABEL maintainer="James Cherry <cherry@parallaxsw.com>"
# install basics
# Install basics
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y wget apt-utils git cmake gcc tcl-dev swig bison flex
apt-get install -y wget cmake gcc tcl-dev tcl-tclreadline libeigen3-dev swig bison flex
# download CUDD
RUN wget https://www.davidkebo.com/source/cudd_versions/cudd-3.0.0.tar.gz && \
# Download CUDD
RUN wget https://raw.githubusercontent.com/davidkebo/cudd/main/cudd_versions/cudd-3.0.0.tar.gz && \
tar -xvf cudd-3.0.0.tar.gz && \
rm cudd-3.0.0.tar.gz
# install CUDD
# Install CUDD
RUN cd cudd-3.0.0 && \
mkdir ../cudd && \
./configure --prefix=$HOME/cudd && \
make && \
./configure && \
make -j`nproc` && \
make install
# copy files and install OpenSTA
# Copy files and install OpenSTA
RUN mkdir OpenSTA
COPY . OpenSTA
RUN cd OpenSTA && \
rm -rf build && \
mkdir build && \
cd build && \
cmake .. -DCUDD=$HOME/cudd && \
make
cmake .. && \
make -j`nproc`
# Run sta on entry
ENTRYPOINT ["OpenSTA/app/sta"]

View File

@ -19,7 +19,6 @@
#include <stdio.h>
#include <cstdlib> // exit
#include <filesystem>
#include <tcl.h>
#if TCL_READLINE
#include <tclreadline.h>