We will analyse such code
cmake_minimum_required(VERSION 3.10)
project(ProjectName)
add_executable(execName main.cpp file.cpp)
add_executable( [source1] [source2 ...])
add_library( [STATIC | SHARED | MODULE] [source1] [source2 ...])
add_library(${PROJECT_NAME}-lib STATIC functions.cpp modules.cpp)
add_executable(${PROJECT_NAME} main.cpp functions.cpp modules.cpp)
add_executable(${PROJECT_NAME}-ut test.cpp functions.cpp modules.cpp)
Your abilities after C++ toolset training
- can choose proper compiler flags depending on the destination of the binary
- can write proper modern CMakeLists.txt
- can use sanitizers to discover problems with memory, data races, undefined behavior
- can use valgrind tools to discover cache misses, data races, memory leaks and usage
- can use GNU binutils for examining a compiled binary and extracting useful information
- can use gdb (GNU debugger) to examine multithreading programs, uncaught exceptions, set traps on data change, change program flow and variables values during execution
- can use static analyzers to deepen code analysis
Agenda
Agenda: Day 1
- compilers: g++, clang++
- make
- cmake
- dynamic analyzers: sanitizers
- dynamic analyzers: valgrind overview: memcheck, cachegrind, helgrind, massif
- recap
Agenda: Day 2
- GNU binutils (objdump, c++filt, nm, size, strings, strip)
- gdb - advanced debugging
- online tools - godbolt, quickbench
- static analyzers: clang-tidy, cppcheck
- recap
Activities
- pre-work to be done before our training
- pre-test pre-test at the beginning
- exercises followed by trainers implementation
- coding dojo
- participants solutions code review
- post-work with code review
- post-test one week after the training
- certificate of completion
Duration
- 2 day (11 hours with breaks)
Form
- online
- classroom