Skip to content
Open

works #361

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
4 changes: 2 additions & 2 deletions ner_environment/build_system/build_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class OpenOCDLocation(str, Enum):
# ==============================================================================

@app.command(help="Build the project with GCC ARM Toolchain and Make/CMake")
def build(profile: str = typer.Option(None, "--profile", "-p", callback=unsupported_option_cb, help="(planned) Specify the build profile (e.g., debug, release)", show_default=True),
def build(profile: str = typer.Option("release", "--profile", "-p", help="Specify the build profile (e.g., debug, release)", show_default=True),
clean: bool = typer.Option(False, "--clean", help="Clean the build directory before building", show_default=True)):
is_cmake = os.path.exists("CMakeLists.txt")
if is_cmake: # Repo uses CMake, so execute CMake commands.
Expand All @@ -64,7 +64,7 @@ def build(profile: str = typer.Option(None, "--profile", "-p", callback=unsuppor
run_command_docker('cmake --build build --target clean ; find . -type d -name "build" -exec rm -rf {} +')
print("[#cccccc](ner build):[/#cccccc] [green]Ran build-cleaning command.[/green]")
else:
run_command_docker("mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=cmake/gcc-arm-none-eabi.cmake .. && cmake --build .", stream_output=True)
run_command_docker(f"mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE={profile.capitalize()} -DCMAKE_TOOLCHAIN_FILE=cmake/gcc-arm-none-eabi.cmake .. && cmake --build .", stream_output=True)
run_command_docker('chmod 777 -R ./build/*')
else: # Repo uses Make, so execute Make commands.
print("[#cccccc](ner build):[/#cccccc] [blue]Makefile-based project detected.[/blue]")
Expand Down