public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Set a different C compiler
@ 2020-07-28 14:03 paul zhang
  2020-07-28 17:26 ` Brian Inglis
  0 siblings, 1 reply; 2+ messages in thread
From: paul zhang @ 2020-07-28 14:03 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Set a different C compiler
  2020-07-28 14:03 Set a different C compiler paul zhang
@ 2020-07-28 17:26 ` Brian Inglis
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Inglis @ 2020-07-28 17:26 UTC (permalink / raw)
  To: cygwin


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.]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-28 17:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28 14:03 Set a different C compiler paul zhang
2020-07-28 17:26 ` Brian Inglis

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).