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

11 ビュー (過去 30 日間)
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.

採用された回答

Mark McBroom
Mark McBroom 2024 年 3 月 4 日
On Windows only Visual Studio 2019 is supported.
Thanks.
Mark.
  8 件のコメント
Chuguang Pan
Chuguang Pan 2024 年 3 月 5 日
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 2024 年 3 月 5 日
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.

サインインしてコメントする。

その他の回答 (1 件)

Mark McBroom
Mark McBroom 2024 年 3 月 4 日
Did you configure the SImulink model for RTI Connext or eProsima? If RTI Connext DDS, do you have MS Visual Studio 2019 installed?
  1 件のコメント
Chuguang Pan
Chuguang Pan 2024 年 3 月 4 日
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.

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by