CMake output lib/exe fixes (#244)

* Fixes #167

* No need to make app/ directory, it's already there

* Put lib/exe only in build dir, update docs and other references accordingly

* Remove gitignore stuff

* Bump CMake version too

* Minor correction to be more exact

* Update regression_vars.tcl

* Requested txt fixes

* Update date
This commit is contained in:
Akash Levy 2025-05-19 15:04:49 -07:00 committed by GitHub
parent ac02981b62
commit c416229106
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 17 additions and 20 deletions

5
.gitignore vendored
View File

@ -15,11 +15,6 @@ cmake-build-debug
build
pvt
app/sta
app/libOpenSTA.*
app/sta.exe
app/sta.dSYM
# iverilog turd
examples/gcd_tb

View File

@ -32,7 +32,7 @@ if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.14)
cmake_policy(SET CMP0086 NEW)
endif()
project(STA VERSION 2.6.2
project(STA VERSION 2.7.0
LANGUAGES CXX
)
@ -471,9 +471,6 @@ target_include_directories(sta_swig
# Library
###########################################################
# compatibility with configure
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${STA_HOME}/app)
add_library(OpenSTA)
target_sources(OpenSTA
@ -553,13 +550,12 @@ target_compile_options(OpenSTA
set_target_properties(OpenSTA PROPERTIES CXX_EXTENSIONS OFF)
target_compile_features(OpenSTA PUBLIC cxx_std_17)
message(STATUS "STA library: ${CMAKE_BINARY_DIR}/libOpenSTA.a")
###########################################################
# Executable
###########################################################
# compatibility with configure
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${STA_HOME}/app)
# Note executable and lib name cannot be the same because
# on osx something is case insensitive. Using STA for the
# lib name results in "No rule to make target ../depend.
@ -570,7 +566,7 @@ target_link_libraries(sta
OpenSTA
)
message(STATUS "STA executable: ${STA_HOME}/app/sta")
message(STATUS "STA executable: ${CMAKE_BINARY_DIR}/sta")
################################################################
# Install

View File

@ -64,4 +64,4 @@ RUN source /opt/rh/devtoolset-11/enable && \
make -j`nproc`
# Run sta on entry
ENTRYPOINT ["/OpenSTA/app/sta"]
ENTRYPOINT ["/OpenSTA/build/sta"]

View File

@ -40,4 +40,4 @@ RUN cd OpenSTA && \
make -j`nproc`
# Run sta on entry
ENTRYPOINT ["OpenSTA/app/sta"]
ENTRYPOINT ["OpenSTA/build/sta"]

View File

@ -157,8 +157,8 @@ cmake -DCUDD_DIR=<CUDD_INSTALL_DIR> ,.
make
```
The default build type is release to compile optimized code.
The resulting executable is in `app/sta`.
The library without a `main()` procedure is `app/libSTA.a`.
The resulting executable is in `build/sta`.
The library without a `main()` procedure is `build/libOpenSTA.a`.
Optional CMake variables passed as -D<var>=<value> arguments to CMake are show below.

View File

@ -24,7 +24,7 @@
This file summarizes STA API changes for each release.
Release 2.6.2 2024/03/30
Release 2.6.2 2025/03/30
------------------------
The following functions have been renamed to to_string and return std::string

View File

@ -3,7 +3,13 @@ OpenSTA Timing Analyzer Release Notes
This file summarizes user visible changes for each release.
Realase 2.6.1 2025/03/30
Release 2.7.0 2025/05/19
-------------------------
The OpenSTA library `libOpenSTA` and `sta` executable are now built in the
build directory instead of `app/`.
Release 2.6.1 2025/03/30
-------------------------
The -list_annotated and -list_not_annotated arguments to the

View File

@ -35,7 +35,7 @@
# Application program to run tests on.
set app "sta"
set sta_dir [file dirname $test_dir]
set app_path [file join $sta_dir "app" $app]
set app_path [file join $sta_dir "build" $app]
# Application options.
set app_options "-no_init -no_splash -exit"
# Log files for each test are placed in result_dir.