[cmake-developers] Better QNX QCC handling

Stephen Kelly steveire at gmail.com
Thu Jan 9 18:08:50 EST 2014


I have this patch:

diff --git a/Modules/Platform/QNX.cmake b/Modules/Platform/QNX.cmake
index 8d45360..58ec112 100644
--- a/Modules/Platform/QNX.cmake
+++ b/Modules/Platform/QNX.cmake
@@ -1,12 +1,10 @@
 set(QNXNTO 1)
-# Revise
-# The QNX GCC does not seem to have -isystem so remove the flag.
-# ... Nor does the driver support appropriate flags to create depfiles.
+set(CMAKE_INCLUDE_SYSTEM_FLAG_C "-Wp,-isystem,")
Following the docs here:


 -W phase,arg[,arg ...] 

qcc invokes cc1plus, not gcc, which is why the DEPFILE needs to be specified 

This patch assumes that the compiler specified is 'QCC' or 'qcc', but the 
common toolchain file in the wild is this one:


Instead of using the QCC or qcc compiler drivers, it uses the GCC drivers. 
My patch to the QNX.cmake file obviously makes that toolchain file break.

The solution would seem to be to create a new compiler id 'QCC' and put 
these flag values and CMAKE_${lang}_COMPILE_OPTIONS_TARGET into it.

Any thoughts on that?



More information about the cmake-developers mailing list