Use -Wl,--as-needed
This commit is contained in:
parent
aa5afd0a41
commit
49ca0abd71
1 changed files with 5 additions and 0 deletions
|
|
@ -17,6 +17,11 @@ INTERFACE
|
||||||
-Wno-sign-compare
|
-Wno-sign-compare
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_link_options(common_options
|
||||||
|
INTERFACE
|
||||||
|
-Wl,--as-needed
|
||||||
|
)
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
target_compile_options(common_options
|
target_compile_options(common_options
|
||||||
INTERFACE
|
INTERFACE
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue