MantisBT - CMake
View Issue Details
0015405CMakeCMakepublic2015-02-13 10:492016-06-10 14:31
CrumblingStatue 
Kitware Robot 
normalminoralways
closedmoved 
x86_64Linux
CMake 3.1.3 
 
0015405: Undefined behavior when introducing CMAKE_EXTRA_GENERATOR over a plain generator
If I generate a CodeBlocks build over a plain one, the generated .cbp file is missing entries that are present when generating a CodeBlocks build in a clean directory.

The question is, is it valid to introduce extra generators over a plain one, and this is a bug with the CodeBlocks generator, or is it invalid, in which case it should fail with a descriptive error message instead of silently generating incorrect results.
No tags attached.
diff cbp.diff (1,911) 2015-02-14 04:08
https://public.kitware.com/Bug/file/5384/cbp.diff
Issue History
2015-02-13 10:49CrumblingStatueNew Issue
2015-02-13 13:08David ColeNote Added: 0037971
2015-02-13 13:27Nils GladitzNote Added: 0037972
2015-02-13 16:32Alex NeundorfNote Added: 0037973
2015-02-13 16:33Alex NeundorfNote Added: 0037974
2015-02-14 04:08CrumblingStatueFile Added: cbp.diff
2015-02-14 04:10CrumblingStatueNote Added: 0037977
2016-06-10 14:29Kitware RobotNote Added: 0042715
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0037971)
David Cole   
2015-02-13 13:08   
It's certainly unexpected, isn't it? If you change generators, the expectation is that you will start with a clean build tree...
(0037972)
Nils Gladitz   
2015-02-13 13:27   
CMake fails if CMAKE_GENERATOR changes but currently allows CMAKE_EXTRA_GENERATOR to change.

The questions is if this is an oversight or if it is intentional / by design.
(0037973)
Alex Neundorf   
2015-02-13 16:32   
It's an oversight.
(0037974)
Alex Neundorf   
2015-02-13 16:33   
OTOH I'm not quite sure what should go wrong.

So after generating a project you added -DCMAKE_EXTRA_GENERATOR=CodeBlocks, and then got a cbp file where some things were missing ?
I never tried that.
(0037977)
CrumblingStatue   
2015-02-14 04:10   
Actually, -DCMAKE_EXTRA_GENERATOR=CodeBlocks over a plain build works correctly.

The way I did instead is to generate -G 'CodeBlocks - Unix Makefiles` over a plain `Unix Makefiles` build.

I attached a diff that shows the missing includes in that case.
(0042715)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.