[CMake] How to setup toolchain correctly for C compiler only (no CXX present for target)

Rolf Eike Beer eike at sf-mail.de
Mon Sep 19 13:42:35 EDT 2011


Am Montag, 19. September 2011, 18:58:49 schrieb Martin Kupke:
> Is there a way to setup the toolchain file in a way to work only with a
> C compiler?
> What if no C++ compiler is present (or wanted) for the target HW?
> E.g. we use standard C compiler for different processors on our embedded
> solutions. We need to buy the compiler for C and / or C++, but mostly we
> only develop in C and therewith we don't buy the C++ licence. While
> configuring my build environment with CMake the first time the
> CMakeTestCCompiler and even the CMakeTestCXXCompiler used.
> I wasn't able to suppress the CXX part. Is there any option to do this?

PROJECT(something C)

The default is C CXX, therefore it scans for the C++ compiler, too.

Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110919/52db0786/attachment.pgp>


More information about the CMake mailing list