[flang-commits] [flang] [flang] Simplify LIBTYPE logic (PR #98072)
Michael Kruse via flang-commits
flang-commits at lists.llvm.org
Tue Jul 9 07:10:56 PDT 2024
Meinersbur wrote:
To elaborate on the idea of making forwarding of flags easier:
```cmake
function(bool_argument_as_forwardable_flag prefix flag)
if ("${${prefix}_${flag}}")
set("${prefix}_${flag}" "${flag}" PARENT_SCOPE)
else()
set("${prefix}_${flag}" "" PARENT_SCOPE)
endif()
endfunction()
bool_argument_as_forwardable_flag(ARG STATIC)
bool_argument_as_forwardable_flag(ARG SHARED)
llvm_add_library(${name} ${ARG_STATIC} ${ARG_SHARED} [...])
```
https://github.com/llvm/llvm-project/pull/98072
More information about the flang-commits
mailing list