diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-10-22 12:20:19 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-10-29 15:34:12 +0200 |
commit | f917df27520874e5645ac51a1f65aae4a2375ce5 (patch) | |
tree | ab7df56377d10f0b43e4a3dbcc6f72fe24b795a3 /cmake/FindTslib.cmake | |
parent | 402b8b9ceec9a2010b25c2440c75760fed14fd22 (diff) |
CMake: Fix _QT_TOOLCHAIN_VARS_INITIALIZED check in toolchain file
The environment variable check to set extra env vars
was using invalid syntax. The condition always resolved to TRUE
which means the env vars were constantly re-assigned inside each
try_compile project.
To check for undefined-ness, one can use if(NOT DEFINED ENV{...})
To check for false-ness, one can use if(NOT "$ENV{...}")
To check for string emptiness, one can use
if(NOT "$ENV{...}" STREQUAL "")
In this particular case checking for false-ness is good enough.
The extra re-assigning had no visible effect, so this is just cleanup.
As a drive-by, clarify one comment.
Amends ca59c20939a09587662fa8fecd4e480b68244541
Pick-to: 6.2
Change-Id: I8fd400101efa9e610a81268c33cac8c0cb33cba3
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Craig Scott <craig.scott@qt.io>
Diffstat (limited to 'cmake/FindTslib.cmake')
0 files changed, 0 insertions, 0 deletions