From f71aea01d44dc48f711b115f7ae90bb421958438 Mon Sep 17 00:00:00 2001 From: Martin Ejdestig Date: Mon, 7 Sep 2020 08:51:37 +0200 Subject: Modify CMAKE_C_COMPILER check for QNX to accept "qcc" (#246) nto-qnx matches architecture "sub-binaries" for qcc, but can also invoke with qcc binary and specify architecture. The CMake documentation has an example for a QNX toolchain file that sets CMAKE_C_COMPILER to qcc, so it is probably very common. See: https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-qnx Not sure why this check is needed. (Is qcc really the only compiler that can be used to build for QNX?) An alternative could be to remove it completely. Signed-off-by: Martin Ejdestig --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3020e1e..850dbcf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -136,7 +136,7 @@ if(WITH_DLT_USE_IPv6) add_definitions(-DDLT_USE_IPv6) endif() -if(WITH_DLT_QNX_SYSTEM AND NOT "${CMAKE_C_COMPILER}" MATCHES "nto-qnx") +if(WITH_DLT_QNX_SYSTEM AND NOT "${CMAKE_C_COMPILER}" MATCHES "nto-qnx|qcc") message(FATAL_ERROR "Can only compile for QNX with a QNX compiler.") endif() -- cgit v1.2.1