Skip to content

Commit 9b72eb1

Browse files
committed
Merge #98: cmake: Follow-up on PR74
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
2 parents 6367599 + 0d985e5 commit 9b72eb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/module/TryAppendCXXFlags.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function(try_append_cxx_flags flags)
102102
set(${TACXXF_RESULT_VAR} "${${result}}" PARENT_SCOPE)
103103
endif()
104104

105-
if(TACXXF_SKIP_LINK)
105+
if(NOT ${result} OR TACXXF_SKIP_LINK)
106106
return()
107107
endif()
108108

0 commit comments

Comments
 (0)