Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Managing include paths and macros in 'Core Build' projects.
  • From: "Waterlander, Erwin" <erwin.waterlander@xxxxxxxxx>
  • Date: Wed, 5 Oct 2022 09:18:23 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Dw8NS264Fk1DrSZOSf0qp27XQveBmmrUlMka0pmqqoY=; b=ZLCwuIZBbeSBQudYsKKel6lTQ8IiuXDf1nDSWs7wkMTaL/tmyOX1fQ7h+qzgAGacPU5Lq+M3FPZVuYyewEq0gJtbgmmvJLyNkQathDWL2d2iAS5mxWhr/7ZNDHXyPzWAl/mCQeuZiQgVt8Xzc3gYjQLPvN9yfOszMg8Dr+C6T1BRQnCfI1X06NNkEALdU5mvVjf3j8tmX9Zk77l0SrScMDgfR/dZfP5zUK3EKU2+TLrq9/qpySaI//IOQ5OkSrOx/dJTtF3Jy387GLuuB/Z4bbQGq/thbWhhanViZwGEr1E2gk8jCusC7lgzpk7cf50l6YfxR8o17GP4KvOLhR6TEg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=giAyaNLQwakh4cYgBvSA9xVE1CZ3b6J8lO2/OLTF+ffzc/fgATcYnGqJYJSVPd3mavO5D3YVzWiWrb3vDn1MtPUNgAPsYRft+fQP6i8oTt6IxGN1XRsGH93jnEXLgoUt4+5dywBa31vzsBhtCAyqXKrJ4RXtFpbI1BcArvTR9LthZ8TebHbnpIJx+UwCpeyarjkjcZB90a7AOmTFl3bmhRzRiWJLI49kiam0SqpZOImLzlUM8VRFvmqy/yfeoUXd8tzWyX9uhzY8R7CM6gnVfpRB6BDGtB9wweAaHVnnHGnyQlbhYduWeuuMZp43x+gl6oCO2awbI3Ys9YGQH6tkUw==
  • Delivered-to: cdt-dev@xxxxxxxxxxx
  • Dlp-product: dlpe-windows
  • Dlp-reaction: no-action
  • Dlp-version: 11.6.500.17
  • List-archive: <https://www.eclipse.org/mailman/private/cdt-dev/>
  • List-help: <mailto:cdt-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/cdt-dev>, <mailto:cdt-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/cdt-dev>, <mailto:cdt-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: AdjNhqEfp/QsKTJySAqOeK9J3F55BAACWKqAADNe8BAABdjogAAoE3cgAAqVKgAADPOCAAC2dBIgABbj8wABGUqSoAADjvEAACp83qAAFnqeAAAd5qvg
  • Thread-topic: [cdt-dev] Managing include paths and macros in 'Core Build' projects.

> -----Original Message-----
> From: cdt-dev <cdt-dev-bounces@xxxxxxxxxxx> On Behalf Of Martin Weber
> Sent: Tuesday, October 04, 2022 20:35
> To: CDT General developers list. <cdt-dev@xxxxxxxxxxx>
> Subject: Re: [cdt-dev] Managing include paths and macros in 'Core Build'
> projects.
> 
> Am Dienstag, 4. Oktober 2022, 10:20:59 CEST schrieb Waterlander, Erwin:
> ...
> > > Hi,
> > >
> > > So this means that if I you run different C compilers, with their
> > > own specific macros and includes, on different source files in a
> > > single build from the same CMake file, you still get correct syntax
> > > highlighting for all the source files. Right?
> 
> To clarify: From the point of feeding the CDT indexer: Yes.
> The tricky part would be to tell cmake to use the custom compiler for a given
> file 'abc.c' and the default compiler for any other C-source file. Cmake's
> target properties might help here [1].
> OTOH, cmake's toolchain feature might be used to switch the default C-
> compiler [2].
> 
> /Martin
> 
> [1] https://cmake.org/cmake/help/latest/manual/cmake-properties.7.html#properties-on-targets
> [2] https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html

Hi,

As far as I see there is no way to use multiple compilers/toolchains in a single cmake run. Perhaps with custom commands one can create something, but this is not nice. The only clean way out of here is splitting the project into multiple projects per compiler to get a cmake run per compiler.

In a Makefile flow it is easy to run multiple compilers in one make run. Unfortunately core build Makefile projects have no extension point (like the detectionParticpant for cmake) to detect a custom compiler from the build output. Would there be a trick to do it?

best regards,

Erwin
---------------------------------------------------------------------
Intel Benelux B.V.
Registered in The Netherlands under number 24134020
Statutory seat: Rotterdam
Registered address: Capronilaan 37, 1119NG Schiphol-Rijk

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



Back to the top