made changes required for acados to run on windows#1499
made changes required for acados to run on windows#1499NiharikaSabhlok wants to merge 1 commit intoacados:mainfrom
Conversation
FreyJo
left a comment
There was a problem hiding this comment.
Thanks for opening the PR and great that you made it work on your system!
I went through the changes and left a few comments.
| - use the `Developer Command Prompt for VS`, navigate to `<acados_root_folder>/build` and run | ||
| ``` | ||
| cmake -G "Visual Studio 15 2017 Win64" -DBLASFEO_TARGET=GENERIC -DACADOS_INSTALL_DIR=.. -DBUILD_SHARED_LIBS=OFF .. | ||
| cmake -G "Visual Studio 17 2022" -DBLASFEO_TARGET=GENERIC -DACADOS_INSTALL_DIR=.. -DBUILD_SHARED_LIBS=OFF .. |
There was a problem hiding this comment.
Could you rather add the new command as a comment, such that the other tested variant is still present?
|
|
||
| import sys | ||
| sys.path.insert(0, '../common') | ||
| import os |
There was a problem hiding this comment.
This makes the example fail.
Maybe this should be done instead?
import os
common_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'common'))
if common_path not in sys.path:
sys.path.insert(0, common_path)
| main(build=True, generate=False, use_cmake=True) | ||
| # test cython wrapper | ||
| main(build=True, generate=True, use_cmake=False, use_cython=True) | ||
| # main(build=True, generate=True, use_cmake=True, use_cython=True) |
There was a problem hiding this comment.
I would prefer to not change this example to keep testing the cython wrapper.
| # Automatically use CMakeBuilder on Windows if not provided | ||
| if cmake_builder is None: | ||
| cmake_builder = CMakeBuilder() # use default options | ||
| cmake_builder.exec(code_export_dir, verbose) |
There was a problem hiding this comment.
Does this actually make it work?
I think there should also be a cmake_builder in generate.
The changes done in the integrator and the OCP solver should be analogous to each other.
| # Generate the command string for handling the build. | ||
| def get_cmd2_build(self): | ||
| import multiprocessing | ||
| cmd = f'cmake --build "{self._build_dir}" --config Release -j{multiprocessing.cpu_count()}' |
There was a problem hiding this comment.
Did the cpu_count fail for you? The import multiprocessing is still there, so I guess that works.
| """Defines the generator, options can be found via `cmake --help` under 'Generator'. Type: string. Linux default 'Unix Makefiles', Windows 'Visual Studio 15 2017 Win64'; default value: `None`.""" | ||
| # set something for Windows | ||
| if os.name == 'nt': | ||
| self.generator = 'Visual Studio 15 2017 Win64' |
There was a problem hiding this comment.
I guess we should make this an option. Like cmake_generator?
No description provided.