Difference between add_compile_options and SET(CMAKE_CXX_FLAGS…)
CMAKE_CXX_FLAGS is used to add flags for all C++ targets. That’s handy to pass general arguments like warning levels or to selected required C++ standards. It has no effect on C or Fortran targets and the user might pass additional flags. add_compile_options adds the options to all targets within the directory and its sub-directories. This … Read more