[project]
name = "{{ project_name }}"
version = "0.1.0"
description = "Project description."
homepage-url = "www.hello-world.com"

{% if bin_name %}
bin_name = "{{ bin_name }}"
{% endif %}
{% if lib_name %}
lib_name = "{{ lib_name }}"
{% endif %}
target = {{ targets_ids }}
build-env = "{{ build_env }}"
docker-file = ".devcontainer/Dockerfile-custom"
docker-image-tag = "{{ docker_image_tag }}"

{% if target.cc %}
cc  = "{{ target.cc }}"
{% endif %}
{% if target.cxx %}
cxx = "{{ target.cxx }}"
{% endif %}
cxxstandard = "17"

cflags   = "-Wall -Wextra"
cxxflags = "-Wall -Wextra"

in-repo-conan-cache = false

[profile.Debug]
cflags   = "-g"
cxxflags = "-g"

[profile.Release]
cflags   = "-O3 -DNDEBUG"
cxxflags = "-O3 -DNDEBUG"

[profile.RelWithDebInfo]
cflags   = "-O2 -g -DNDEBUG"
cxxflags = "-O2 -g -DNDEBUG"

[profile.MinSizeRel]
cflags   = "-Os -DNDEBUG"
cxxflags = "-Os -DNDEBUG"

[check]
exclude = []

[check.pragma]
exclude = []

[check.copyright]
description = '@copyright Copyright \(C\) \d{4} .* All rights reserved.'
exclude = []

[fix.copyright]
description = '''
/**
 * @copyright Copyright (C) 2023 <Company-Name>. All rights reserved.
 */
'''

[check.todo]
keywords = ["tbd", "todo", "TODO", "fixme"]
exclude = []

[check.clang-format]
exclude = []

[check.clang-tidy]
exclude = []

[check.cyclomatic]
exclude = []

[tests]
cc  = "gcc"
cxx = "g++"

cflags   = "-Wall -Wextra -Og --coverage -fkeep-inline-functions -fkeep-static-consts"
cxxflags = "-Wall -Wextra -Og --coverage -fkeep-inline-functions -fkeep-static-consts"

gcov-executable = "" # Empty string -> use default gcov executable

# Underhood scargo use conan. All string valid for conan tool are valid here. eg "gtest/1.13.0"
[dependencies]
#general -> public conan dependencies of project they will be added to package info (eg. bianry dynamic linkage libary) they will be added also to scargo test.
general = [
]
#build -> private conan dependencies usedn only during build process(eg. private static linkage library)
build = [
]
#tool -> special conan "not library" dependencies like cmake/3.22.
tool = [
]
#test-> conan dependencies used only for testing targets
test = [
    "gtest/1.13.0"
]

[conan.repo]
#Passing conancenter here is not nessary as scargo adds it by default
#Below example of private binary artifacts repository
#my_artifactory = "https://my_artifactory/api/conan/conanlocal"

{% if esp32_config %}
[esp32]
chip = "{{ esp32_config.chip }}"
extra_component_dirs = {{ esp32_config.extra_component_dirs }}
partitions = [
{% for partition in esp32_config.partitions %}
    "{{ partition }}",
{% endfor %}
]

{% endif %}
{% if stm32_config %}
[stm32]
chip = "{{ stm32_config.chip|upper }}"
flash-start = 0x{{ "%08x" % stm32_config.flash_start }}

{% endif %}
{% if atsam_config %}
[atsam]
chip = "{{ atsam_config.chip }}"
cpu = "{{ atsam_config.cpu }}"

{% endif %}

[scargo]
console-log-level = "INFO"
file-log-level = "WARNING"
update-exclude = []

[docker-compose]
ports = []
