make command failed with error: cmake error: unknown argument

the content of build.py is as following:

# Generate a Project Buildsystem

cmake_command = [‘cmake’, ‘-G’, ‘MinGW Makefiles’, ‘-DCMAKE_MAKE_PROGRAM=’+make_program,

             '-DCMAKE_TOOLCHAIN_FILE=./CMake/dspc2000_toolchain.cmake',

             '-S', root_dir, '-B', '.'\]

result = subprocess.run(cmake_command, check=True)

if result.returncode != 0:

print(f"Make command failed with error: {result.stderr}")

else:

print("Make command executed successfully")

# Build a Project

result = subprocess.run([‘cmake’, ‘–build’, ‘.’, ‘–parallel’, ‘12’], capture_output=True, text=True)

the output of terminal is as following:

– Configuring done (6.4s)
– Generating done (0.1s)
– Build files have been written to: D:/ti/ccs12_workspace/xxxx/Build/build_cache
Make command executed successfully
Make command failed with error: CMake Error: Unknown argument --parallel 12
CMake Error: Run ‘cmake --help’ for all supported options.

If I remove –parallel 12, then the error message will change to

Make command failed with error: CMake Error: Unknown argument –build

I have tried clean build_cache first before starting building the project.

I have tried remove most of the source files (especially .asm and .obj files) from the project.

I also have tried change cmake version from 4.2.1 to 3.31.11.

problem still there.

I replaced mingw32-make.exe with ccsxx/utils/bin/gmake.exe, problem is solved.