The-OpenROAD-Project / The-OpenROAD-Project/OpenSTA
CMakeFile generates StaConfig.hh in source tree instead of build tree
Nobody has claimed this yet.
- Dominant language
- Verilog
- Stars
- 619
- Forks
- 270
- Avg merge
- 5d 15h
- Merged PRs (30d)
- 4
Description
The CMake file in sta generates its config in STA_HOME instead of CMAKE_CURRENT_BINARY_DIR.
Because of that, if cmake is run and then bazel is run, the compiler finds the wrong StaConfig.hh and complains about tclreadline not found (because that is not compiled into the bazel build yet). The bazel build generates its own version, but because the cmake configure creates that in the wrong place, it will mess up things.
So what I believe should be done is:
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -392,7 +392,7 @@ message(STATUS "SSTA: ${SSTA}")
# configure a header file to pass some of the CMake settings
configure_file(${STA_HOME}/util/StaConfig.hh.cmake
- ${STA_HOME}/include/sta/StaConfig.hh
+ ${CMAKE_CURRENT_BINARY_DIR}/include/sta/StaConfig.hh
)
###########################################################
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in CMakeLists.txt around the configure_file call near the SSTA status message, and compare the configured header path with CMAKE_CURRENT_BINARY_DIR. Verify that CMake places include/sta/StaConfig.hh in the build tree rather than STA_HOME, then check that running CMake followed by Bazel no longer causes the conflicting header or tclreadline error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100