Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: Implement prefix maps #298

Merged
merged 1 commit into from
Aug 3, 2024
Merged

cmake: Implement prefix maps #298

merged 1 commit into from
Aug 3, 2024

Conversation

hebasto
Copy link
Owner

@hebasto hebasto commented Aug 2, 2024

This PR implements the following Autotools functionality:

bitcoin/configure.ac

Lines 1481 to 1484 in f63b200

if test "$use_ccache" = "yes"; then
AX_CHECK_COMPILE_FLAG([-fdebug-prefix-map=A=B], [DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -fdebug-prefix-map=\$(abs_top_srcdir)=."], [], [$CXXFLAG_WERROR])
AX_CHECK_PREPROC_FLAG([-fmacro-prefix-map=A=B], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -fmacro-prefix-map=\$(abs_top_srcdir)=."], [], [$CXXFLAG_WERROR])
fi

Fixes #297.

Implement prefix maps.
@hebasto hebasto added the bug Something isn't working label Aug 2, 2024
Copy link

@maflcko maflcko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@hebasto hebasto merged commit 30ac8c3 into cmake-staging Aug 3, 2024
40 checks passed
hebasto added a commit that referenced this pull request Aug 15, 2024
af1ab38 fixup! cmake: Add `ccache` support (Hennadii Stepanov)
855f7e4 fixup! cmake: Add `ccache` support (Hennadii Stepanov)

Pull request description:

  1. From bitcoin#30454 (comment):
  > I think we can improve the output when `-DWITH_CCACHE=OFF` is used. Depending on the system, that output might be:
  >
  > ```
  > cmake -B build -DWITH_CCACHE=OFF
  > < snip >
  > Use ccache for compiling .............. ccache masquerades as the compiler
  > ```
  >
  > We should probably at least indicate that the option was respected by the build-system.

  With this PR on Fedora 40:
  ```
  $ cmake -B build -DWITH_CCACHE=OFF
  < snip >
  Use ccache for compiling .............. ON

    ******

  CMake Warning at CMakeLists.txt:656 (message):
    Disabling ccache was attempted using -DWITH_CCACHE=OFF, but ccache
    masquerades as the compiler.

    ******
  ```

  2. The second commit fixes a bug introduced in #298.

Top commit has no ACKs.

Tree-SHA512: cd5e9b1a6618e147cd1ac9d1b592b7c5e3dd650caa53cd80c0db7a00d2bfd510882c39ac88ee028494faa09bc03cdfba9024124c619dc12d0289a085d32876d9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cmake: -logsourcelocations file name differences
2 participants