Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After changing the build configuration, cmake generation does not start. #197

Closed
inxksp opened this issue Dec 6, 2023 · 4 comments
Closed

Comments

@inxksp
Copy link

inxksp commented Dec 6, 2023

After changing the build configuration, cmake generation does not start. To run a build with a different configuration, you need to delete the _build directory. CMakeCache.txt for each configuration is stored separately in _build/${ConfigName}. The build should start immediately

@15knots
Copy link
Owner

15knots commented Dec 9, 2023

After changing the build configuration,

Could you pls explain what you are referring to? Did you switch to a different CDT active build configuration or did you change the project properties of a build configuration?

The build should start immediately

It depends on your workbench settings. Do not mix up build (which is handled by CDT) with buildscript generation (handled by cmake4eclipse).
The latter may be time consuming and is performed only if cmake4eclipse finds that CMakeCache.txt is non-existing or stale in terms of project properties of the active build configuration.

@ksrp1984
Copy link

I am changing CDT active build. Build Configurations->set active. For example, I change from Debug to Release. Before this, I only compiled the debug, i.e. there are no make files for release yet. Accordingly, there is no CMakeCache.txt file in the _build/Release. And I think that in this case Cmake should immediately start generating make files.

P.S. Cmake generates make files if you run project->clefan first after changing the configuration. When you run a “clean” one, of course nothing happens, because there is nothing to clean. Still, I think the correct behavior is when Сmake can immediately generate make files without additional commands (if they have not been created before)

@15knots
Copy link
Owner

15knots commented Dec 19, 2023

cmake4eclipse hooks in to the build process the same ways as CDT's makefile generator does: It is called by CDT when a build is triggered.
But the behavior of CDT is to not start a build when the active build configuration switches.
So effectively you are asking for a change in CDT.

@ksrp1984
Copy link

No, when switching a build there is no need to run it immediately. After changing the configuration, we need to start the build by clicking “Build project”. The problem is that after switching the configuration, the "build project" does nothing until run the "clean" command. But there is nothing to clean up because this configuration has not yet been generated by Cmake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants