Merge bitcoin/bitcoin#31722: cmake: Copy cov_tool_wrapper.sh.in to the build tree

e3c015276962192355e16ca91391b8bc8e188291 cmake: Copy `cov_tool_wrapper.sh.in` to the build tree (Hennadii Stepanov)

Pull request description:

  This PR ensures that `cov_tool_wrapper.sh.in` is available when invoking the `Coverage.cmake` script from any directory.

  Here is an example of usage on Ubuntu 24.10 with the default GCC 14.2.0:
  ```
  $ cmake -B build -DCMAKE_BUILD_TYPE=Coverage -DCMAKE_CXX_FLAGS="-fprofile-update=atomic" -DCMAKE_C_FLAGS="-fprofile-update=atomic"
  $ cmake --build build -j $(nproc)
  $ cd ..
  $ cmake -DJOBS=$(nproc) -DLCOV_OPTS="--ignore-errors inconsistent,inconsistent" -P bitcoin/build/Coverage.cmake
  ```

  Fixes https://github.com/bitcoin/bitcoin/issues/31638.

ACKs for top commit:
  theuni:
    utACK e3c015276962192355e16ca91391b8bc8e188291

Tree-SHA512: ccfc8e893567f199d9b05ea3916cac06fca89c5892cc7492d5251c331c35408222fd918ed08017515e2dfca10970ae3f633b3917bfb7037db539559e71d7f711
This commit is contained in:
merge-script 2025-02-13 10:34:28 +01:00
commit 55cf39e4c5
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1
3 changed files with 2 additions and 1 deletions

View File

@ -458,6 +458,7 @@ endif()
configure_file(cmake/script/Coverage.cmake Coverage.cmake USE_SOURCE_PERMISSIONS COPYONLY)
configure_file(cmake/script/CoverageFuzz.cmake CoverageFuzz.cmake USE_SOURCE_PERMISSIONS COPYONLY)
configure_file(cmake/script/CoverageInclude.cmake.in CoverageInclude.cmake USE_SOURCE_PERMISSIONS @ONLY)
configure_file(cmake/script/cov_tool_wrapper.sh.in cov_tool_wrapper.sh.in USE_SOURCE_PERMISSIONS COPYONLY)
configure_file(contrib/filter-lcov.py filter-lcov.py USE_SOURCE_PERMISSIONS COPYONLY)
# Don't allow extended (non-ASCII) symbols in identifiers. This is easier for code review.

View File

@ -12,7 +12,7 @@ endif()
# COV_TOOL is used to replace a placeholder.
configure_file(
cmake/cov_tool_wrapper.sh.in ${CMAKE_CURRENT_LIST_DIR}/cov_tool_wrapper.sh
${CMAKE_CURRENT_LIST_DIR}/cov_tool_wrapper.sh.in ${CMAKE_CURRENT_LIST_DIR}/cov_tool_wrapper.sh
FILE_PERMISSIONS OWNER_READ OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