diff --git a/CMakeLists.txt b/CMakeLists.txt index b64c6eb..4a9c6f7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,13 @@ set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) +option(CODE_COVERAGE "Collect coverage" OFF) + +if(CODE_COVERAGE) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 --coverage") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 --coverage") +endif() + find_package(Qt6 REQUIRED COMPONENTS Widgets Core Test) qt_standard_project_setup()