Код: Выделить всё
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options(myapp PRIVATE
$
$)
target_link_libraries(myapp $) #
Подробнее здесь: [url]https://stackoverflow.com/questions/78434602/how-can-i-handle-multiple-gcc-stdc-configurations-in-cmake-for-glibcxx-debug[/url]