Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Odd behaviour of $$basename($$PWD)
QtWS25 Last Chance

Odd behaviour of $$basename($$PWD)

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 3.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tallia1
    wrote on last edited by
    #1

    Is it just me or there is something fundametally flawed within qmake?

    CHUNK OF PRO FILE
    @
    message($$PWD)
    FILE = $$PWD
    message($$basename(FILE))
    message($$basename($$PWD))
    @

    QMAKE OUTPUT
    @
    Project MESSAGE: /Users/ata2/workspace/starlab/plugins/plugin_surfacemesh_io_off
    Project MESSAGE: plugin_surfacemesh_io_off
    Project MESSAGE: @

    1 Reply Last reply
    0
    • P Offline
      P Offline
      p-himik
      wrote on last edited by
      #2

      Try this instead:
      @message($$PWD)
      FILE = $$PWD
      message($$basename(FILE))
      message($$basename(PWD))@

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tallia1
        wrote on last edited by
        #3

        LoL that was dumb :)
        Thanks for pointing it out

        Still I find it a bit odd. I would have imagined that
        variables needed to be dereferenced when passing
        them to functions :\

        1 Reply Last reply
        0
        • P Offline
          P Offline
          p-himik
          wrote on last edited by
          #4

          That would lead to need to create separate variables for such functions as message() and warning().

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tallia1
            wrote on last edited by
            #5

            Not sure I fully understand your argument here.
            Indeed we use
            @ message($$VARIABLE) @
            and not
            @ message(VARIABLE) @

            1 Reply Last reply
            0
            • P Offline
              P Offline
              p-himik
              wrote on last edited by
              #6

              Oh, sorry, i misread your previous post.

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved