In the cmake question Difference between add_compile_options and SET(CMAKE_CXX_FLAGS...) , the accepted answer compares setting CMAKE_CXX_FLAGS
and using add_compile_options
.
While the answer to the question lays out the differences, my question is which is best practice in a cmakefile? Are there benefits to using one over the other?