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.] -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple