Results 1 to 6 of 6

Thread: qmake & make (Console Compilation)

  1. #1
    Join Date
    Jan 2016
    Posts
    54
    Thanks
    7
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default qmake & make (Console Compilation)

    Hi forum,

    Is there a way to know if the compilation with line command is OK or NOT unless parsing the output ??

    Regards,

  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: qmake & make (Console Compilation)

    You'll need to check what that "line" command of yours does.

    Standard tools like make, jom, ninja, report success/failure via return codes, maybe your "line" command does as well.

    Cheers,
    _

  3. #3
    Join Date
    Dec 2015
    Posts
    35
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: qmake & make (Console Compilation)

    I have an idea, but not sure if always true

    After each successful compilation, we get (.exe, .dll or .so) ... check in your directory if the (.exe,.dll or .so) exists or not

    You can use exists() method : http://doc.qt.io/qt-4.8/qfile.html#exists-2

    @anda_skoa what dou you think ??

  4. #4
    Join Date
    Jan 2016
    Posts
    54
    Thanks
    7
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: qmake & make (Console Compilation)

    Thanks for your answers,

    @RegMe : the idea seems good, I have to distinguish between Windows, Unix and Mac extension
    Any Idea

    Regards,

  5. #5
    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: qmake & make (Console Compilation)

    Quote Originally Posted by RegMe View Post
    @anda_skoa what dou you think ??
    Hmm, that would require that the build target is removed before each run.

    But yes, if the tool in question is so broken that it doesn't distinguish between success and error, this could be a way to do it.

    Cheers,
    _

  6. #6
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: qmake & make (Console Compilation)

    Quote Originally Posted by Binary01 View Post
    Is there a way to know if the compilation with line command is OK or NOT unless parsing the output ??
    There must be some misunderstanding here, I've never seen a build process where the make variant or compilers don't return 0 on success and non-zero on warning or error. Are you saying that your command line build process doesn't follow this long standing convention?
    I write the best type of code possible, code that I want to write, not code that someone tells me to write!

Similar Threads

  1. qmake / make: automatic command execution before compilation start ?
    By Comer352l in forum Installation and Deployment
    Replies: 1
    Last Post: 27th June 2014, 02:04
  2. Replies: 3
    Last Post: 14th October 2013, 22:20
  3. qmake doesn't make a 'make' file
    By elyness in forum Installation and Deployment
    Replies: 1
    Last Post: 4th August 2010, 16:21
  4. Replies: 5
    Last Post: 25th September 2007, 11:43
  5. Window OS make distclean && qmake && make one line
    By patrik08 in forum General Programming
    Replies: 4
    Last Post: 22nd March 2007, 11:43

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.