<div dir="ltr"><div>I rely on these to detect options and flags:</div><div><br></div><div>$<TARGET_PROPERTY:${_target},COMPILE_FLAGS></div><div> $<TARGET_PROPERTY:${_target},COMPILE_OPTIONS></div><div><br></div><div>But not all options are picked up. These are missing:<br></div><div><br></div><div>1. Debug flag (when CMAKE_BUILD_TYPE=Debug)</div><div>2. -std=xx (CMAKE_CXX_STANDARD)</div><div><br></div><div>How can I reliably detect ALL compilation flags for a target?</div><div><br></div><div>Picking up these two flags is required for my pre-compiled header cmake hack[1]. 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=.</div><div><br></div><div>Lars</div><div><br></div><div><div>1) <a href="https://github.com/larsch/cmake-precompiled-header/">https://github.com/larsch/cmake-precompiled-header/</a></div><div><br></div></div><div><br></div><br></div>