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
Currently our CMake scripts use three ways(I don't know if there are more) to add compiler:
add_definition
set_target_properties with COMPILE_FLAGS property
And for link libraries:
set_target_properties with LINK_FLAGS property
target_link_libraries
Some compiler requires those flags to be placed in appropriate places, e.g. #4030 (comment). It seems like target_link_libraries has some advantages over LINK_FLAGS way.
Modern CMake (2.8.12 and newer) provides a new way to add compiler flags: target_compile_options. Using COMPILE_FLAGS has been deprecated since this one is introduced.
The text was updated successfully, but these errors were encountered:
Currently our CMake scripts use three ways(I don't know if there are more) to add compiler:
add_definition
set_target_properties
withCOMPILE_FLAGS
propertyAnd for link libraries:
set_target_properties
withLINK_FLAGS
propertytarget_link_libraries
Some compiler requires those flags to be placed in appropriate places, e.g. #4030 (comment). It seems like
target_link_libraries
has some advantages overLINK_FLAGS
way.Modern CMake (2.8.12 and newer) provides a new way to add compiler flags:
target_compile_options
. UsingCOMPILE_FLAGS
has been deprecated since this one is introduced.The text was updated successfully, but these errors were encountered: