CMake is finding GCC when building in Windows with `-G "Ninja"` in Azure Pipelines
See original GitHub issueThis recipe is building in AppVeyor, but is failing in Azure Pipelines (win64):
%SRC_DIR%>SET "CMAKE_GENERATOR=Visual Studio 14 2015 Win64"
%SRC_DIR%>CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\..\..\VC\vcvarsall.bat" amd64
-- The C compiler identification is GNU 8.1.0
-- The CXX compiler identification is GNU 8.1.0
-- Check for working C compiler: C:/ProgramData/chocolatey/bin/gcc.exe
-- Check for working C compiler: C:/ProgramData/chocolatey/bin/gcc.exe -- broken
CMake Error at D:/bld/cminpack_1550515875602/_build_env/Library/share/cmake-3.13/Modules/CMakeTestCCompiler.cmake:52 (message):
The C compiler
"C:/ProgramData/chocolatey/bin/gcc.exe"
is not able to compile a simple test program.
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
How to use the "Ninja" generator in Hosted VS2017 build ...
The ultimate question is: How do I set up an Azure DevOps build pipeline for a CMake-based project using the Ninja generator? cmake...
Read more >Configure and build with CMake Presets in Visual Studio
Reference for using CMake Presets to configure and build CMake projects. ... Run CMake from the command line or a CI pipeline ......
Read more >CMake integration with Ninja generator fails to find the right ...
What can I do to make Ninja find the right compiler? This is the current output: 1> CMake Build Type: Debug 1> --...
Read more >cmake -G Ninja failes on windows, need help - Google Groups
Hi, the cmake Ninja generater creates build commands like this: c:\PROGRA~1\MICROS~4\VC\bin\cl.exe /nologo /D_DEBUG /MDd /Zi /Ob0 /
Read more >Build VCVRack with Conan and CMake + add CI - Development
added Azure CI pipeline setup for automated building of VCVRack on Azure ... Rack - under Windows please call activate_run.bat and cmake -G...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In addition to sourcing
vcvars
, the compiler should be explicitly specified for CMake. This is possible with-DCMAKE_CXX_COMPILER=cl.exe
and-DCMAKE_C_COMPILER=cl.exe
or setting the standard environmental variablesCC=cl.exe
,CXX=cl.exe
.The issue seems fixed (probably on Azure side), I’ve temporarily changed the recipe with the original problem to use Ninja again, and it is working! Feel free to close it.