Skip to content

Commit

Permalink
Merge #98: cmake: Follow-up on PR74
Browse files Browse the repository at this point in the history
0d985e5 fixup! cmake: Add `TryAppendCXXFlags` module (Hennadii Stepanov)

Pull request description:

  This PR is a follow-up on #74.

  No need to try a flag in the linker context if it is not supported in the compiler context.

  For example, on the staging branch:
  ```
  $ env CC=clang CXX=clang++ cmake -B build
  ...
  -- Performing Test CXX_SUPPORTS__FSTACK_REUSE_NONE
  -- Performing Test CXX_SUPPORTS__FSTACK_REUSE_NONE - Failed
  CMake Warning at cmake/module/TryAppendCXXFlags.cmake:125 (message):
    The -fstack-reuse=none fail(s) to link.
  Call Stack (most recent call first):
    CMakeLists.txt:310 (try_append_cxx_flags)

  ...
  ```

Top commit has no ACKs.

Tree-SHA512: 6e73f00838eeb066635cbbf1acb41955b32a83e9939b1cabe62152b312d2e9c1f8dcacb6b11f529769b541925cc778d9e63e0968615ff4404a393115199300f5
  • Loading branch information
hebasto committed Feb 9, 2024
2 parents 6367599 + 0d985e5 commit 9b72eb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/module/TryAppendCXXFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function(try_append_cxx_flags flags)
set(${TACXXF_RESULT_VAR} "${${result}}" PARENT_SCOPE)
endif()

if(TACXXF_SKIP_LINK)
if(NOT ${result} OR TACXXF_SKIP_LINK)
return()
endif()

Expand Down

0 comments on commit 9b72eb1

Please sign in to comment.