Where is the Location of CMakeLists File When I Build Simulink Model With CMake?

11 views (last 30 days)
I want to build the shapesdemo Model which is incorporated in DDS Blockset Examples. I follow the steps illustrated in accompanied file shapesdemo.mlx. In the last step when I click the Build Button, the Diagnostic Viewer shows the following errors:
Validation errors:
Caused by:
%TempDir%\tp407ac1fd_7e9f_4e0b_8f9b_c9c7165fdb52>set CMAKE_EXPORT_COMPILE_COMMANDS=TRUE
%TempDir%\tp407ac1fd_7e9f_4e0b_8f9b_c9c7165fdb52>%MatlabRoot%\bin\win64\cmake\bin\cmake.exe
-S . -B . -DCMAKE_INSTALL_PREFIX=".."
-- Building for: NMake Makefiles
-- Configuring incomplete, errors occurred!
See also "%TempDir%/tp407ac1fd_7e9f_4e0b_8f9b_c9c7165fdb52/CMakeFiles/CMakeOutput.log".
I change to temporary directory %TempDir% according to error messages, but there is no tp407ac1fd_7e9f_4e0b_8f9b_c9c7165fdb52 folder.
I want to find where is the location of CMakeLists file or how to customize the execution of cmake.exe so that I can specify -G option.

Accepted Answer

Mark McBroom
Mark McBroom on 4 Mar 2024
On Windows only Visual Studio 2019 is supported.
Thanks.
Mark.
  8 Comments
Chuguang Pan
Chuguang Pan on 5 Mar 2024
After I type the mex -setup C++ in Command Window, it displays the following information:
MEX configured to use 'MinGW64 Compiler (C++)' for C++ language compilation.
I have installed the MATLAB Support for MinGW-w64 C/C++/Fortran Compiler support package.
Chuguang Pan
Chuguang Pan on 5 Mar 2024
According to the messages displayed after I type the mex -setup C++ -v. I found that Windows 10 SDK installation was missing. After I install the Windows 10 SDK, mex -setup C++ find 'Microsoft Visual Studio 2019' successfully!
Thank you very much for your answers @Mark McBroom, I have built the shapesdemo.exe.

Sign in to comment.

More Answers (1)

Mark McBroom
Mark McBroom on 4 Mar 2024
Did you configure the SImulink model for RTI Connext or eProsima? If RTI Connext DDS, do you have MS Visual Studio 2019 installed?
  1 Comment
Chuguang Pan
Chuguang Pan on 4 Mar 2024
I choose the eProsima 2.x Vendor within DDS Application Quick Start. The Build and Deploy Shapes Demo section in shapesdemo.mlx file illustrates that
For eProsima, the FastDDS product is included with DDS Blockset, and no additional setup would be required.
According to the error messages showed in Diagnostic Viewer, the cmake build process use the nmake generator, but cannot find nmake.exe.
I have installed the SupportPackage MATLAB Support for MinGW-w64 C/C++ Compiler. I find there is mingw32-make.exe and want to change the generator when cmake build the model using -G option.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!