Skip to content

Commit

Permalink
qmake: don't misuse cache()
Browse files Browse the repository at this point in the history
... when QMAKE_DEFAULT_{INC,LIB}DIRS cannot be determined.

it would have been nicer to actually persist empty results, but cache()
won't do that, and fixing it doesn't seem worth the effort now.

Change-Id: I95d5645e40a0da572f0def16462703373eaeb804
Reviewed-by: Joerg Bornemann <[email protected]>
  • Loading branch information
ossilator committed Dec 14, 2018
1 parent 74cdd89 commit 852b1af
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mkspecs/features/toolchain.prf
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,11 @@ isEmpty($${target_prefix}.INCDIRS) {
isEmpty(QMAKE_DEFAULT_LIBDIRS): QMAKE_DEFAULT_LIBDIRS = /lib /usr/lib
}

cache($${target_prefix}.INCDIRS, set stash, QMAKE_DEFAULT_INCDIRS)
cache($${target_prefix}.LIBDIRS, set stash, QMAKE_DEFAULT_LIBDIRS)
# cache() complains about undefined variables and doesn't persist empty ones.
!isEmpty(QMAKE_DEFAULT_INCDIRS): \
cache($${target_prefix}.INCDIRS, set stash, QMAKE_DEFAULT_INCDIRS)
!isEmpty(QMAKE_DEFAULT_LIBDIRS): \
cache($${target_prefix}.LIBDIRS, set stash, QMAKE_DEFAULT_LIBDIRS)
} else {
QMAKE_DEFAULT_INCDIRS = $$eval($${target_prefix}.INCDIRS)
QMAKE_DEFAULT_LIBDIRS = $$eval($${target_prefix}.LIBDIRS)
Expand Down

0 comments on commit 852b1af

Please sign in to comment.