Sane C++ Libraries
C++ Platform Abstraction Libraries
Loading...
Searching...
No Matches
SC::Build::CompileFlags Struct Reference

Compile flags (include paths, preprocessor defines etc.) More...

#include <Build.h>

Public Member Functions

bool disableWarnings (Span< const uint32_t > number)
 Disable a warning for MSVC.
 
bool disableWarnings (Span< const StringView > name)
 Disable a warning for non-MSVC compiler.
 
bool disableClangWarnings (Span< const StringView > name)
 Disable a warning for Clang.
 
bool disableGCCWarnings (Span< const StringView > name)
 Disable a warning for GCC.
 
bool addIncludePaths (Span< const StringView > includePaths)
 Adds paths to include paths list.
 
bool addDefines (Span< const StringView > defines)
 Adds some pre-processor defines.
 

Static Public Member Functions

static Result merge (Span< const CompileFlags * > opinions, CompileFlags &flags)
 Merges opinions about flags into target flags.
 

Public Attributes

Vector< StringincludePaths
 Include search paths list.
 
Vector< Stringdefines
 Preprocessor defines list.
 
Vector< Warningwarnings
 Warnings list.
 
Parameter< Optimization::TypeoptimizationLevel = Optimization::Release
 Optimization level.
 
Parameter< bool > enableASAN = false
 Enable Address Sanitizer.
 
Parameter< bool > enableRTTI = false
 Enable C++ Runtime Type Identification.
 
Parameter< bool > enableExceptions = false
 Enable C++ Exceptions.
 
Parameter< bool > enableStdCpp = false
 Enable and include C++ Standard Library.
 
Parameter< bool > enableCoverage = false
 Enables code coverage instrumentation.
 

Friends

struct LinkFlags
 

Detailed Description

Compile flags (include paths, preprocessor defines etc.)

Member Function Documentation

◆ addDefines()

bool SC::Build::CompileFlags::addDefines ( Span< const StringView > defines)
nodiscard

Adds some pre-processor defines.

◆ addIncludePaths()

bool SC::Build::CompileFlags::addIncludePaths ( Span< const StringView > includePaths)
nodiscard

Adds paths to include paths list.

◆ disableClangWarnings()

bool SC::Build::CompileFlags::disableClangWarnings ( Span< const StringView > name)
nodiscard

Disable a warning for Clang.

◆ disableGCCWarnings()

bool SC::Build::CompileFlags::disableGCCWarnings ( Span< const StringView > name)
nodiscard

Disable a warning for GCC.

◆ disableWarnings() [1/2]

bool SC::Build::CompileFlags::disableWarnings ( Span< const StringView > name)
nodiscard

Disable a warning for non-MSVC compiler.

◆ disableWarnings() [2/2]

bool SC::Build::CompileFlags::disableWarnings ( Span< const uint32_t > number)
nodiscard

Disable a warning for MSVC.

◆ merge()

static Result SC::Build::CompileFlags::merge ( Span< const CompileFlags * > opinions,
CompileFlags & flags )
static

Merges opinions about flags into target flags.

Parameters
opinionsOpinions about flags from strongest to weakest
flagsOutput flags

Member Data Documentation

◆ defines

Vector<String> SC::Build::CompileFlags::defines

Preprocessor defines list.

◆ enableASAN

Parameter<bool> SC::Build::CompileFlags::enableASAN = false

Enable Address Sanitizer.

◆ enableCoverage

Parameter<bool> SC::Build::CompileFlags::enableCoverage = false

Enables code coverage instrumentation.

◆ enableExceptions

Parameter<bool> SC::Build::CompileFlags::enableExceptions = false

Enable C++ Exceptions.

◆ enableRTTI

Parameter<bool> SC::Build::CompileFlags::enableRTTI = false

Enable C++ Runtime Type Identification.

◆ enableStdCpp

Parameter<bool> SC::Build::CompileFlags::enableStdCpp = false

Enable and include C++ Standard Library.

◆ includePaths

Vector<String> SC::Build::CompileFlags::includePaths

Include search paths list.

◆ optimizationLevel

Parameter<Optimization::Type> SC::Build::CompileFlags::optimizationLevel = Optimization::Release

Optimization level.

◆ warnings

Vector<Warning> SC::Build::CompileFlags::warnings

Warnings list.


The documentation for this struct was generated from the following file: