This commit is contained in:
Harsh Vardhan 2023-03-29 09:39:19 -07:00
commit e16874dc50
2 changed files with 22 additions and 16 deletions

View File

@ -473,7 +473,10 @@ configure_file(${STA_HOME}/util/StaConfig.hh.cmake
# compatibility with configure
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${STA_HOME}/app)
add_library(OpenSTA
add_library(OpenSTA)
target_sources(OpenSTA
PRIVATE
${STA_SOURCE}
${STA_TCL_INIT}
@ -493,6 +496,23 @@ add_library(OpenSTA
${BISON_VerilogParser_OUTPUTS}
)
target_link_libraries(OpenSTA
${TCL_LIBRARY}
${CMAKE_THREAD_LIBS_INIT}
)
if (TCL_READLINE_LIBRARY)
target_link_libraries(OpenSTA ${TCL_READLINE_LIBRARY})
endif()
if (ZLIB_LIBRARIES)
target_link_libraries(OpenSTA ${ZLIB_LIBRARIES})
endif()
if (CUDD_LIB)
target_link_libraries(OpenSTA ${CUDD_LIB})
endif()
target_include_directories(OpenSTA
PUBLIC
include
@ -534,22 +554,8 @@ add_executable(sta app/Main.cc)
target_link_libraries(sta
sta_swig
OpenSTA
${TCL_LIBRARY}
${CMAKE_THREAD_LIBS_INIT}
)
if (TCL_READLINE_LIBRARY)
target_link_libraries(sta ${TCL_READLINE_LIBRARY})
endif()
if (ZLIB_LIBRARIES)
target_link_libraries(sta ${ZLIB_LIBRARIES})
endif()
if (CUDD_LIB)
target_link_libraries(sta ${CUDD_LIB})
endif()
message(STATUS "STA executable: ${STA_HOME}/app/sta")
################################################################

View File

@ -342,7 +342,7 @@ private:
BusPort::BusPort(const char *name,
int from,
PortDirection *direction) :
name_(name),
name_(stringCopy(name)),
from_(from),
to_(from),
direction_(direction),