Replies: 2 comments
-
Hi @m4l490n , The CMAKE_BUILD_TYPE should be set based on the launch mode in the CDT/LaunchBar. There is an issue about this. See #807 |
Beta Was this translation helpful? Give feedback.
0 replies
-
I didn't have much luck using Eclipse cmake support, so I ended up setting up my projects as Makefile projects and I invoke cmake externally to generate makefiles. You can then feed compile_commands.json to the indexer to enable navigation, context assist, and what not. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I recently started integrating my cmake projects into Eclipse. So far, I've been only using Eclipse for make-only projects and for these types of projects, it is easy to create multiple build configurations. For example, I can have DEBUG and RELEASE build configurations and specify different flags, preprocessor directives, options, etc. I can configure as well as create more build configurations from the project properties as you already know.
For my cmake project, I created a cmake project using the Empty or Existing CMake Project option to create a project over an existing folder for a project that already has a CMakeLists.txt file and I've been building it in the terminal.
In the terminal, I execute this when I need to build the debug version:
cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug ..
And the following for building the release version:
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..
But then when going to the project properties, there is no settings section where to configure different build configurations. Ok, maybe cmake projects are way different, but where can I configure the CMAKE_BUILD_TYPE to indicate cmake whether I want to build Debug or Release? I haven't been able to find any place to specify that.
What am I missing?
Beta Was this translation helpful? Give feedback.
All reactions