Skip to content

Commit

Permalink
Fix examples generation for onboard_temperature
Browse files Browse the repository at this point in the history
Also add error printing to the log when cmake configuration fails

Signed-off-by: William Vinnicombe <[email protected]>
  • Loading branch information
will-v-pi committed Apr 3, 2024
1 parent 119759d commit 46bbb3f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/pico_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ def GenerateCMake(folder, params):
# Get project name
for line in lines:
if "add_executable" in line:
newProjectName = line.split('(')[1].strip().strip("()")
newProjectName = line.split('(')[1].split()[0].strip().strip("()")
if params["wantThreadsafeBackground"] or params["wantPoll"]:
newProjectName = newProjectName.replace("_background", "")
newProjectName = newProjectName.replace("_poll", "")
Expand Down
8 changes: 8 additions & 0 deletions src/utils/cmakeUtil.mts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,14 @@ export async function configureCmakeNinja(folder: Uri): Promise<boolean> {
const child = exec(command, {
env: customEnv,
cwd: folder.fsPath,
}, (error, stdout, stderr) => {
if (error) {
console.error(error);
console.log(`stdout: ${stdout}`);
console.log(`stderr: ${stderr}`);
}

return;
});

child.on("error", err => {
Expand Down

0 comments on commit 46bbb3f

Please sign in to comment.