Skip to content

Commit 4af2332

Browse files
committed
Add a warning if an IDF component doesn't register any source files
Issue platformio#1180
1 parent 6186d2c commit 4af2332

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

builder/frameworks/espidf.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,11 @@ def _fix_component_relative_include(config, build_flags, source_index):
618618

619619
def prepare_build_envs(config, default_env, debug_allowed=True):
620620
build_envs = []
621-
target_compile_groups = config.get("compileGroups")
621+
target_compile_groups = config.get("compileGroups", [])
622+
if not target_compile_groups:
623+
print("Warning! The `%s` component doesn't register any source files. "
624+
"Check if sources are set in component's CMakeLists.txt!" % config["name"]
625+
)
622626

623627
is_build_type_debug = "debug" in env.GetBuildType() and debug_allowed
624628
for cg in target_compile_groups:

0 commit comments

Comments
 (0)