Results 1 to 6 of 6

Thread: exteremely slow automoc generation on clang

  1. #1
    Join Date
    Dec 2010
    Posts
    14
    Thanks
    1

    Default exteremely slow automoc generation on clang

    Hi,


    I have a project based on Qt and cmake. I am facing an issue of extremely slow automoc generation while compiling on clang Mac OS X. It runs fine on windows( msvc ) and linux( gcc ). Can you please help me identify possible cause for it , or it's natural to be slow on clang. Some times it takes 20 minutes for generating 10 moc files. I am using Qt 5.5 , though I faced same problem with Qt 5.4 too. I have tried Makefile as well as Xcode , in both the cases , automoc is very slow.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: exteremely slow automoc generation on clang

    Do you mean compiling the moc generated files is slow or moc generating these files?

    Cheers,
    _

  3. #3
    Join Date
    Dec 2010
    Posts
    14
    Thanks
    1

    Default Re: exteremely slow automoc generation on clang

    The moc generation is very slow. The build process almost hangs while generating the moc files. Most of the time it happens for the files containing classed extended with QObject. Compilation of moc is swift.

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: exteremely slow automoc generation on clang

    Then it is unrelated to clang as clang is only involved when compiling the generated files, not in their generation.

    You could try to manually run a single moc invocation to check if this is already slow or if the make tool running the moc rules is slow.

    Cheers,
    _

  5. #5
    Join Date
    Dec 2010
    Posts
    14
    Thanks
    1

    Default Re: exteremely slow automoc generation on clang

    I have never generated moc manually before. What's the command for doing that?...do I need to use qmake?...

  6. #6
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: exteremely slow automoc generation on clang

    It is basically something like
    Qt Code:
    1. moc -o somefile_moc.cpp somefile.h
    To copy to clipboard, switch view to plain text mode 
    but you can also check the Makefile cmake generated.

    qmake is not required for a CMake project.

    Cheers,
    _

Similar Threads

  1. Qt with CLang
    By feraudyh in forum Installation and Deployment
    Replies: 2
    Last Post: 1st August 2014, 21:12
  2. Multiple Qt Versions (GCC/Clang) on Mac OS X 10.9
    By tommyziegler in forum Newbie
    Replies: 0
    Last Post: 2nd July 2014, 16:12
  3. Document generation
    By tomas.soltys in forum Qt Programming
    Replies: 1
    Last Post: 25th February 2014, 04:26
  4. Qt 5 build using clang/llvm on Linux
    By faizol in forum Installation and Deployment
    Replies: 0
    Last Post: 11th October 2012, 04:32
  5. cmake kdelib,can not find automoc
    By toartist in forum KDE Forum
    Replies: 0
    Last Post: 1st October 2009, 08:05

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.