diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2024-04-26 13:38:41 +0100 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2024-08-16 21:19:11 +0100 |
commit | 1f60b30df0cb58a7381a1bfbd6d34f002232e862 (patch) | |
tree | 2b0782f8b46976e79497a6d618f5092f7d61a1cf /cmake | |
parent | 2b43c45b13ad00cfd9928a03da8a480977724cb1 (diff) |
cmake: Add `APPEND_{CPP,C,CXX,LD}FLAGS` cache variables
The content of those variables is appended to the each target after the
flags added by the build system.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/module/FlagsSummary.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cmake/module/FlagsSummary.cmake b/cmake/module/FlagsSummary.cmake index c31cd73342..9a408f715d 100644 --- a/cmake/module/FlagsSummary.cmake +++ b/cmake/module/FlagsSummary.cmake @@ -29,6 +29,8 @@ function(print_flags_per_config config indent_num) endif() get_target_interface(core_cxx_flags "${config}" core_interface COMPILE_OPTIONS) string(STRIP "${combined_cxx_flags} ${core_cxx_flags}" combined_cxx_flags) + string(STRIP "${combined_cxx_flags} ${APPEND_CPPFLAGS}" combined_cxx_flags) + string(STRIP "${combined_cxx_flags} ${APPEND_CXXFLAGS}" combined_cxx_flags) indent_message("C++ compiler flags ...................." "${combined_cxx_flags}" ${indent_num}) string(STRIP "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${config_uppercase}}" combined_linker_flags) @@ -38,6 +40,7 @@ function(print_flags_per_config config indent_num) if(CMAKE_CXX_LINK_PIE_SUPPORTED) string(JOIN " " combined_linker_flags ${combined_linker_flags} ${CMAKE_CXX_LINK_OPTIONS_PIE}) endif() + string(STRIP "${combined_linker_flags} ${APPEND_LDFLAGS}" combined_linker_flags) indent_message("Linker flags .........................." "${combined_linker_flags}" ${indent_num}) endfunction() |