Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Can't switch cmake generator to ninja(Feature worked in 2019-09, but fails in 2021-12)
Can't switch cmake generator to ninja [message #1849519] Sun, 23 January 2022 05:54
Hideo Takahashi is currently offline Hideo TakahashiFriend
Messages: 1
Registered: January 2022
Junior Member
In 2019-09, on a cmake project, the cmake generator choice was respected, and I could switch between "Ninja" and "Unix Makefiles".

However, since some version, up to at least 2021-12 the user choice is ignored, and Unix Makefiles will always be used.

The UI to switch is located in the launch configuration dialog (taken from 2019-09):

index.php/fa/41573/0/

When building the project for the first time, (or after deleting all cmake generated files) you can see the chosen generator working in the build console:

Build console output taken from 2019-09:
Building in: /home/hideo-t/eclipse-workspace-test/cmake-hello/build/default
Configuring in: /home/hideo-t/eclipse-workspace-test/cmake-hello/build/default
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON /home/hideo-t/eclipse-workspace-test/cmake-hello
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
...

see the 3rd line. Ninja is specified.


With the same setting, in 2021-12, the "Unix Makefiles" generator will always be used, and I cannot make ninja run.

The console from 2021-12:
Configuring in: /home/hideo-t/eclipse-workspace-test-2021-12/cmake-hello-2021-12/build/default
cmake -G Unix Makefiles -DCMAKE_EXPORT_COMPILE_COMMANDS=ON /home/hideo-t/eclipse-workspace-test-2021-12/cmake-hello-2021-12
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works

See the 2nd line. On the launch configuration dialog, "Ninja" was specified in this case.

So it seems at some version this function stopped working.
Please take a look.
Previous Topic:GDB Hardware Debugging using OpenOCD for stm32f1x
Next Topic:Preprocessor Include Paths, Macros etc. properties page missing
Goto Forum:
  


Current Time: Thu Oct 06 08:28:34 GMT 2022

Powered by FUDForum. Page generated in 0.02090 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top