Use SetTargetCPU from aocommon
Use SetTargetCPU.cmake in directory external/aocommon/CMake.
This CMake module provides a means for the user to set the target CPU used during compilation. If the (already existing) option PORTABLE is set to OFF, the native CPU will be used as target for compilation (existing behaviour). The user can override this by providing TARGET_CPU on the command-line, e.g. -DTARGET_CPU=haswell.
This feature was already available for DP3, but has now been made generally available through aocommon.