Build target changes to Debug by itself


Hi, all
I have a problem with M2M 2.0.0 Here are steps to reproduce it:

  1. Create new workspace (W1), create new project (hello world). Change build target to Release.
  2. Close M2M
  3. Create new workspace (W2), copy our “hello world” project in to this workspace.
  4. Open M2M, selecting W2 as workspace. Import project “hello world” viaFILE->IMPORT->Development Studio->Existing Developer Studio projects.
  5. Observe that target has changed to Debug by itself.

Same sequence works OK in previous versions of M2M. Problem only happens for project that is application. libraries maintain correct build configuration.

I thought that all the project information is kept local to the project. Something has changed. Either some information is now stored in workspace .metadata or M2M tries to be too smart.

You would probably ask me why do I do that. It is simple. I have large system (27 projects, 26 are libraries, 1 is application). For example, I have to make a release. I would create new workspace, check out all projects from SVN, import them into workspace and rebuild. OK, it is not a big deal to remember to change project type. Except when build system is automated. Our build system for releases automatically checks out code and runs Eclipse in headless mode to produce binary.



Actually, I don’t think I’ve ever got “importing” a file to work properly - there always seems to be a load of manual tweaks necessary to get the new project working properly… :frowning:


It’s true that the “active” build configuration setting is not persisted in the project, but in the workspace…
(Actually, it seems that you was lucky with the old version: we didn’t noticed any change to this behavior)

This is a CDT behavior, but we’ll have a look (or at least post a ticket at CDT’s bugzilla).

Anyway, in headless mode, you can select the configuration you want to build by using the -config X parameter. You can even use the -config all to build all the configurations.
As said in the documentation, if you don’t use this parameter, the active build config is used… but it’s true that when you import a project in another workspace, the active configuration is chosen… randomly :frowning:


FYI, CDT ticket just posted: