View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013904CMakeCMakepublic2013-02-09 17:182013-02-10 12:37
ReporterNicholas Bishop 
Assigned ToAlex Neundorf 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformIntel 64-bitOSFedoraOS Version18
Product VersionCMake 2.8.10.2 
Target VersionFixed in Version 
Summary0013904: CMAKE_AUTOMOC misses headers with ".hh" extension
DescriptionAutomoc fails to run on included headers with a ".hh" extension, works correctly if file is renamed with a ".h" extension.
Steps To ReproduceA minimal example is attached.

1) Untar automoc_bug.tar.gz
2) Run "cmake -G Unix\ Makefiles"
3) Run "make"

Make fails with:

CMakeFiles/a.dir/main.cc.o: In function `Foo::Foo()':
main.cc:(.text+0x3a): undefined reference to `vtable for Foo'
main.cc:(.text+0x46): undefined reference to `vtable for Foo'
CMakeFiles/a.dir/main.cc.o: In function `Foo::~Foo()':
main.cc:(.text._ZN3FooD2Ev[_ZN3FooD5Ev]+0x13): undefined reference to `vtable for Foo'
main.cc:(.text._ZN3FooD2Ev[_ZN3FooD5Ev]+0x1f): undefined reference to `vtable for Foo'
collect2: error: ld returned 1 exit status
make[2]: *** [a] Error 1
make[1]: *** [CMakeFiles/a.dir/all] Error 2
make: *** [all] Error 2

4) Rename "main.hh" to "main.h"
5) Edit line 1 of "main.c" to include "main.h" instead of "main.hh"
6) Re-run "make"

This time make succeeds.
TagsNo tags attached.
Attached Filesgz file icon automoc_bug.tar.gz [^] (578 bytes) 2013-02-09 17:18

 Relationships

  Notes
(0032245)
Alex Neundorf (developer)
2013-02-10 12:37

Fixed with the UseMakefileHeaderExtensions branch in next.

 Issue History
Date Modified Username Field Change
2013-02-09 17:18 Nicholas Bishop New Issue
2013-02-09 17:18 Nicholas Bishop File Added: automoc_bug.tar.gz
2013-02-10 12:08 Alex Neundorf Assigned To => Alex Neundorf
2013-02-10 12:08 Alex Neundorf Status new => assigned
2013-02-10 12:37 Alex Neundorf Note Added: 0032245
2013-02-10 12:37 Alex Neundorf Status assigned => closed
2013-02-10 12:37 Alex Neundorf Resolution open => fixed


Copyright © 2000 - 2018 MantisBT Team