Add basic support for external CMake arguments // Issue #339
Might be useful when a user wants to modify project configuration settings: set cache entries or enable developer warnings specific to CMake
This commit is contained in:
@@ -768,10 +768,10 @@ def find_default_component(target_configs):
|
||||
# Generate final linker script
|
||||
#
|
||||
|
||||
if not env.BoardConfig().get("build.ldscript", ""):
|
||||
if not board.get("build.ldscript", ""):
|
||||
linker_script = env.Command(
|
||||
join("$BUILD_DIR", "esp32_out.ld"),
|
||||
env.BoardConfig().get(
|
||||
board.get(
|
||||
"build.esp-idf.ldscript",
|
||||
join(FRAMEWORK_DIR, "components", "esp32", "ld", "esp32.ld"),
|
||||
),
|
||||
@@ -789,7 +789,7 @@ if not env.BoardConfig().get("build.ldscript", ""):
|
||||
#
|
||||
|
||||
fwpartitions_dir = join(FRAMEWORK_DIR, "components", "partition_table")
|
||||
partitions_csv = env.BoardConfig().get("build.partitions", "partitions_singleapp.csv")
|
||||
partitions_csv = board.get("build.partitions", "partitions_singleapp.csv")
|
||||
env.Replace(
|
||||
PARTITIONS_TABLE_CSV=abspath(
|
||||
join(fwpartitions_dir, partitions_csv)
|
||||
@@ -805,7 +805,7 @@ partition_table = env.Command(
|
||||
'"$PYTHONEXE" "%s" -q --flash-size "%s" $SOURCE $TARGET'
|
||||
% (
|
||||
join(FRAMEWORK_DIR, "components", "partition_table", "gen_esp32part.py"),
|
||||
env.BoardConfig().get("upload.flash_size", "detect"),
|
||||
board.get("upload.flash_size", "detect"),
|
||||
),
|
||||
"Generating partitions $TARGET",
|
||||
),
|
||||
@@ -853,9 +853,8 @@ print("Reading CMake configuration...")
|
||||
project_codemodel = get_cmake_code_model(
|
||||
env.subst("$PROJECT_DIR"),
|
||||
BUILD_DIR,
|
||||
["-DEXTRA_COMPONENT_DIRS:PATH=" + ";".join(extra_components)]
|
||||
if extra_components
|
||||
else [],
|
||||
["-DEXTRA_COMPONENT_DIRS:PATH=" + ";".join(extra_components)] +
|
||||
click.parser.split_arg_string(board.get("build.cmake_extra_args", ""))
|
||||
)
|
||||
|
||||
if not project_codemodel:
|
||||
|
||||
Reference in New Issue
Block a user