I want to run automatic optimization flags benchmark for my cmake project.Project is cross-compiling, basic c/cxx flags are set in toolchain file assignable with -DCMAKE_TOOLCHAIN_FILE=<...>
.
I want to change c/cxx flags during benchmarking, but I don't want to change toolchain file on each benchmark iteration. I just want to change some flags set from toolchain to other value (for example, -mtune=cortex-a8
to -mtune=cortex-a9
). I think the best way is use -DMY_TUNE_FLAG=<..>
.
But how I can change previously set flag? (not append flag to c/cxx flags).