Reputation: 15
Is Cmake supported in QNX 6.5?
I have a Linux platform code which uses cmake. I need to port this to QNX.
Upvotes: 0
Views: 2943
Reputation: 2318
You can use CMake, but you will need a CMake toolchain file. Here's an example one I use with QNX 6.5 with an updated compiler (GCC 4.8.3) - you will need to adjust the architecture and remove the C++11 flag, if you are using the original compiler:
set(CMAKE_SYSTEM_NAME QNX)
set(arch gcc_ntox86_gpp)
set(ntoarch x86)
set(QNX_PROCESSOR x86)
set(CMAKE_C_COMPILER qcc)
set(CMAKE_C_COMPILER_TARGET ${arch})
set(CMAKE_CXX_COMPILER qcc -lang-c++)
set(CMAKE_CXX_COMPILER_TARGET ${arch})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wc,-std=c++11")
set(CMAKE_ASM_COMPILER qcc -V${arch})
set(CMAKE_ASM_DEFINE_FLAG "-Wa,--defsym,")
set(CMAKE_RANLIB $ENV{QNX_HOST}/usr/bin/nto${ntoarch}-ranlib
CACHE PATH "QNX ranlib Program" FORCE)
set(CMAKE_AR $ENV{QNX_HOST}/usr/bin/nto${ntoarch}-ar
CACHE PATH "QNX qr Program" FORCE)
Upvotes: 2
Reputation:
Cmake works very fine when targeting QNX 7.0. I believe it works also in QNX 6.5.
Upvotes: 0