Build Acados Matlab interface

Hi there People!!!

I am trying to install Acados in windows 10 to use it with Matlab. But first I have to admit that “programming” other than Matlab is not within my strengths, and less when using terminals or PowerShell.

Now back to the topic, I tried to follow each step given in the acados webpage for the installation. However, I got stuck on Build Acados part.

" Configure the cmake command if you want to use other external QP solvers or change the HPIPM and BLASFEO targets."

I opened the PowerShell, created the build folder, and there in the same PowerShell tried to configure the cmake. but I get the following errors:

CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.

CMake Error: The source directory “C:/Users/jguerrero/Documents/acados/build” does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
PS C:\Users\jguerrero\Documents\acados\build>

I really appreciate any guidance you can offer me.

I am quite sure this is a basic question for someone with more experience in programming.

Cheers!

Juan

Hi Juan,

you need to add .. at the end of your cmake command to specify the source directory.

Cheers,
Jonathan

Hi Jonathan,

Thanks for your reply!

See, I tried to run the following line in the PowerShell from the build folder:

PS C:\Users\jguerrero\Documents\acados\build> cmake.exe -G “MinGW Makefiles” -DACADOS_INSTALL_DIR=“$ACADOS_INSTALL_DIR” -DBUILD_SHARED_LIBS=OFF -DACADOS_WITH_OSQP=ON -DACADOS_WITH_QPOASES=ON

but I get this warning:
CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.

and this error:
CMake Error: The source directory “C:/Users/jguerrero/Documents/acados/build” does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.

so, I went one level up, and ran the same line from acados root folder

cmake.exe -G “MinGW Makefiles” -DACADOS_INSTALL_DIR=“$ACADOS_INSTALL_DIR” -DBUILD_SHARED_LIBS=OFF -DACADOS_WITH_OSQP=ON -DACADOS_WITH_QPOASES=ON

PS C:\Users\jguerrero\Documents\acados> cmake.exe -G “MinGW Makefiles” -DACADOS_INSTALL_DIR=“$ACADOS_INSTALL_DIR” -DBUILD_SHARED_LIBS=OFF -DACADOS_WITH_OSQP=ON -DACADOS_WITH_QPOASES=ON

and this time I got this warning:
CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.

which makes me doubt if I am doing it right. Specially because what I understood from the installation steps, I should have be built it from the folder build, and not in the acados root folder.

at the end of all the lines that appear when running cmake, appears:
– Configuring done
– Generating done
– Build files have been written to: C:/Users/jguerrero/Documents/acados


two questions here:

  1. is it right to have ran the cmake from acados root folder?
  2. What exactly Cmake command does?

Thanks in adavance!

Juan

Hi Juan,

the docs page states the cmake command:

cmake.exe -G "MinGW Makefiles" -DACADOS_INSTALL_DIR="$ACADOS_INSTALL_DIR" -DBUILD_SHARED_LIBS=OFF -DACADOS_WITH_OSQP=ON ..

you have missed the final .. in that command which is used to specify the source directory.

Hi Jonathan,

Thanks for your help. I managed to install acados properly.

such a silly mistake :man_facepalming:t2:

Really appreciated!

Cheers,

Juan