X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BAF8F387090B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1595945038; bh=NTvYHJwSeu+3IpOV9ZuXoU8MqgSwM45AXfOoPVtHv3c=; h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=uhtBsAWwhhOwO7P6/Ib67hLMcpMyu/HroTfkNrhbPffQOky3zWrWWg27E8UPqelNH FBDSkc1NNgIcJ/cB0okZWWc/kQhIfQl3FYXNF+TZIPMGCt/BmxLtV4I/7fYMltQgfd eF1udzpxwF6FluhpwUpbtyRsEwnQirfM4ANzfgIA= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9D8D63842430 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=XoubhWGcWP5+ROaPUtMPmWW8a3ltuauSksvsJUlfr34=; b=pZ3k3nEz8BWvU/xixa9hlqns2IHuFiw2EJJHJiazn92HKY7PcFi11FEoCdXlmfQ16l JAmG0IZxCogoWUjrso4j08H/+oS0CctRi804pepKWxWW7HVN7qIBu8wU/AOCW/Vg2NJ9 RfTs22EaEmMYx16XgeRSs1wbkzh3FjONz1NojRn6jrGNY5l9f4B1gRViSFTUidy62QA9 Rcb1QjxytZL5iAqL4Gyl85or2l5AFZ4KfN/zPgCsfdTVCihksTwQOqEzuKlNGBaY9YqL Mj51NNCYSM7btt/RETexH5JvadA9psqAzkbC+dimOfWh4m/t5IWFYzhBNklqk71WS+3Z ttVg== X-Gm-Message-State: AOAM531Oo4H/JT40jkbdrcmJvE62QkyybRAKTYGRCihMmH/s+ioDwW0i 3pOeLIzlr/v79SMstcTAhc4CLlZZl5ErOGletR6nx2+kYqA= X-Google-Smtp-Source: ABdhPJx8Gvj/bkJEOoHAO5lGB99xZIWch2PdAQcWveNUJ9Hh37lMYcUwkkePQWrfz3dANJ2NsLzGQ+PKY7Gzb00cY9k= X-Received: by 2002:a02:c7cc:: with SMTP id s12mr33487795jao.79.1595945034649; Tue, 28 Jul 2020 07:03:54 -0700 (PDT) MIME-Version: 1.0 Date: Tue, 28 Jul 2020 22:03:38 +0800 Message-ID: Subject: Set a different C compiler To: cygwin AT cygwin DOT com X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: paul zhang via Cygwin Reply-To: paul zhang Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "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 -- 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