We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am facing some issues with cross compiling my project using libserial as a dependency. I have a toolchain file:
set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_PROCESSOR aarch64) # Specify the cross compiler locations set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc) set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)
That I am passing to my cmake command. I include libserial using fetchcontent:
FetchContent_Declare( libserial GIT_REPOSITORY https://github.com/crayzeewulf/libserial.git GIT_TAG origin/master # or a specific tag/commit CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=aarch64-linux-gnu.cmake ) FetchContent_MakeAvailable(libserial) set(LIBSERIAL_LIBRARIES libserial_static) include_directories(${libserial_SOURCE_DIR}/src/libserial/ ${libserial_SOURCE_DIR}/src/)
But gtest is compiled differently from my project:
set(CMAKE_HOST_SYSTEM "Linux-5.15.133.1-microsoft-standard-WSL2") set(CMAKE_HOST_SYSTEM_NAME "Linux") set(CMAKE_HOST_SYSTEM_VERSION "5.15.133.1-microsoft-standard-WSL2") set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") set(CMAKE_SYSTEM "Linux-5.15.133.1-microsoft-standard-WSL2") set(CMAKE_SYSTEM_NAME "Linux") set(CMAKE_SYSTEM_VERSION "5.15.133.1-microsoft-standard-WSL2") set(CMAKE_SYSTEM_PROCESSOR "x86_64") set(CMAKE_CROSSCOMPILING "FALSE")
set(CMAKE_HOST_SYSTEM "Linux-5.15.133.1-microsoft-standard-WSL2") set(CMAKE_HOST_SYSTEM_NAME "Linux") set(CMAKE_HOST_SYSTEM_VERSION "5.15.133.1-microsoft-standard-WSL2") set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") include("/src/aarch64-linux-gnu.cmake") set(CMAKE_SYSTEM "Linux") set(CMAKE_SYSTEM_NAME "Linux") set(CMAKE_SYSTEM_VERSION "") set(CMAKE_SYSTEM_PROCESSOR "aarch64") set(CMAKE_CROSSCOMPILING "TRUE")
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am facing some issues with cross compiling my project using libserial as a dependency. I have a toolchain file:
That I am passing to my cmake command. I include libserial using fetchcontent:
But gtest is compiled differently from my project:
The text was updated successfully, but these errors were encountered: