<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:12pt"><div id="yiv1648142465"><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: Courier New,courier,monaco,monospace,sans-serif; font-size: 12pt;"><div id="yiv1648142465yui_3_2_0_25_130704809289140">Hi,<span><br></span></div><div id="yiv1648142465yui_3_2_0_25_130704809289140"><br></div><div id="yiv1648142465yui_3_2_0_25_130704809289140">I cannot understand how to include the flags -fprofile-arcs -ftest-coverage to the compiler/linker flags or purify flags in my CMakeLists.txt. Why can't CTest application and/or INCLUDE(CTest) itself do this automatically as it knows the specific platform and coverage/memcheck tool used.<br><br>If I explicitly add the flags to CMAKE_C_FLAGS / CMAKE_EXE_LINKER_FLAGS, the script becomes compiler/tool dependent. Also these flags gets included unwanted in normal
 build also.<br></div><br>Is there a platform independent and tool independent solution for the user? All the tutorials only explain how to add tests and how to do "make Experimental/Nightly", but none of them explains how the compiler-specific and tool-specific flags are to be added during CTest build for the coverage/memcheck tools to work.<br><br>Regards,<br>Arun<br><br></div></div></div></body></html>