Skip to content
Snippets Groups Projects
Commit b86951ef authored by Soeren Peters's avatar Soeren Peters
Browse files

Use G++11 for gcovr.

parent d93aad87
No related branches found
No related tags found
1 merge request!237Adds Ubuntu 22_04 image.
......@@ -509,7 +509,7 @@ lizard:
###############################################################################
# code coverage
gcov_gcc_12:
gcov_gcc_11:
stage: analyze
extends: .analyze_template
......@@ -518,14 +518,15 @@ gcov_gcc_12:
before_script:
- gcovr --version
- export CC=/usr/bin/gcc-11
- export CXX=/usr/bin/g++-11
script:
- mkdir -p $CI_PROJECT_DIR/build
- mkdir -p $CI_PROJECT_DIR/builda
- cd $CI_PROJECT_DIR/build
- cmake ..
--preset=make_all
-DCMAKE_CUDA_ARCHITECTURES=60
-DBUILD_VF_COVERAGE=ON
-DCMAKE_BUILD_TYPE=PROFILE
- make -j4
- ctest
- cd ..
......
......@@ -17,10 +17,10 @@ if(NOT BUILD_VF_INCLUDE_WHAT_YOU_USE) # optimization flag '-funroll-all-loops' i
endif()
# gcov
if (BUILD_VF_COVERAGE)
list(APPEND CS_COMPILER_FLAGS_CXX "--coverage")
set(CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} " --coverage")
endif()
# According to https://gcovr.com/en/stable/cookbook.html#out-of-source-builds-with-cmake
# This flags are used if cmake is called with -DCMAKE_BUILD_TYPE=PROFILE
set(CMAKE_C_FLAGS_PROFILE --coverage)
set(CMAKE_CXX_FLAGS_PROFILE --coverage)
#############################################################################################################
# warnings
......
......@@ -58,7 +58,6 @@ option(BUILD_VF_UNIT_TESTS "Build VirtualFluids unit tests" OFF)
option(BUILD_VF_CLANG_TIDY "Add the clang tidy checks to the targets" OFF)
option(BUILD_VF_INCLUDE_WHAT_YOU_USE "Add IWYU to the targets" OFF)
option(BUILD_VF_CPPCHECK "Add cppcheck to the targets" OFF)
option(BUILD_VF_COVERAGE "Add the -coverage compiler flag." OFF)
option(BUILD_CUDA_LTO "Enables the cuda link optimization." OFF)
......
......@@ -10,7 +10,7 @@
#include <string>
#include <fstream>
#include <iostream>
#include <stdlib.h>
#include <cstdlib>
#include <basics/utilities/UbException.h>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment