But not all options are picked up. These are missing:
1. Debug flag (when CMAKE_BUILD_TYPE=Debug)
2. -std=xx (CMAKE_CXX_STANDARD)
How can I reliably detect ALL compilation flags for a target?
Picking up these two flags is required for my pre-compiled header cmake hack. It used to work OK. I guess Debug can be detected and picked up from _FLAGS_DEBUG, but I don't see a way to pick up -std=.