public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: paul zhang <huaibao.zhang@gmail.com>
To: cygwin@cygwin.com
Subject: Set a different C compiler
Date: Tue, 28 Jul 2020 22:03:38 +0800	[thread overview]
Message-ID: <CAO+o5kZOu9Qsm_8Wy0NU3Kt3tysweAY9ejoed64Q_g6D19N0og@mail.gmail.com> (raw)

Hi there,

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?


Thanks,
Paul

             reply	other threads:[~2020-07-28 14:03 UTC|newest]

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

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=CAO+o5kZOu9Qsm_8Wy0NU3Kt3tysweAY9ejoed64Q_g6D19N0og@mail.gmail.com \
    --to=huaibao.zhang@gmail.com \
    --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).