September 2018
Intermediate to advanced
606 pages
14h 32m
English
Sanitizers have been available for a while with the Clang compiler and were later also introduced into the GCC toolset. They were designed for use with C and C++ programs, but recent versions of Fortran will understand the same flags and produce correctly instrumented libraries and executables. This recipe will however focus on a C++ example.
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)project(recipe-07 LANGUAGES CXX)set(CMAKE_CXX_STANDARD 11)set(CMAKE_CXX_EXTENSIONS OFF)set(CMAKE_CXX_STANDARD_REQUIRED ON)
list(APPEND CXX_BASIC_FLAGS "-g3" "-O1")
Read now
Unlock full access