- Install CMake: If you don't have CMake installed, you can download it from the official CMake website (cmake.org) and install it on your system. Make sure to choose the appropriate version for your operating system.
- Set the CMake command path: If you have CMake installed but it is not in the default location or not on the system's PATH, you need to specify the path to the CMake executable in the MATLAB/Simulink Configuration Parameters. Here's how you can do it:a. Open your MATLAB/Simulink project. b. Go to Configuration Parameters (usually located under the "Simulation" or "Model" menu). c. Navigate to Code Generation > CMake Build > CMake Command. d. Specify the full path to the CMake executable in the text field. For example, if CMake is installed at "C:\Program Files\CMake\bin\cmake.exe", you would enter that path. e. Click Apply or OK to save the changes.
- Use grtfmi_install_cmake: If you're using a specific FMI Kit that provides a helper function called grtfmi_install_cmake, you can try running that function but you still need to download and install CMake into the FMI Kit directory. I suggest you to refer the documentation or instructions provided with the FMI Kit for more information on how to use it.
Error using Export model to Co-simulation Functional Mockup Unit (FMU)
25 views (last 30 days)
Show older comments
I could not compile the file and got the following error:
The call to grtfmi_make_rtw_hook, during the after_make hook generated the following error:
Failed to run CMake. Run grtfmi_install_cmake to download and install CMake into the FMI Kit directory or install from cmake.org and set the cmake command in Configuration Parameters > Code Generation > CMake Build > CMake Command if the cmake executable is not on the path and it is not installed in the default location.
The build process will terminate as a result.
Caused by:
Failed to run CMake. Run grtfmi_install_cmake to download and install CMake into the FMI Kit directory or install from cmake.org and set the cmake command in Configuration Parameters > Code Generation > CMake Build > CMake Command if the cmake executable is not on the path and it is not installed in the default location.
Would you please help me resolve this issue?
0 Comments
Accepted Answer
Yash
on 19 Jul 2023
Hi @Ali
The error message indicates that there was a problem running CMake, which is a tool used for building software projects. It appears that either CMake is not installed on your system or it is not located in the default location.
To resolve this issue, you have a few options:
I hope this helps.
2 Comments
Jiajie
on 20 Jun 2024
After solve this issue, another error showed up Error: Errors occurred - aborting
Haven't solved yet.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!