Template for new projects. Can also be used to update cmake scripts in existing projects by merging the changes. This repository intentionally does not have a README.md (which would create conflicts in the projects using this template). For documentation, please follow this link:
If the build type is Debug, we currently set the compiler optiomisation to -O0. We want this for debugging and the coverage report needs it.
The thread-sanitizer however needs -O1. As we set -O0 in the cmake scripts, we cannot set it to -O1 at the console.
Task:
[x] Introduce a custom CMake flag USE_TSAN
[x] If it is true, add -O1 -fsanitize=thread to CMAKE_CXX_FLAGS_DEBUG, else set -O0
[x] In enable_code_coverage_report print a warning if USE_TSAN is on, and don't activate the coverage report in CMAKE_CXX_FLAGS_DEBUG
If the build type is Debug, we currently set the compiler optiomisation to -O0. We want this for debugging and the coverage report needs it. The thread-sanitizer however needs -O1. As we set -O0 in the cmake scripts, we cannot set it to -O1 at the console.
Task:
[x] Introduce a custom CMake flag USE_TSAN
[x] If it is true, add
-O1 -fsanitize=thread
toCMAKE_CXX_FLAGS_DEBUG
, else set-O0
[x] In enable_code_coverage_report print a warning if USE_TSAN is on, and don't activate the coverage report in
CMAKE_CXX_FLAGS_DEBUG
[x] Add -DUSE_TSAN in the jenkins configuration.