Fast-DDS
Fast-DDS copied to clipboard
try_run() causes cmake error in cross-compiling mode
Is there an already existing issue for this?
- [X] I have searched the existing issues
Expected behavior
No error.
Current behavior
CMake Error: try_run() invoked in cross-compiling mode, please set the following cache variables appropriately: SM_RUN_RESULT (advanced) SM_RUN_RESULT__TRYRUN_OUTPUT (advanced)
Steps to reproduce
-
git clone https://github.com/Cheney-W/vcpkg.git
-
git checkout Dev/Cheney/36368
-
.\bootstrap-vcpkg.bat
-
.\vcpkg.exe install fastrtps:arm64-windows
Fast DDS version/commit
https://github.com/eProsima/Fast-DDS/releases/tag/v2.13.1
Platform/Architecture
Windows 10 Visual Studio 2019
Transport layer
Default configuration, UDPv4 & SHM
Additional context
After add below codes into the https://github.com/eProsima/Fast-DDS/blob/master/src/cpp/CMakeLists.txt:
set(SM_RUN_RESULT 0 CACHE INTERNAL "")
set(SM_RUN_RESULT__TRYRUN_OUTPUT "" CACHE INTERNAL "")
cmake failed with a new error:
CMake Error at src/cpp/CMakeLists.txt:420 (string):
string sub-command STRIP requires two arguments
The issue is that after executing the try_run command, the value of RUN_OUTPUT_VARIABLE is empty.
XML configuration file
No response
Relevant log output
No response
Network traffic capture
No response