mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 19:32:19 +01:00
Build with C++17 (#8603)
Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
@@ -608,6 +608,17 @@ def add_build_flag(build_flag: str):
|
||||
CORE.add_build_flag(build_flag)
|
||||
|
||||
|
||||
def add_build_unflag(build_unflag: str) -> None:
|
||||
"""Add a global build unflag to the compiler flags."""
|
||||
CORE.add_build_unflag(build_unflag)
|
||||
|
||||
|
||||
def set_cpp_standard(standard: str) -> None:
|
||||
"""Set C++ standard with compiler flag `-std={standard}`."""
|
||||
CORE.add_build_unflag("-std=gnu++11")
|
||||
CORE.add_build_flag(f"-std={standard}")
|
||||
|
||||
|
||||
def add_define(name: str, value: SafeExpType = None):
|
||||
"""Add a global define to the auto-generated defines.h file.
|
||||
|
||||
|
Reference in New Issue
Block a user