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

조회 수: 12 (최근 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