Skip to content

fix scons --target=cmake command failure #10276

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

Merged
merged 2 commits into from
May 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions bsp/stm32/stm32h723-st-nucleo/SConscript
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# for module compiling
import os
Import('RTT_ROOT')
Import('env')
from building import *

Expand Down
4 changes: 2 additions & 2 deletions tools/cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ def GenerateCFiles(env, project, project_name):
if 'LIBS' in group.keys():
for f in group['LIBS']:
LINKER_LIBS += ' ' + f.replace("\\", "/") + '.lib'
cm_file.write("SET(CMAKE_EXE_LINKER_FLAGS \""+ re.sub(LINKER_FLAGS + '(\s*)', LINKER_FLAGS + ' ${CMAKE_SOURCE_DIR}/', LFLAGS) + LINKER_LIBS + "\")\n\n")
cm_file.write("SET(CMAKE_EXE_LINKER_FLAGS \""+ re.sub(LINKER_FLAGS + r'(\s*)', LINKER_FLAGS + r' ${CMAKE_SOURCE_DIR}/', LFLAGS) + LINKER_LIBS + "\")\n\n")

# get the c/cpp standard version from compilation flags
# not support the version with alphabet in `-std` param yet
pattern = re.compile('-std=[\w+]+')
pattern = re.compile(r'-std=[\w+]+')
c_standard = 11
if '-std=' in CFLAGS:
c_standard = re.search(pattern, CFLAGS).group(0)
Expand Down