You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From my understanding target_compile_options can be replaced by the more appropriate target_link_options.
Motivation
Functionally there's no difference, but adding linker-specific flags to the compilation step will raise warnings e.g. clang: error: argument unused during compilation: '-fuse-ld=mold' [-Werror,-Wunused-command-line-argument] in certain setups.
Example from CI in a project of mine. Treating warnings as errors means this harmless warning caused CI to fail.
Using target_link_options resolved it.
Thank you for sharing and maintaining this template project, it is a tremendous help!
The text was updated successfully, but these errors were encountered:
cmake_template/cmake/Linker.cmake
Line 29 in d19d892
From my understanding
target_compile_options
can be replaced by the more appropriatetarget_link_options
.Motivation
Functionally there's no difference, but adding linker-specific flags to the compilation step will raise warnings e.g.
clang: error: argument unused during compilation: '-fuse-ld=mold' [-Werror,-Wunused-command-line-argument]
in certain setups.Example from CI in a project of mine. Treating warnings as errors means this harmless warning caused CI to fail.
Using
target_link_options
resolved it.The text was updated successfully, but these errors were encountered: