public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin@cygwin.com
Subject: Re: Set a different C compiler
Date: Tue, 28 Jul 2020 11:26:39 -0600	[thread overview]
Message-ID: <c19eb556-6c91-f739-8009-09685229dc25@SystematicSw.ab.ca> (raw)
In-Reply-To: <CAO+o5kZOu9Qsm_8Wy0NU3Kt3tysweAY9ejoed64Q_g6D19N0og@mail.gmail.com>


On 2020-07-28 08:03, paul zhang via Cygwin wrote:
> I tried to build a HelloWorld project using the " cmake CMakeList.txt " way.
> In the  CMakeList.txt file, I want to use the specific c and cxx compilers
> set(CMAKE_LEGACY_CYGWIN_WIN32 0)
> #cmake_minimum_required(VERSION 2.6)
> project(HelloWorld)
> set (CMAKE_C_COMPILER icl)
> set (CMAKE_CXX_COMPILER /cygdrive/c/PROGRA~2/Intel/MPI/501~1.037/intel64/bin/mpicc)
> set (CMAKE_CXX_FLAGS "-O3")
> But the default c compiler is called instead, see below:
> $ cmake CMakeLists.txt
> -- The C compiler identification is MSVC 18.0.21005.1
> -- The CXX compiler identification is MSVC 18.0.21005.1
> -- Check for working C compiler: /cygdrive/c/Program Files (x86)/Microsoft
> Visual Studio 12.0/VC/BIN/amd64/cl.exe
> -- Check for working C compiler: /cygdrive/c/Program Files (x86)/Microsoft
> Visual Studio 12.0/VC/BIN/amd64/cl.exe -- broken
> CMake Error at /usr/share/cmake-3.14.5/Modules/CMakeTestCCompiler.cmake:60
> (message):
>   The C compiler
> How to deal with this issue?

If using Intel's Windows toolchain, please follow Intel's documentation and
instructions for doing so.
Mixing these with Cygwin toolchain is unlikely to work well if at all.
You probably have issues with how the path is set up above.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in IEC units and prefixes, physical quantities in SI.]

      reply	other threads:[~2020-07-28 17:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-28 14:03 paul zhang
2020-07-28 17:26 ` Brian Inglis [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c19eb556-6c91-f739-8009-09685229dc25@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).