[CMake] Cmake for Eclipse IDE (or QNX branded version)

Richard Grover r.grover at cas.edu.au
Thu Oct 21 21:19:37 EDT 2004


Hi Everyone,
 
We develop Robotics applications using Linux (Debian), QNX Neutrino (and MS
VC7 and Borland for groundstations and other projects) and have some
significant interest in Cmake for minimising the redundant work of
maintaining libraries and code across multiple platforms.

We have successfully tested Cmake across VC7.NET, Borland Builder 7 and gcc
3.3 but wish to extend the code to operate under the QNX neutrino operating
system.

As I understand it, QNX uses the Eclipse IDE and the appropriate plugin to
configure the gcc cross-compiler which it calls qcc (?). The underlying
compiler being using (x86 platform) is ntox86-gcc and I have had partial
success modifying the CMakeCache values to get cmake to use the correct
compiler. I have, unfortunately, been unable to get the Cmake generated
files to utilise the same set of parameters as the QNX ones. I have been
using the 'Unix Makefiles' generator to create the set of working files and
then modify the cache values appropriately.

Specifically, I cannot get the compiler to use the -c switch during ONLY the
compilation stages (it is added to the CMAKE_CXX_FLAGS value along with
-Vgcc_ntox86, -Wc,-Wall -Wc,-Wno-parentheses -O) Unfortunately, it then also
appears in the linking phase and (obviously) this prevents the linker from
doing the linking!?! I think that I am being really stupid and am simply
configuring the Cmake thing incorrectly...

QUESTIONS:

1. Does anyone know of either a QNX-specific or GCC cross-compiler generator
so that most of the options are set automatically?

2. Does anyone know how to 'adjust' the CMakeCache values to generate a
build process similar to the one whose output is listed below (and which
looks subtly similar to the standard gnu methodology)

3. Is there any intention/interest in making an eclipse generator which also
generates the .project and other files?

Thanks,
Richard.


Sample QNX output:

Compiling both Debug and non-debug versions for an x86 platform running QNX
neutrino 6.2.1B. The typical QNX project generates all non-debug objects as
*.o in the /x86/o directory and the debug versions in /x86/o-g (which is
actually quite irritating and the typical cmake out-of-source alternative
would be nice). The Makefiles for the Eclipse project all link backwards to
a common.mk file which sets all the paths for the whole project etc... I
would prefer to use Cmake to generate sensible dependency sets and make
better use of code modules without explicitly including and compiling every
file in the source directories...



