Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CMake args for esp-idf lower than 4.4 #1266

Merged
merged 3 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix cmake compiler args inside package.json
  • Loading branch information
radurentea committed Aug 1, 2024
commit e51b6d91fd43efc49bd9355beeaeee17c74f3ef8
6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -575,11 +575,7 @@
},
"idf.cmakeCompilerArgs": {
"type": "array",
"default": [
"-G=Ninja",
"-DPYTHON_DEPS_CHECKED=1",
"-DESP_PLATFORM=1"
],
"default": [],
"description": "%param.cmakeCompilerArgs%",
"scope": "resource"
},
Expand Down
13 changes: 8 additions & 5 deletions src/build/buildTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,14 @@ export class BuildTask {
"-DESP_PLATFORM=1",
];
}
let compilerArgs =
(idfConf.readParameter(
"idf.cmakeCompilerArgs",
this.currentWorkspace
) as Array<string>) || defaultCompilerArgs;
let compilerArgs = idfConf.readParameter(
"idf.cmakeCompilerArgs",
this.currentWorkspace
) as Array<string>;

if (!compilerArgs || compilerArgs.length === 0) {
compilerArgs = defaultCompilerArgs;
}
let buildPathArgsIndex = compilerArgs.indexOf("-B");
if (buildPathArgsIndex !== -1) {
compilerArgs.splice(buildPathArgsIndex, useEqualSign ? 1 : 2);
Expand Down
Loading