Skip to content
New issue

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

Support build with QNX 7.0 toolchain #145

Merged
merged 1 commit into from
Jan 15, 2019
Merged

Support build with QNX 7.0 toolchain #145

merged 1 commit into from
Jan 15, 2019

Conversation

ndesai
Copy link

@ndesai ndesai commented Jan 15, 2019

Steps to build:

  1. Source qnx700-env.sh
  2. Use QNXToolchain.cmake to build:
    cmake -DCMAKE_TOOLCHAIN_FILE=/path/to/QNXToolchain.cmake ../

Steps to build:

1. Source qnx700-env.sh
2. Use QNXToolchain.cmake to build:
cmake -DCMAKE_TOOLCHAIN_FILE=/path/to/QNXToolchain.cmake ../
@ndesai
Copy link
Author

ndesai commented Jan 15, 2019

A sample QNXToolchain.cmake looks like this (the environment is sourced from qnx700-env.sh which is a provided as part of the commercial QNX 7.0 SDP)

set(CMAKE_SYSTEM_NAME QNX)
set(CMAKE_SYSTEM_VERSION 7.0.0)
set(CMAKE_SYSTEM_PROCESSOR aarch64)
set(TOOLCHAIN QNX)
set(QNX YES)

find_path(QNX_HOST
    NAME usr/bin/qcc${HOST_EXECUTABLE_SUFFIX}
    PATHS $ENV{QNX_HOST}
    NO_CMAKE_PATH
    NO_CMAKE_ENVIRONMENT_PATH
)

find_path(QNX_TARGET
    NAME usr/include/qnx_errno.h
    PATHS $ENV{QNX_TARGET}
    NO_CMAKE_PATH
    NO_CMAKE_ENVIRONMENT_PATH
)

set(CMAKE_C_COMPILER ${QNX_HOST}/usr/bin/nto${CMAKE_SYSTEM_PROCESSOR}-gcc${HOST_EXECUTABLE_SUFFIX})
set(CMAKE_CXX_COMPILER ${QNX_HOST}/usr/bin/nto${CMAKE_SYSTEM_PROCESSOR}-c++${HOST_EXECUTABLE_SUFFIX})

get_property(cxx_features GLOBAL PROPERTY CMAKE_CXX_KNOWN_FEATURES)
set(CMAKE_CXX_COMPILE_FEATURES ${cxx_features})
set(GLOBAL PROPERTY CMAKE_C_COMPILE_FEATURES ${cxx_features})

@yse yse merged commit 65b3b23 into yse:develop Jan 15, 2019
@yse
Copy link
Owner

yse commented Jan 15, 2019

Hello! Thank a lot for participation. One more tested platform for library. It's perfectly =)

@zuo1188
Copy link

zuo1188 commented May 25, 2022

thank you so much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants