Files
2026-07-15 23:42:52 -04:00

158 lines
3.4 KiB
YAML

# =========================================================================
# Unity - A Test Framework for C
# ThrowTheSwitch.org
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
# SPDX-License-Identifier: MIT
# =========================================================================
# This file provides a base configuration for working with the clang (llvm)
# toolchain, targetting native compilation, using mostly default settings,
# with many warnings enabled for self-validation. It can be modified or
# mixed to customize for your project needs.
---
:tools:
:test_compiler:
:name: compiler
:executable: clang
:arguments:
- "-c"
- "-Wall"
- "-Wextra"
- "-Werror"
- "-Wcast-qual"
- "-Wconversion"
- "-Wdisabled-optimization"
- "-Wformat=2"
- "-Winit-self"
- "-Winline"
- "-Winvalid-pch"
- "-Wmissing-include-dirs"
- "-Wnonnull"
- "-Wpacked"
- "-Wpointer-arith"
- "-Wswitch-default"
- "-Wstrict-aliasing"
- "-Wstrict-overflow=5"
- "-Wuninitialized"
- "-Wunused"
- "-Wreturn-type"
- "-Wshadow"
- "-Wundef"
- "-Wwrite-strings"
- "-Wno-nested-externs"
- "-Wno-unused-parameter"
- "-Wno-variadic-macros"
- "-Wbad-function-cast"
- "-fms-extensions"
- "-fno-omit-frame-pointer"
- "-fno-common"
- "-fstrict-aliasing"
- "-std=gnu99"
- "-pedantic"
- "-O0"
- '-I"${5}"'
- "-D${6}"
- "${1}"
- "-o ${2}"
:version: --version
:test_linker:
:name: linker
:executable: clang
:arguments:
- "${1}"
- "-lm"
- "-o ${2}"
:version: --version
:test_fixture:
:name: clang_fixture
:executable: ''
:version: --version
:optional: true
:arguments:
- ${1}
- ${2}
:gcov_compiler:
:name: gcov_compiler
:executable: clang
:arguments:
- "-fprofile-arcs"
- "-ftest-coverage"
- "-Wall"
- "-Wno-address"
- "-std=c99"
- "-pedantic"
- "-Wextra"
- "-Werror"
- "-Wpointer-arith"
- "-Wcast-align"
- "-Wwrite-strings"
- "-Wswitch-default"
- "-Wunreachable-code"
- "-Winit-self"
- "-Wmissing-field-initializers"
- "-Wno-unknown-pragmas"
- "-Wstrict-prototypes"
- "-Wundef"
- "-Wold-style-definition"
- '-I"${5}"'
- "-D${6}"
- "-DGCOV_COMPILER"
- "-DCODE_COVERAGE"
- "-c ${1}"
- "-o ${2}"
- "-MMD"
- "-MF \"${4}\""
:version: --version
:gcov_linker:
:name: gcov_linker
:executable: clang
:arguments:
- "-fprofile-arcs"
- "-ftest-coverage"
- "${1}"
- "${5}"
- "-lm"
- "-o ${2}"
- "${4}"
:version: --version
:gcov_fixture:
:name: gcov_fixture
:optional: true
:executable: '${1}'
:arguments: []
:version: --version
:gcov_summary:
:name: gcov_summary
:executable: llvm-cov
:arguments:
- "gcov"
- "-n"
- "-p"
- "-b"
- "-o \"${2}\""
- "\"${1}\""
:version: --version
:gcov_report:
:name: gcov_report
:executable: llvm-cov
:arguments:
- "gcov"
- "-b"
- "-c"
- "-r"
- "-s \"${2}\""
- "-x"
- "\"${1}\""
:version: --version
:extension:
:object: ".o"
:executable: ".exe"
:defines:
:test:
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_SUPPORT_64
- UNITY_COMPARE_PTRS_ON_ZERO_ARRAY
- UNITY_POINTER_WIDTH=64