make CPULIST=x86 EXTRA_SUFFIXES=cpp  -k clean all 
make -j 1 -Cx86 -fMakefile clean
make[1]: Entering directory `C:/Progra~1/QNX/workspace/Test/x86'
make -j 1 -Co -fMakefile clean ; make -j 1 -Co-g -fMakefile clean
c:\Progra~1\QNX\host\win32\x86\usr\bin\make.exe[2]: Entering directory
`C:/Progra~1/QNX/workspace/Test/x86/o'
C:/Progra~1/QNX/host/win32/x86/usr/bin/rm -f Test  *.pinfo *.o *.err *.map
mapfile *.sym   
c:\Progra~1\QNX\host\win32\x86\usr\bin\make.exe[2]: Leaving directory
`C:/Progra~1/QNX/workspace/Test/x86/o'
c:\Progra~1\QNX\host\win32\x86\usr\bin\make.exe[2]: Entering directory
`C:/Progra~1/QNX/workspace/Test/x86/o-g'
C:/Progra~1/QNX/host/win32/x86/usr/bin/rm -f Test_g  *.pinfo *.o *.err *.map
mapfile *.sym   
c:\Progra~1\QNX\host\win32\x86\usr\bin\make.exe[2]: Leaving directory
`C:/Progra~1/QNX/workspace/Test/x86/o-g'
make[1]: Leaving directory `C:/Progra~1/QNX/workspace/Test/x86'
make -j 1 -Cx86 -fMakefile all
make[1]: Entering directory `C:/Progra~1/QNX/workspace/Test/x86'
make -j 1 -Co -fMakefile all ; make -j 1 -Co-g -fMakefile all
c:\Progra~1\QNX\host\win32\x86\usr\bin\make.exe[2]: Entering directory
`C:/Progra~1/QNX/workspace/Test/x86/o'
C:/Progra~1/QNX/host/win32/x86/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall
-Wc,-Wno-parentheses  -O -DNDEBUG             -I.
-IC:/Progra~1/QNX/workspace/Test/x86/o -IC:/Progra~1/QNX/workspace/Test/x86
-IC:/Progra~1/QNX/workspace/Test -IC:\dev\DynamicBuffer\Common
-IC:/Progra~1/QNX/target/qnx6/usr/include
C:/Progra~1/QNX/workspace/Test/A2DDriver.cpp 
C:/Progra~1/QNX/host/win32/x86/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall
-Wc,-Wno-parentheses  -O -DNDEBUG             -I.
-IC:/Progra~1/QNX/workspace/Test/x86/o -IC:/Progra~1/QNX/workspace/Test/x86
-IC:/Progra~1/QNX/workspace/Test -IC:\dev\DynamicBuffer\Common
-IC:/Progra~1/QNX/target/qnx6/usr/include
C:\dev\DynamicBuffer\Common/Ctime.cpp 
C:/Progra~1/QNX/host/win32/x86/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall
-Wc,-Wno-parentheses  -O -DNDEBUG             -I.
-IC:/Progra~1/QNX/workspace/Test/x86/o -IC:/Progra~1/QNX/workspace/Test/x86
-IC:/Progra~1/QNX/workspace/Test -IC:\dev\DynamicBuffer\Common
-IC:/Progra~1/QNX/target/qnx6/usr/include
C:/Progra~1/QNX/workspace/Test/Test.cc 
C:/Progra~1/QNX/host/win32/x86/usr/bin/rm -f
C:/Progra~1/QNX/workspace/Test/x86/o/Test
C:/Progra~1/QNX/host/win32/x86/usr/bin/qcc -Vgcc_ntox86  -lang-c++ -lang-c++
-oC:/Progra~1/QNX/workspace/Test/x86/o/Test    A2DDriver.o    Ctime.o
Test.o  -L. -LC:/Progra~1/QNX/target/qnx6/x86/lib
-LC:/Progra~1/QNX/target/qnx6/x86/usr/lib      
c:\Progra~1\QNX\host\win32\x86\usr\bin\make.exe[2]: Leaving directory
`C:/Progra~1/QNX/workspace/Test/x86/o'
c:\Progra~1\QNX\host\win32\x86\usr\bin\make.exe[2]: Entering directory
`C:/Progra~1/QNX/workspace/Test/x86/o-g'
C:/Progra~1/QNX/host/win32/x86/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall
-Wc,-Wno-parentheses         -D_DEBUG       -I.
-IC:/Progra~1/QNX/workspace/Test/x86/o
-IC:/Progra~1/QNX/workspace/Test/x86/o-g
-IC:/Progra~1/QNX/workspace/Test/x86 -IC:/Progra~1/QNX/workspace/Test
-IC:\dev\DynamicBuffer\Common -IC:/Progra~1/QNX/target/qnx6/usr/include
-g   -DVARIANT_g  C:/Progra~1/QNX/workspace/Test/A2DDriver.cpp 
C:/Progra~1/QNX/host/win32/x86/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall
-Wc,-Wno-parentheses         -D_DEBUG       -I.
-IC:/Progra~1/QNX/workspace/Test/x86/o
-IC:/Progra~1/QNX/workspace/Test/x86/o-g
-IC:/Progra~1/QNX/workspace/Test/x86 -IC:/Progra~1/QNX/workspace/Test
-IC:\dev\DynamicBuffer\Common -IC:/Progra~1/QNX/target/qnx6/usr/include
-g   -DVARIANT_g  C:\dev\DynamicBuffer\Common/Ctime.cpp 
C:/Progra~1/QNX/host/win32/x86/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall
-Wc,-Wno-parentheses         -D_DEBUG       -I.
-IC:/Progra~1/QNX/workspace/Test/x86/o
-IC:/Progra~1/QNX/workspace/Test/x86/o-g
-IC:/Progra~1/QNX/workspace/Test/x86 -IC:/Progra~1/QNX/workspace/Test
-IC:\dev\DynamicBuffer\Common -IC:/Progra~1/QNX/target/qnx6/usr/include
-g   -DVARIANT_g  C:/Progra~1/QNX/workspace/Test/Test.cc 
C:/Progra~1/QNX/host/win32/x86/usr/bin/rm -f
C:/Progra~1/QNX/workspace/Test/x86/o-g/Test_g
C:/Progra~1/QNX/host/win32/x86/usr/bin/qcc -Vgcc_ntox86  -lang-c++ -lang-c++
-oC:/Progra~1/QNX/workspace/Test/x86/o-g/Test_g    A2DDriver.o    Ctime.o
Test.o  -L. -LC:/Progra~1/QNX/target/qnx6/x86/lib
-LC:/Progra~1/QNX/target/qnx6/x86/usr/lib    -g    
c:\Progra~1\QNX\host\win32\x86\usr\bin\make.exe[2]: Leaving directory
`C:/Progra~1/QNX/workspace/Test/x86/o-g'
make[1]: Leaving directory `C:/Progra~1/QNX/workspace/Test/x86'
 

Richard F. Grover

The ARC Centre of Excellence in Autonomous Systems <http://www.cas.edu.au/>

(The Australian Centre for Field Robotics)
School of Aerospace, Mechanical and Mechatronic Engineering
The Rose St. Building (J04)
The University of Sydney, NSW, 2006, Australia

Ph: +61 2 9351 7156    Fax: +61 2 9351 7474





More information about the CMake mailing list