<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi all, <br></div><div><br></div><div>I'm refactoring some libraries cmake files to be compliant to the use of targets instead of tons of variables. Since these libraries are cross-compiled I'm facing some problem finding how to properly set some specific flags like: -march -marm -mfloat-abi etc. For now I set the CMAKE_CXX_FLAGS:</div><div><br></div><div>set(CMAKE_CXX_FLAGS -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 -Wno-psabi)<br></div></div><div><br></div><div>Is this the only way to do this? With targets I do something like this:</div><div><br></div><div>add_library(MyLib)</div><div># add sources</div><div>...</div><div># Comiler features<br></div><div>TARGET_COMPILE_FEATURES(MyLib PUBLIC cxx_lambdas)</div><div><br></div><div>Thanks, <br></div><div>Gabriele<br></div></div></div></div>